-
Notifications
You must be signed in to change notification settings - Fork 1
/
swagger.yaml
151 lines (151 loc) · 3.94 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
swagger: "2.0"
info:
title: Academic Disciplines
description: Get academic disciplines offered by the university, including majors, minors, and concentrations.
version: "1"
license:
name: GNU Affero General Public License Version 3
url: http://www.gnu.org/licenses/agpl-3.0.en.html
externalDocs:
description: GitHub Repository
url: https://github.com/osu-mist/academic-disciplines-api
schemes:
- https
host: api.oregonstate.edu
basePath: /v1
produces:
- application/json
security:
- OAuth2:
- full
paths:
/academic-disciplines:
get:
tags:
- disciplines
operationId: getDisciplines
description: "Get a list of majors, minors, and concentrations. Filter by query parameters."
parameters:
- name: major
in: query
description: >
If true, disciplines that are not majors will be excluded.
type: boolean
required: false
- name: minor
in: query
description: >
If true, disciplines that are not minors will be excluded.
type: boolean
required: false
- name: concentration
in: query
description: >
If true, disciplines that are not concentrations will be excluded.
type: boolean
required: false
- name: department
in: query
description: Filter by department code.
type: string
required: false
- $ref: '#/parameters/pretty'
responses:
"200":
description: Successful response
schema:
$ref: "#/definitions/DisciplineResultObject"
"400":
description: Bad request
schema:
$ref: "#/definitions/Error"
/academic-disciplines/{id}:
get:
tags:
- disciplines
operationId: getDisciplineByID
description: "Get a concentration by code/ID"
parameters:
- name: id
in: path
description: "ID/code of discipline to retrieve."
type: string
required: true
- $ref: '#/parameters/pretty'
responses:
"200":
description: Successful response
schema:
$ref: "#/definitions/DisciplineResultObject"
"404":
description: Not found
schema:
$ref: "#/definitions/Error"
parameters:
pretty:
name: pretty
in: query
type: boolean
required: false
description: If true, JSON response will be pretty-printed
securityDefinitions:
OAuth2:
type: oauth2
flow: application
tokenUrl: https://api.oregonstate.edu/oauth2/token
scopes:
full: Full access to the API
definitions:
DisciplineResultObject:
properties:
data:
type: array
items:
$ref: "#/definitions/Presentation"
Presentation:
properties:
id:
type: string
description: Discipline code
type:
type: string
attributes:
$ref: "#/definitions/DisciplineAttributes"
DisciplineAttributes:
properties:
description:
type: string
description: Description of discipline.
descriptionLong:
type: string
description: Long description of discipline.
major:
type: boolean
minor:
type: boolean
concentration:
type: boolean
department:
type: string
description: Department code
cipcCode:
type: string
Error:
type: object
properties:
status:
type: integer
format: int32
description: HTTP status code.
developerMessage:
type: string
description: An error string aimed at developers.
userMessage:
type: string
description: An error string aimed at end users.
code:
type: integer
description: Error code.
details:
type: string
description: A link to further information about the error.