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 untrusted user who does not match committer: tonitch
GPG Key ID: A78D6421F083D42E

View File

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