Gestion Horaire osamerilyabcp
This commit is contained in:
		| @ -11,39 +11,108 @@ servers: | |||||||
| paths: | paths: | ||||||
|   /ping: |   /ping: | ||||||
|     get: |     get: | ||||||
|       summary: Test if the api is up. |       summary: Check the API status  | ||||||
|       responses: |       responses: | ||||||
|         default: |         default: | ||||||
|           description: Standard response to ping |           description: pong  | ||||||
|           content: |           content: | ||||||
|             text/plain: |             text/plain: | ||||||
|               schema: |               schema: | ||||||
|                 type: string |                 type: string | ||||||
|                 example: pong |                 example: pong | ||||||
|   /user: |   /users: | ||||||
|     put: |     get: | ||||||
|       summary: create a new user |       summary: list all users  | ||||||
|       tags: |       tags: | ||||||
|         - users |         - SI | ||||||
|       security: |       security: | ||||||
|         - bearer: [] |         - bearer: [] | ||||||
|       responses: |       parameters: | ||||||
|  |         - in: query | ||||||
|  |           name: type | ||||||
|  |           required: false  | ||||||
|  |           schema: | ||||||
|  |             type: string | ||||||
|  |             enum: [teacher, student, secretary] | ||||||
|  |       responses:  | ||||||
|         '200': |         '200': | ||||||
|           description: User created |           description: OK | ||||||
|  |           content:  | ||||||
|  |             application/json: | ||||||
|  |               schema: | ||||||
|  |                 type: array | ||||||
|  |                 items: | ||||||
|  |                   $ref: "#/components/schemas/User" | ||||||
|         '401': |         '401': | ||||||
|           $ref: '#/components/responses/UnauthorizedError' |           $ref: '#/components/responses/UnauthorizedError' | ||||||
|   /user/{mat}: |    | ||||||
|  |   /user: | ||||||
|     get: |     get: | ||||||
|       summary: get user's info |       summary: get informations about yourself  | ||||||
|       tags: |       tags: | ||||||
|         - users |         - Users | ||||||
|       responses: |       responses: | ||||||
|         '200': |         '200': | ||||||
|           description: User found  |           description: Ok | ||||||
|           content: |           content: | ||||||
|             application/json: |             application/json: | ||||||
|               schema: |               schema: | ||||||
|                 $ref: "#/components/schemas/User" |                 $ref: "#/components/schemas/User" | ||||||
|  |     post: | ||||||
|  |       summary: Create user | ||||||
|  |       tags: | ||||||
|  |         - Users | ||||||
|  |       requestBody: | ||||||
|  |         required: true | ||||||
|  |         content: | ||||||
|  |           application/x-www-form-urlencoded: | ||||||
|  |             schema: | ||||||
|  |               type: object  | ||||||
|  |               properties: | ||||||
|  |                 LastName:  | ||||||
|  |                   type: string | ||||||
|  |                 FirstName: | ||||||
|  |                   type: string | ||||||
|  |                 Email: | ||||||
|  |                   type: string | ||||||
|  |                 Address: | ||||||
|  |                   $ref: "#/components/schemas/Address" | ||||||
|  |                 BirthDate: | ||||||
|  |                   type: string | ||||||
|  |                   description: Follow the iso 8601 ("YYYY-MM-DD") | ||||||
|  |               example: | ||||||
|  |                 { | ||||||
|  |                 "LastName": "Doe" , | ||||||
|  |                 "FirstName": "John", | ||||||
|  |                 "Email": "John.Doe@example.com", | ||||||
|  |                 "Address": { | ||||||
|  |                   "Address": "Rue de Tournais 42", | ||||||
|  |                   "Country": "BE"}, | ||||||
|  |                 "BirthDate": "1941-02-22", | ||||||
|  |                 } | ||||||
|  |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: User created | ||||||
|  |         '401': | ||||||
|  |           $ref: '#/components/responses/UnauthorizedError' | ||||||
|  |     patch: | ||||||
|  |       summary: Change informations about yourself  | ||||||
|  |       tags: | ||||||
|  |         - Users | ||||||
|  |       security: | ||||||
|  |         - bearer: [] | ||||||
|  |       requestBody: | ||||||
|  |         required: true | ||||||
|  |         content: | ||||||
|  |           application/x-www-form-urlencoded: | ||||||
|  |             schema: | ||||||
|  |               $ref: '#/components/schemas/User' | ||||||
|  |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: Successfully changed.  | ||||||
|  |         '401': | ||||||
|  |           $ref: '#/components/responses/UnauthorizedError' | ||||||
|  |   /user/{mat}: | ||||||
|     parameters: |     parameters: | ||||||
|       - name: mat |       - name: mat | ||||||
|         in: path |         in: path | ||||||
| @ -51,42 +120,459 @@ paths: | |||||||
|         required: true |         required: true | ||||||
|         schema: |         schema: | ||||||
|           type: integer |           type: integer | ||||||
|  |  | ||||||
|   /cursus/{id}: |  | ||||||
|     get: |     get: | ||||||
|       summary: Voir les informations sur un Cursus |       summary: Get user's informations  | ||||||
|  |       tags: | ||||||
|  |         - Admin | ||||||
|  |       responses: | ||||||
|  |         '200': | ||||||
|  |           description: User found  | ||||||
|  |           content: | ||||||
|  |             application/json: | ||||||
|  |               schema: | ||||||
|  |                 $ref: "#/components/schemas/User" | ||||||
|  |     patch: | ||||||
|  |       summary: Alter user's informations  | ||||||
|  |       tags: | ||||||
|  |         - Admin | ||||||
|  |       security: | ||||||
|  |         - bearer: [] | ||||||
|  |       requestBody: | ||||||
|  |         required: true | ||||||
|  |         content: | ||||||
|  |           application/x-www-form-urlencoded: | ||||||
|  |             schema: | ||||||
|  |               $ref: '#/components/schemas/User' | ||||||
|  |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: Successfully changed | ||||||
|  |         '401': | ||||||
|  |           $ref: '#/components/responses/UnauthorizedError' | ||||||
|  |   /course: | ||||||
|  |     post: | ||||||
|  |       summary: Create new course  | ||||||
|  |       tags: | ||||||
|  |         - Courses | ||||||
|  |         - Secretariat | ||||||
|  |       security:  | ||||||
|  |         - bearer: [] | ||||||
|  |       requestBody: | ||||||
|  |         required: true | ||||||
|  |         content: | ||||||
|  |           application/x-www-form-urlencoded: | ||||||
|  |             schema: | ||||||
|  |               type: object | ||||||
|  |               properties: | ||||||
|  |                 name: | ||||||
|  |                   type: string | ||||||
|  |                 courses: | ||||||
|  |                   type: array | ||||||
|  |                   items: | ||||||
|  |                     type: string | ||||||
|  |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: course created  | ||||||
|  |         '401': | ||||||
|  |           $ref: '#/components/responses/UnauthorizedError' | ||||||
|  |   /courses/{id}: | ||||||
|  |     get: | ||||||
|  |       summary: see courses informations  | ||||||
|       tags: |       tags: | ||||||
|         - Courses |         - Courses | ||||||
|       responses: |       responses: | ||||||
|         '200': |         '200': | ||||||
|           description: Cursus found |           description: OK | ||||||
|  |           content: | ||||||
|  |             application/json: | ||||||
|  |               schema: | ||||||
|  |                 $ref: '#/components/schemas/Course' | ||||||
|  |     parameters: | ||||||
|  |       - name: id | ||||||
|  |         in: path | ||||||
|  |         required: true | ||||||
|  |         schema: | ||||||
|  |           type: integer | ||||||
|  |     delete: | ||||||
|  |       summary: delete a course  | ||||||
|  |       tags: | ||||||
|  |         - Courses | ||||||
|  |         - Secretariat | ||||||
|  |       security:  | ||||||
|  |         - bearer: [] | ||||||
|  |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: Success | ||||||
|  |         '401': | ||||||
|  |           $ref: '#/components/responses/UnauthorizedError' | ||||||
|  |     patch: | ||||||
|  |       summary: Change course options  | ||||||
|  |       tags: | ||||||
|  |         - Secretariat | ||||||
|  |         - Courses | ||||||
|  |       security: | ||||||
|  |         - bearer: [] | ||||||
|  |       requestBody: | ||||||
|  |         required: true | ||||||
|  |         content: | ||||||
|  |           application/x-www-form-urlencoded: | ||||||
|  |             schema: | ||||||
|  |               type: object | ||||||
|  |               properties: | ||||||
|  |                 name: | ||||||
|  |                   type: string | ||||||
|  |                 credits: | ||||||
|  |                   type: integer | ||||||
|  |                 faculty: | ||||||
|  |                   type: string | ||||||
|  |                 teachers: | ||||||
|  |                   type: object | ||||||
|  |                   $ref: '#/components/schemas/User' | ||||||
|  |                 assistants: | ||||||
|  |                   type: array | ||||||
|  |                   items: | ||||||
|  |                     $ref: '#/components/schemas/User' | ||||||
|  |               example: | ||||||
|  |                 { | ||||||
|  |                 "name": "Math pour l'info", | ||||||
|  |                 "credits": 11, | ||||||
|  |                 "faculty": "science", | ||||||
|  |                 "Teacher": , | ||||||
|  |                 "Assistants": [ ] | ||||||
|  |                 } | ||||||
|  |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: Course modified | ||||||
|  |         '401': | ||||||
|  |           $ref: '#/components/responses/UnauthorizedError' | ||||||
|  |            | ||||||
|  |   /cursus: | ||||||
|  |     post: | ||||||
|  |       summary: Create a cursus | ||||||
|  |       tags: | ||||||
|  |         - cursus | ||||||
|  |       security:  | ||||||
|  |         - bearer: [] | ||||||
|  |       requestBody: | ||||||
|  |         required: true | ||||||
|  |         content: | ||||||
|  |           application/x-www-form-urlencoded: | ||||||
|  |             schema: | ||||||
|  |               type: object | ||||||
|  |               properties: | ||||||
|  |                 name: | ||||||
|  |                   type: string | ||||||
|  |                 courses:  | ||||||
|  |                   type: array  | ||||||
|  |                   items: | ||||||
|  |                     type: integer | ||||||
|  |                     description: id of courses | ||||||
|  |               example: | ||||||
|  |                 { | ||||||
|  |                 "name": "Bac1", | ||||||
|  |                 [] | ||||||
|  |                 } | ||||||
|  |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: Cursus created  | ||||||
|  |         '401': | ||||||
|  |           $ref: '#/components/responses/UnauthorizedError' | ||||||
|  |   /cursus/{id}: | ||||||
|  |     get: | ||||||
|  |       summary: See Cursus's informations  | ||||||
|  |       tags: | ||||||
|  |         - cursus | ||||||
|  |       responses: | ||||||
|  |         '200': | ||||||
|  |           description: OK | ||||||
|           content: |           content: | ||||||
|             application/json: |             application/json: | ||||||
|               schema: |               schema: | ||||||
|                 $ref: '#/components/schemas/Cursus' |                 $ref: '#/components/schemas/Cursus' | ||||||
|   /courses/{id}: |     parameters: | ||||||
|     get: |       - name: id | ||||||
|       summary: Voir les informations sur un cours* |         in: path | ||||||
|       tags: |         required: true | ||||||
|         - Courses |         schema: | ||||||
|       responses: |           type: integer | ||||||
|      |  | ||||||
|     put: |  | ||||||
|       summary: Créer un nouveau cours |  | ||||||
|       tags: |  | ||||||
|         - Courses |  | ||||||
|       security:  |  | ||||||
|         - bearer: [] |  | ||||||
|       responses: |  | ||||||
|  |  | ||||||
|     delete: |     delete: | ||||||
|       summary: Suprimer un cours |       summary: Delete cursus | ||||||
|       tags: |       tags: | ||||||
|         - Courses |         - cursus | ||||||
|       security:  |       security:  | ||||||
|         - bearer: [] |         - bearer: [] | ||||||
|       responses: |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: Success | ||||||
|  |         '401': | ||||||
|  |           $ref: '#/components/responses/UnauthorizedError' | ||||||
|  |     patch: | ||||||
|  |       summary: Modify cursus  | ||||||
|  |       tags: | ||||||
|  |         - cursus | ||||||
|  |       security: | ||||||
|  |         - bearer: [] | ||||||
|  |       requestBody: | ||||||
|  |         required: true | ||||||
|  |         content: | ||||||
|  |           application/x-www-form-urlencoded: | ||||||
|  |             schema: | ||||||
|  |               type: object | ||||||
|  |               properties: | ||||||
|  |                 name: | ||||||
|  |                   type: string | ||||||
|  |                 credits: | ||||||
|  |                   type: integer | ||||||
|  |                 faculty: | ||||||
|  |                   type: string | ||||||
|  |                 teachers: | ||||||
|  |                   type: object | ||||||
|  |                   $ref: '#/components/schemas/User' | ||||||
|  |                 assistants: | ||||||
|  |                   type: array | ||||||
|  |                   items: | ||||||
|  |                     $ref: '#/components/schemas/User' | ||||||
|  |               example: | ||||||
|  |                 { | ||||||
|  |                 "name": "Math pour l'info", | ||||||
|  |                 "credits": 11, | ||||||
|  |                 "faculty": "science", | ||||||
|  |                 "Teacher": , | ||||||
|  |                 "Assistants": [ ] | ||||||
|  |                 } | ||||||
|  |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: Cursus modified  | ||||||
|  |         '401': | ||||||
|  |           $ref: '#/components/responses/UnauthorizedError' | ||||||
|  |            | ||||||
|  |   /lesson: | ||||||
|  |     post: | ||||||
|  |       summary: Create a new lesson | ||||||
|  |       tags: | ||||||
|  |         - Secretariat | ||||||
|  |         - lesson | ||||||
|  |       security:  | ||||||
|  |         - bearer: [] | ||||||
|  |       requestBody: | ||||||
|  |         required: true | ||||||
|  |         content: | ||||||
|  |           application/x-www-form-urlencoded: | ||||||
|  |             schema: | ||||||
|  |               type: object | ||||||
|  |               properties: | ||||||
|  |                 date: | ||||||
|  |                   type: string | ||||||
|  |                   description: Follow the iso 8601 ("YYYY-MM-DD") | ||||||
|  |                 IDcourse: | ||||||
|  |                   type: integer | ||||||
|  |                 duration: | ||||||
|  |                   type: number | ||||||
|  |                 classroom: | ||||||
|  |                   type: string | ||||||
|  |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: Lesson created  | ||||||
|  |         '401': | ||||||
|  |           $ref: '#/components/responses/UnauthorizedError' | ||||||
|  |   /lesson/{id}: | ||||||
|  |     parameters: | ||||||
|  |       - name: id | ||||||
|  |         in: path | ||||||
|  |         required: true | ||||||
|  |         schema: | ||||||
|  |           type: integer | ||||||
|  |     get: | ||||||
|  |       summary : See lesson's informations | ||||||
|  |       tags: | ||||||
|  |         - Users | ||||||
|  |         - lesson | ||||||
|  |       responses: | ||||||
|  |         '200': | ||||||
|  |           description: OK | ||||||
|  |           content: | ||||||
|  |             application/json: | ||||||
|  |               schema: | ||||||
|  |                 $ref: '#/components/schemas/Lesson' | ||||||
|  |     patch: | ||||||
|  |       summary : Modify Lesson | ||||||
|  |       tags: | ||||||
|  |         - Secretariat | ||||||
|  |         - lesson | ||||||
|  |       security: | ||||||
|  |         - bearer: [] | ||||||
|  |       requestBody: | ||||||
|  |         required: true | ||||||
|  |         content: | ||||||
|  |           application/x-www-form-urlencoded: | ||||||
|  |              schema: | ||||||
|  |               type: object | ||||||
|  |               properties: | ||||||
|  |                 date: | ||||||
|  |                   type: string | ||||||
|  |                   description: Follow the iso 8601 ("YYYY-MM-DD") | ||||||
|  |                 IDcourse: | ||||||
|  |                   type: integer | ||||||
|  |                 duration: | ||||||
|  |                   type: number | ||||||
|  |                 classroom: | ||||||
|  |                   type: string | ||||||
|  |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: Lesson modified | ||||||
|  |         '401': | ||||||
|  |           $ref: '#/components/responses/UnauthorizedError' | ||||||
|  |            | ||||||
|  |     delete: | ||||||
|  |       summary: Delete lesson | ||||||
|  |       tags: | ||||||
|  |         - lesson | ||||||
|  |         - Secretariat | ||||||
|  |       security:  | ||||||
|  |         - bearer: [] | ||||||
|  |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: Success | ||||||
|  |         '401': | ||||||
|  |           $ref: '#/components/responses/UnauthorizedError' | ||||||
|  |   /request: | ||||||
|  |     post: | ||||||
|  |       summary: Create a new request | ||||||
|  |       tags: | ||||||
|  |         - Teacher | ||||||
|  |         - request | ||||||
|  |       requestBody: | ||||||
|  |         required: true | ||||||
|  |         content: | ||||||
|  |           application/x-www-form-urlencoded: | ||||||
|  |             schema: | ||||||
|  |               type: object | ||||||
|  |               properties: | ||||||
|  |                 id: | ||||||
|  |                   type: integer | ||||||
|  |                 requestType: | ||||||
|  |                   type: string | ||||||
|  |                 lessonId: | ||||||
|  |                   type: integer | ||||||
|  |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: Request created  | ||||||
|  |   /request/{id}: | ||||||
|  |     parameters: | ||||||
|  |       - name: id | ||||||
|  |         in: path | ||||||
|  |         required: true | ||||||
|  |         schema: | ||||||
|  |           type: integer | ||||||
|  |     get: | ||||||
|  |       summary : See request information | ||||||
|  |       tags: | ||||||
|  |         - Teacher | ||||||
|  |         - Secretariat | ||||||
|  |         - request | ||||||
|  |       responses: | ||||||
|  |         '200': | ||||||
|  |           description: OK | ||||||
|  |           content: | ||||||
|  |             application/json: | ||||||
|  |               schema: | ||||||
|  |                 $ref: '#/components/schemas/Request' | ||||||
|  |     patch: | ||||||
|  |       summary : Modify request | ||||||
|  |       tags: | ||||||
|  |         - Teacher | ||||||
|  |         - request | ||||||
|  |       requestBody: | ||||||
|  |         required: true | ||||||
|  |         content: | ||||||
|  |           application/x-www-form-urlencoded: | ||||||
|  |              schema: | ||||||
|  |               type: object | ||||||
|  |               properties: | ||||||
|  |                 id: | ||||||
|  |                   type: integer | ||||||
|  |                 requestType: | ||||||
|  |                   type: string | ||||||
|  |                 lessonId: | ||||||
|  |                   type: integer | ||||||
|  |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: Request modified | ||||||
|  |     delete: | ||||||
|  |       summary: Delete request | ||||||
|  |       tags: | ||||||
|  |         - Teacher | ||||||
|  |         - Secretariat | ||||||
|  |         - request | ||||||
|  |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: Success | ||||||
|  |    | ||||||
|  |   /display: | ||||||
|  |     post: | ||||||
|  |         summary: Create a new display | ||||||
|  |         tags: | ||||||
|  |           - display | ||||||
|  |         requestBody: | ||||||
|  |           required: true | ||||||
|  |           content: | ||||||
|  |             application/x-www-form-urlencoded: | ||||||
|  |               schema: | ||||||
|  |                 type: object | ||||||
|  |                 properties: | ||||||
|  |                   id: | ||||||
|  |                    type: integer | ||||||
|  |                   time: | ||||||
|  |                     type: string | ||||||
|  |                   display: | ||||||
|  |                     type: string | ||||||
|  |                   userId: | ||||||
|  |                     type: integer | ||||||
|  |         responses: | ||||||
|  |           '201': | ||||||
|  |             description: display created  | ||||||
|  |            | ||||||
|  |   /display/{id}: | ||||||
|  |     parameters: | ||||||
|  |         - name: id | ||||||
|  |           in: path | ||||||
|  |           required: true | ||||||
|  |           schema: | ||||||
|  |             type: integer | ||||||
|  |     get: | ||||||
|  |       summary : See display information | ||||||
|  |       tags: | ||||||
|  |         - Users | ||||||
|  |         - display | ||||||
|  |       responses: | ||||||
|  |         '200': | ||||||
|  |           description: OK | ||||||
|  |           content: | ||||||
|  |             application/json: | ||||||
|  |               schema: | ||||||
|  |                 $ref: '#/components/schemas/Display' | ||||||
|  |     patch: | ||||||
|  |       summary : Modify display | ||||||
|  |       tags: | ||||||
|  |         - Users | ||||||
|  |         - display | ||||||
|  |       requestBody: | ||||||
|  |         required: true | ||||||
|  |         content: | ||||||
|  |           application/x-www-form-urlencoded: | ||||||
|  |              schema: | ||||||
|  |               type: object | ||||||
|  |               properties: | ||||||
|  |                   id: | ||||||
|  |                    type: integer | ||||||
|  |                   time: | ||||||
|  |                     type: string | ||||||
|  |                   display: | ||||||
|  |                     type: string | ||||||
|  |                   userId: | ||||||
|  |                     type: integer | ||||||
|  |       responses: | ||||||
|  |         '201': | ||||||
|  |           description: Display modified | ||||||
|      |      | ||||||
| components: | components: | ||||||
|   securitySchemes: |   securitySchemes: | ||||||
| @ -97,54 +583,82 @@ components: | |||||||
|     User: |     User: | ||||||
|       type: object  |       type: object  | ||||||
|       properties: |       properties: | ||||||
|         RegNo: |         regNo: | ||||||
|           type: integer |           type: integer | ||||||
|         Photo: |         photo: | ||||||
|           type: object |           type: object | ||||||
|         LastName:  |         lastName:  | ||||||
|           type: string |           type: string | ||||||
|         FirstName: |         firstName: | ||||||
|           type: string |           type: string | ||||||
|         Email: |         email: | ||||||
|           type: string |           type: string | ||||||
|         Address: |         address: | ||||||
|           $ref: "#/components/schemas/Address" |           $ref: "#/components/schemas/Address" | ||||||
|         BirthDate: |         birthDate: | ||||||
|           type: string |           type: string | ||||||
|           description: Follow the iso 8601 ("YYYY-MM-DD") |           description: Follow the iso 8601 ("YYYY-MM-DD") | ||||||
|         StaffMember: |  | ||||||
|           type: boolean |  | ||||||
|       example: |       example: | ||||||
|         { |         { | ||||||
|         "RegNo": 42, |         "regNo": 42, | ||||||
|         "LastName": "Doe" , |         "lastName": "Doe" , | ||||||
|         "FirstName": "John", |         "firstName": "John", | ||||||
|         "Email": "John.Doe@example.com", |         "email": "John.Doe@example.com", | ||||||
|         "Address": { |         "address": { | ||||||
|           "Address": "Rue de Tounais 42", |           "address": "Rue de Tounais 42", | ||||||
|           "Country": "BE"}, |           "country": "BE"}, | ||||||
|         "BirthDate": "1941-02-22", |         "birthDate": "1941-02-22", | ||||||
|         "StaffMember": true |         "staffMember": true, | ||||||
|         } |         } | ||||||
|     Address: |     Address: | ||||||
|       type: object |       type: object | ||||||
|       properties: |       properties: | ||||||
|         Address: |         address: | ||||||
|           type: string |           type: string | ||||||
|         Country: |         country: | ||||||
|           type: string |           type: string | ||||||
|           description: Follow the ISO-3166-1 alpha-2 standard. |           description: Follow the ISO-3166-1 alpha-2 standard. | ||||||
|       example: |       example: | ||||||
|         { |         { | ||||||
|           "Address": "Rue de Tounais 42", |           "address": "Rue de Tounais 42", | ||||||
|           "Country": "BE" |           "country": "BE" | ||||||
|  |         } | ||||||
|  |     Course: | ||||||
|  |       type: object | ||||||
|  |       properties: | ||||||
|  |         id: | ||||||
|  |           type: integer | ||||||
|  |         name: | ||||||
|  |           type: string | ||||||
|  |         credits: | ||||||
|  |           type: integer | ||||||
|  |         faculty: | ||||||
|  |           type: string | ||||||
|  |         teachers: | ||||||
|  |           type: integer  | ||||||
|  |           description: user's id  | ||||||
|  |         assistants: | ||||||
|  |           type: array | ||||||
|  |           items: | ||||||
|  |             type: integer | ||||||
|  |             description: user's id | ||||||
|  |       example: | ||||||
|  |         { | ||||||
|  |         "id": 42, | ||||||
|  |         "name": "Math pour l'info", | ||||||
|  |         "credits": 11, | ||||||
|  |         "faculty": "science", | ||||||
|  |         "Teacher": 42, | ||||||
|  |         "Assistants": [ ] | ||||||
|         } |         } | ||||||
|     Cursus: |     Cursus: | ||||||
|       type: object |       type: object | ||||||
|       properties: |       properties: | ||||||
|         Id: |         id: | ||||||
|           type: integer |           type: integer | ||||||
|         Courses: |         name: | ||||||
|  |           type: string | ||||||
|  |         courses: | ||||||
|           type: array |           type: array | ||||||
|           items: |           items: | ||||||
|             type: string |             type: string | ||||||
| @ -153,6 +667,63 @@ components: | |||||||
|         "id": 42, |         "id": 42, | ||||||
|         "courses": ['Math', 'Info'] |         "courses": ['Math', 'Info'] | ||||||
|         } |         } | ||||||
|  |     Lesson : | ||||||
|  |       type: object | ||||||
|  |       properties: | ||||||
|  |         id: | ||||||
|  |           type: integer | ||||||
|  |         date: | ||||||
|  |           type: string | ||||||
|  |           description: Follow the iso 8601 ("YYYY-MM-DD") | ||||||
|  |         duration: | ||||||
|  |           type: number | ||||||
|  |           description: duration of a course in hours | ||||||
|  |         classroom: | ||||||
|  |           type: string | ||||||
|  |         course: | ||||||
|  |           $ref: "#/components/schemas/Course" | ||||||
|  |       example: | ||||||
|  |         { | ||||||
|  |           "id": 12, | ||||||
|  |           "date": "2023-12-01", | ||||||
|  |           "duration": 1.5, | ||||||
|  |           "classroom": "AMPHI01", | ||||||
|  |           "course": } | ||||||
|  |     Request: | ||||||
|  |       type: object | ||||||
|  |       properties: | ||||||
|  |         id: | ||||||
|  |           type: integer | ||||||
|  |         requestType: | ||||||
|  |           type: string | ||||||
|  |         lessonId: | ||||||
|  |           type: integer | ||||||
|  |       example: | ||||||
|  |         { | ||||||
|  |           "id": 12, | ||||||
|  |           "requestType": "delete", | ||||||
|  |           "lessonId": 72 | ||||||
|  |         } | ||||||
|  |     Display: | ||||||
|  |       type: object | ||||||
|  |       properties: | ||||||
|  |         id: | ||||||
|  |           type: integer | ||||||
|  |         time: | ||||||
|  |           type: string | ||||||
|  |           description: Define the period displayed on the schedule (week,month,quadrimester..) | ||||||
|  |         display: | ||||||
|  |           type: string | ||||||
|  |         userId: | ||||||
|  |           type: integer | ||||||
|  |           description: Id of the user who owns this display | ||||||
|  |       example: | ||||||
|  |         { | ||||||
|  |           "id": 12, | ||||||
|  |           "time": "month", | ||||||
|  |           "display": "grid", | ||||||
|  |           "UserId": 12 | ||||||
|  |         } | ||||||
|   responses: |   responses: | ||||||
|     UnauthorizedError: |     UnauthorizedError: | ||||||
|       description: Access token is missing or invalid |       description: Unauthorized access or missing bearer  | ||||||
		Reference in New Issue
	
	Block a user