-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi_students.yml
More file actions
178 lines (178 loc) · 4.45 KB
/
Copy pathopenapi_students.yml
File metadata and controls
178 lines (178 loc) · 4.45 KB
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
openapi: 3.0.3
info:
title: Swagger Student - OpenAPI 3.0
description: Student attributes API
version: 1.0.0
paths:
/student:
post:
tags:
- student
summary: Create student
description: This can only be done by the logged-in student.
operationId: createStudent
requestBody:
description: Created student object
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Student'
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Student'
/student/createWithList:
post:
tags:
- student
summary: Creates a list of students with the given input array
operationId: createStudentsWithListInput
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Student'
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Student'
/student/login:
get:
tags:
- student
summary: Logs student into the system
operationId: loginStudent
parameters:
- name: studentname
in: query
description: The student name for login
required: true
schema:
type: string
- name: password
in: query
description: The password for login in clear text
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: string
'400':
description: Invalid studentname/password supplied
/student/logout:
get:
tags:
- student
summary: Logs out the current logged-in student session
operationId: logoutStudent
responses:
'200':
description: Successful operation
/student/{studentname}:
get:
tags:
- student
summary: Get student by student name
operationId: getStudentByName
parameters:
- name: studentname
in: path
description: 'The name that needs to be fetched'
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Student'
'400':
description: Invalid studentname supplied
'404':
description: Student not found
put:
tags:
- student
summary: Update student
operationId: updateStudent
parameters:
- name: studentname
in: path
description: Name that needs to be updated
required: true
schema:
type: string
requestBody:
description: Update an existing student in the store
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Student'
responses:
'200':
description: Successful operation
delete:
tags:
- student
summary: Delete student
operationId: deleteStudent
parameters:
- name: studentname
in: path
description: The name that needs to be deleted
required: true
schema:
type: string
responses:
'400':
description: Invalid studentname supplied
'404':
description: Student not found
components:
schemas:
Student:
type: object
properties:
id:
type: integer
format: int64
example: 1
STD:
type: string
example: STD22112
Groupe:
type: string
example: H4
studentname:
type: string
example: thestudent
firstName:
type: string
example: John
lastName:
type: string
example: James
email:
type: string
example: john@email.com
age:
type: integer
example: 18