From b8897cd6979ab3f4bdcc466efd600c7d048cd4e2 Mon Sep 17 00:00:00 2001 From: Debucquoy Date: Fri, 8 Dec 2023 15:48:09 +0100 Subject: [PATCH] =?UTF-8?q?Englishisation=20des=20loies=20du=20march=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Documents/proto/general/openapi.yaml | 100 ++++++++++++--------------- 1 file changed, 45 insertions(+), 55 deletions(-) diff --git a/Documents/proto/general/openapi.yaml b/Documents/proto/general/openapi.yaml index 028edc6..6a2c29e 100644 --- a/Documents/proto/general/openapi.yaml +++ b/Documents/proto/general/openapi.yaml @@ -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: - type: array + 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