salutcesmoileo #4

Merged
tonitch merged 10 commits from salutcesmoileo into master 2023-12-14 14:37:27 +01:00
Showing only changes of commit 7db95aa01c - Show all commits

View File

@ -10,6 +10,15 @@ servers:
- url: https://clyde.herisson.ovh/api - url: https://clyde.herisson.ovh/api
description: default api point for clyde's service description: default api point for clyde's service
tags:
- name: default
- name: General
description: General endpoints
- name: Ext (scientific articles)
description: Scientifics articles extension's endpoints
- name: Ext (Schedule)
description: Schedule extension's endpoints
paths: paths:
/ping: /ping:
get: get:
@ -35,8 +44,7 @@ paths:
name: type name: type
required: false required: false
schema: schema:
type: string $ref: '#components/schemas/Roles'
enum: [teacher, student, secretary]
responses: responses:
'200': '200':
description: OK description: OK
@ -89,6 +97,8 @@ paths:
BirthDate: BirthDate:
type: string type: string
description: Follow the iso 8601 ("YYYY-MM-DD") description: Follow the iso 8601 ("YYYY-MM-DD")
Role:
$ref: "#/components/schemas/Roles"
example: example:
{ {
"LastName": "Doe" , "LastName": "Doe" ,
@ -98,6 +108,7 @@ paths:
"Address": "Rue de Tournais 42", "Address": "Rue de Tournais 42",
"Country": "BE"}, "Country": "BE"},
"BirthDate": "1941-02-22", "BirthDate": "1941-02-22",
"Role": "student"
} }
responses: responses:
'201': '201':
@ -244,7 +255,8 @@ paths:
faculty: faculty:
type: string type: string
teachers: teachers:
$ref: '#/components/schemas/User' type: integer
description: Teacher's identifier
assistants: assistants:
type: array type: array
items: items:
@ -295,8 +307,6 @@ paths:
description: Cursus created description: Cursus created
'401': '401':
$ref: '#/components/responses/UnauthorizedError' $ref: '#/components/responses/UnauthorizedError'
/cursus/{id}: /cursus/{id}:
get: get:
summary: See Cursus's informations summary: See Cursus's informations
@ -912,7 +922,6 @@ paths:
items: items:
$ref: "#/components/schemas/DisplayArticle" $ref: "#/components/schemas/DisplayArticle"
components: components:
securitySchemes: securitySchemes:
bearer: bearer:
@ -937,6 +946,8 @@ components:
birthDate: birthDate:
type: string type: string
description: Follow the iso 8601 ("YYYY-MM-DD") description: Follow the iso 8601 ("YYYY-MM-DD")
role:
$ref: '#/components/schemas/Roles'
example: example:
{ {
"regNo": 42, "regNo": 42,
@ -947,7 +958,7 @@ components:
"address": "Rue de Tournais 42", "address": "Rue de Tournais 42",
"country": "BE"}, "country": "BE"},
"birthDate": "1941-02-22", "birthDate": "1941-02-22",
"staffMember": true, "role": "student"
} }
Address: Address:
type: object type: object
@ -1006,6 +1017,9 @@ components:
"id": 42, "id": 42,
"courses": ['Math', 'Info'] "courses": ['Math', 'Info']
} }
Roles:
type: string
enum: [teacher, student, secretary]
RegRequest: RegRequest:
type : object type : object
@ -1224,4 +1238,3 @@ components: