1
0
forked from PGL/Clyde

Englishisation des loies du marché

This commit is contained in:
Debucquoy 2023-12-08 15:48:09 +01:00
parent 6beb538af5
commit b8897cd697
Signed by: tonitch
GPG Key ID: A78D6421F083D42E

View File

@ -11,10 +11,10 @@ servers:
paths: paths:
/ping: /ping:
get: get:
summary: Vérifie l'état de l'api. summary: Check the API status
responses: responses:
default: default:
description: Retourne pong description: pong
content: content:
text/plain: text/plain:
schema: schema:
@ -22,7 +22,7 @@ paths:
example: pong example: pong
/users: /users:
get: get:
summary: Liste les utilisateurs summary: list all users
tags: tags:
- SI - SI
security: security:
@ -48,7 +48,7 @@ paths:
/user: /user:
get: get:
summary: Récupére ses informations summary: get informations about yourself
tags: tags:
- Users - Users
responses: responses:
@ -59,7 +59,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/User" $ref: "#/components/schemas/User"
post: post:
summary: Créer un utilisateur summary: Create user
tags: tags:
- Users - Users
requestBody: requestBody:
@ -86,7 +86,7 @@ paths:
"FirstName": "John", "FirstName": "John",
"Email": "John.Doe@example.com", "Email": "John.Doe@example.com",
"Address": { "Address": {
"Address": "Rue de Tounais 42", "Address": "Rue de Tournais 42",
"Country": "BE"}, "Country": "BE"},
"BirthDate": "1941-02-22", "BirthDate": "1941-02-22",
} }
@ -96,7 +96,7 @@ paths:
'401': '401':
$ref: '#/components/responses/UnauthorizedError' $ref: '#/components/responses/UnauthorizedError'
patch: patch:
summary: modifier ses informations summary: Change informations about yourself
tags: tags:
- Users - Users
security: security:
@ -109,21 +109,10 @@ paths:
$ref: '#/components/schemas/User' $ref: '#/components/schemas/User'
responses: responses:
'201': '201':
description: Informations modifiées description: Successfully changed.
'401': '401':
$ref: '#/components/responses/UnauthorizedError' $ref: '#/components/responses/UnauthorizedError'
/user/{mat}: /user/{mat}:
get:
summary: Récupérer les informations d'un utilisateur
tags:
- Admin
responses:
'200':
description: Utilisateur trouvé
content:
application/json:
schema:
$ref: "#/components/schemas/User"
parameters: parameters:
- name: mat - name: mat
in: path in: path
@ -131,8 +120,19 @@ paths:
required: true required: true
schema: schema:
type: integer type: integer
get:
summary: Get user's informations
tags:
- Admin
responses:
'200':
description: User found
content:
application/json:
schema:
$ref: "#/components/schemas/User"
patch: patch:
summary: modifier les informations d'un utilisateur summary: Alter user's informations
tags: tags:
- Admin - Admin
security: security:
@ -145,13 +145,12 @@ paths:
$ref: '#/components/schemas/User' $ref: '#/components/schemas/User'
responses: responses:
'201': '201':
description: Informations modifiées description: Successfully changed
'401': '401':
$ref: '#/components/responses/UnauthorizedError' $ref: '#/components/responses/UnauthorizedError'
/course: /course:
post: post:
summary: Créer un nouveau cours summary: Create new course
tags: tags:
- Courses - Courses
- Secretariat - Secretariat
@ -172,12 +171,12 @@ paths:
type: string type: string
responses: responses:
'201': '201':
description: Nouveau cours crée description: course created
'401': '401':
$ref: '#/components/responses/UnauthorizedError' $ref: '#/components/responses/UnauthorizedError'
/courses/{id}: /courses/{id}:
get: get:
summary: Voir les informations sur un cours summary: see courses informations
tags: tags:
- Courses - Courses
responses: responses:
@ -194,7 +193,7 @@ paths:
schema: schema:
type: integer type: integer
delete: delete:
summary: Suprimer un cours summary: delete a course
tags: tags:
- Courses - Courses
- Secretariat - Secretariat
@ -206,7 +205,7 @@ paths:
'401': '401':
$ref: '#/components/responses/UnauthorizedError' $ref: '#/components/responses/UnauthorizedError'
patch: patch:
summary: Changer les options du cours summary: Change course options
tags: tags:
- Secretariat - Secretariat
- Courses - Courses
@ -242,13 +241,13 @@ paths:
} }
responses: responses:
'201': '201':
description: Cours modifié description: Course modified
'401': '401':
$ref: '#/components/responses/UnauthorizedError' $ref: '#/components/responses/UnauthorizedError'
/cursus: /cursus:
post: post:
summary: Créer un nouveau cursus summary: Create a cursus
tags: tags:
- cursus - cursus
security: security:
@ -262,33 +261,24 @@ paths:
properties: properties:
name: name:
type: string type: string
credits: courses:
type: integer type: array
faculty:
type: string
teachers:
type: object
$ref: '#/components/schemas/User'
assistants:
type: array
items: items:
$ref: '#/components/schemas/User' type: integer
description: id of courses
example: example:
{ {
"name": "Math pour l'info", "name": "Bac1",
"credits": 11, []
"faculty": "science",
"Teacher": ,
"Assistants": [ ]
} }
responses: responses:
'201': '201':
description: Nouveau cursus crée description: Cursus created
'401': '401':
$ref: '#/components/responses/UnauthorizedError' $ref: '#/components/responses/UnauthorizedError'
/cursus/{id}: /cursus/{id}:
get: get:
summary: Voir les informations sur un cursus summary: See Cursus's informations
tags: tags:
- cursus - cursus
responses: responses:
@ -305,7 +295,7 @@ paths:
schema: schema:
type: integer type: integer
delete: delete:
summary: Suprimer un cursus summary: Delete cursus
tags: tags:
- cursus - cursus
security: security:
@ -316,7 +306,7 @@ paths:
'401': '401':
$ref: '#/components/responses/UnauthorizedError' $ref: '#/components/responses/UnauthorizedError'
patch: patch:
summary: Changer les options du cursus summary: Modify cursus
tags: tags:
- cursus - cursus
security: security:
@ -351,7 +341,7 @@ paths:
} }
responses: responses:
'201': '201':
description: Cours modifié description: Cursus modified
'401': '401':
$ref: '#/components/responses/UnauthorizedError' $ref: '#/components/responses/UnauthorizedError'
@ -417,19 +407,20 @@ components:
faculty: faculty:
type: string type: string
teachers: teachers:
type: object type: integer
$ref: '#/components/schemas/User' description: user's id
assistants: assistants:
type: array type: array
items: items:
$ref: '#/components/schemas/User' type: integer
description: user's id
example: example:
{ {
"id": 42, "id": 42,
"name": "Math pour l'info", "name": "Math pour l'info",
"credits": 11, "credits": 11,
"faculty": "science", "faculty": "science",
"Teacher": , "Teacher": 42,
"Assistants": [ ] "Assistants": [ ]
} }
Cursus: Cursus:
@ -450,5 +441,4 @@ components:
} }
responses: responses:
UnauthorizedError: UnauthorizedError:
description: Permission non accordée description: Unauthorized access or missing bearer