From 8100978e354d685b0a3f999f2aec0dfc94c97a0c Mon Sep 17 00:00:00 2001 From: LeoMoulin Date: Fri, 8 Dec 2023 15:05:33 +0100 Subject: [PATCH 1/7] ajout de ReqRequest post et get et ajout de RegRequests tkt le s --- Documents/proto/general/openapi.yaml | 118 ++++++++++++++++++++++++++- 1 file changed, 117 insertions(+), 1 deletion(-) diff --git a/Documents/proto/general/openapi.yaml b/Documents/proto/general/openapi.yaml index 028edc6..3c26c22 100644 --- a/Documents/proto/general/openapi.yaml +++ b/Documents/proto/general/openapi.yaml @@ -286,6 +286,8 @@ paths: description: Nouveau cursus crée '401': $ref: '#/components/responses/UnauthorizedError' + + /cursus/{id}: get: summary: Voir les informations sur un cursus @@ -356,6 +358,68 @@ paths: $ref: '#/components/responses/UnauthorizedError' + /RegRequests: + get : + summary : Get an array of every register requests + tags : + - RegisterRequests + responses : + '200': + description : OK + content : + application/json : + schema : + type : array + items : + $ref : '#/components/schemas/RegRequests' + + + + + + /RegRequest/{id}: + get : + summary : Get all the data composing a register request + tags : + - RegisterRequests + responses : + '200': + description : OK + content : + application/json : + schema : + type : object + properties: + $ref : '#/components/schemas/RegRequest' + + parameters: + - name: id + in: path + description: id of a regRequest + required: true + schema: + type: integer + + + /RegRequest: + post : + summary: Add a new student + tags : + - RegisterRequests + security: + - bearer: [] + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RegRequest' + responses: + '201': + description: New student created + '401': + $ref: '#/components/responses/UnauthorizedError' + components: securitySchemes: bearer: @@ -417,7 +481,6 @@ components: faculty: type: string teachers: - type: object $ref: '#/components/schemas/User' assistants: type: array @@ -448,6 +511,59 @@ components: "id": 42, "courses": ['Math', 'Info'] } + RegRequest: + type : object + properties: + id: + type : integer + Name : + type: string + Firstname : + type : string + Address : + $ref: "#/components/schemas/Address" + Email: + type : string + BirthDate: + type : string + description: Follow the iso 8601 ("YYYY-MM-DD") + Cursus: + type : integer + description : ID of a specific cursus + Photo: + type : string + description: Path of the picture that the user uploaded + + IdentityCard: + type : string + description: Path of the picture of the user's identity card + Degree: + type : string + description: Path of the pdf containing the user's degree + Certificate: + type : string + description: Path of the pdf containing the user's admission certificate (optionnal) + ForeignerCertificate: + type : string + description: Path of the pdf containing the user's foreigner certificate (optionnal) + State: + type : string + + RegRequests: + type : object + properties: + id : + type : integer + Firstname : + type : string + Name : + type : string + Date : + type : string + description : Follow the iso 8601 ("YYYY-MM-DD") + State : + type : string + responses: UnauthorizedError: description: Permission non accordée -- 2.46.0 From 662da800391d80576d1b1f32cf68988acd6291c6 Mon Sep 17 00:00:00 2001 From: LeoMoulin Date: Sat, 9 Dec 2023 12:17:31 +0100 Subject: [PATCH 2/7] =?UTF-8?q?Ajout=20des=20D=C3=A9sinscriptions=20R?= =?UTF-8?q?=C3=A9inscriptions=20et=20Demande=20de=20Bourses=20ainsi=20que?= =?UTF-8?q?=20des=20demandes=20de=20dispenses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plus que les endpoints a faire :) --- Documents/proto/general/openapi.yaml | 72 +++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/Documents/proto/general/openapi.yaml b/Documents/proto/general/openapi.yaml index 3c26c22..4e799d7 100644 --- a/Documents/proto/general/openapi.yaml +++ b/Documents/proto/general/openapi.yaml @@ -400,7 +400,27 @@ paths: schema: type: integer - + patch: + summary: Change the state of a register request + tags: + - RegisterRequests + security: + - bearer: [] + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + State: + type: string + responses: + '201': + description: State modified + '401': + $ref: '#/components/responses/UnauthorizedError' + /RegRequest: post : summary: Add a new student @@ -563,6 +583,56 @@ components: description : Follow the iso 8601 ("YYYY-MM-DD") State : type : string + + + ReRegRequest: + type : object + properties : + id : + type : integer + RegNo : + type : integer + NewCursusid : + type : integer + State : + type : string + + + SSRequests: + type : object + properties : + id : + type : integer + RegNo : + type : integer + Amount : + type : integer + Document : + type : string + description : justification document for a scholarship + + UnRegRequest : + type : object + properties : + id : + type : integer + RegNo : + type : integer + State : + type : string + + ExempRequest : + type : object + properties : + id: + type : integer + RegNo : + type : integer + Courseid : + type : integer + State : + type : string + responses: UnauthorizedError: -- 2.46.0 From e5717e4c3df0e65d4a8ec59a4d8629537d8cde7a Mon Sep 17 00:00:00 2001 From: LeoMoulin Date: Sat, 9 Dec 2023 20:24:43 +0100 Subject: [PATCH 3/7] Ajout des endpoints de mon extension zartek --- Documents/proto/general/openapi.yaml | 296 ++++++++++++++++++++++++++- 1 file changed, 291 insertions(+), 5 deletions(-) diff --git a/Documents/proto/general/openapi.yaml b/Documents/proto/general/openapi.yaml index 4e799d7..df76c14 100644 --- a/Documents/proto/general/openapi.yaml +++ b/Documents/proto/general/openapi.yaml @@ -374,9 +374,6 @@ paths: $ref : '#/components/schemas/RegRequests' - - - /RegRequest/{id}: get : summary : Get all the data composing a register request @@ -423,7 +420,7 @@ paths: /RegRequest: post : - summary: Add a new student + summary: Add a new register request tags : - RegisterRequests security: @@ -440,6 +437,295 @@ paths: '401': $ref: '#/components/responses/UnauthorizedError' + /ReRegRequest: + get : + summary : Get an array of every reregister requests + tags : + - ReregisterRequests + responses : + '200': + description : OK + content : + application/json : + schema : + type : array + items : + $ref : '#/components/schemas/ReRegRequest' + post : + summary: Add a new ReRegister request + tags : + - ReregisterRequests + security: + - bearer: [] + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ReRegRequest' + responses: + '201': + description: New ReRegister request created + '401': + $ref: '#/components/responses/UnauthorizedError' + + /ReRegRequest/{id}: + parameters: + - name: id + in: path + description: id of a reregistrationrequest + required: true + schema: + type: integer + get: + summary : get the data of a single reregistration request + tags : + - ReregisterRequests + responses : + '200': + description : OK + content : + application/json : + schema : + $ref : '#/components/schemas/ReRegRequest' + patch: + summary: Change the state of a reregister request + tags: + - ReregisterRequests + security: + - bearer: [] + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + State: + type: string + responses: + '201': + description: State modified + '401': + $ref: '#/components/responses/UnauthorizedError' + /SSRequest: + get : + summary : Get an array of every scholarship requests + tags : + - ScholarshipRequests + responses : + '200': + description : OK + content : + application/json : + schema : + type : array + items : + $ref : '#/components/schemas/SSRequest' + post : + summary: Add a new scholarship request + tags : + - ScholarshipRequests + security: + - bearer: [] + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SSRequest' + responses: + '201': + description: New scholarship request created + '401': + $ref: '#/components/responses/UnauthorizedError' + + /SSRequest/{id}: + parameters: + - name: id + in: path + description: id of a scholarshiprequest + required: true + schema: + type: integer + get: + summary : get the data of a single scholarship request + tags : + - ScholarshipRequests + responses : + '200': + description : OK + content : + application/json : + schema : + $ref : '#/components/schemas/SSRequest' + patch: + summary: Change the state of a scholarship request + tags: + - ScholarshipRequests + security: + - bearer: [] + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + State: + type: string + responses: + '201': + description: State modified + '401': + $ref: '#/components/responses/UnauthorizedError' + + + /UnRegRequest: + get : + summary : Get an array of every unregister requests + tags : + - UnregisterRequests + responses : + '200': + description : OK + content : + application/json : + schema : + type : array + items : + $ref : '#/components/schemas/UnRegRequest' + post : + summary: Add a new unregister request + tags : + - UnregisterRequests + security: + - bearer: [] + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/UnRegRequest' + responses: + '201': + description: New unregister request created + '401': + $ref: '#/components/responses/UnauthorizedError' + + /UnRegRequest{id}: + parameters: + - name: id + in: path + description: id of a unregistrationrequest + required: true + schema: + type: integer + get: + summary : get the data of a single unregistration request + tags : + - UnregisterRequests + responses : + '200': + description : OK + content : + application/json : + schema : + $ref : '#/components/schemas/UnRegRequest' + patch: + summary: Change the state of a unregister request + tags: + - UnregisterRequests + security: + - bearer: [] + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + State: + type: string + responses: + '201': + description: State modified + '401': + $ref: '#/components/responses/UnauthorizedError' + + /ExempRequest: + get : + summary : Get an array of every exemptions requests + tags : + - ExemptionRequests + responses : + '200': + description : OK + content : + application/json : + schema : + type : array + items : + $ref : '#/components/schemas/ExempRequest' + + post : + summary: Add a new exemption request + tags : + - ExemptionRequests + security: + - bearer: [] + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ExempRequest' + responses: + '201': + description: New exemption request created + '401': + $ref: '#/components/responses/UnauthorizedError' + + + /ExempRequest/{id}: + parameters: + - name: id + in: path + description: id of a exemption request + required: true + schema: + type: integer + get: + summary : get the data of a single exemption request + tags : + - ExemptionRequests + responses : + '200': + description : OK + content : + application/json : + schema : + $ref : '#/components/schemas/ExempRequest' + patch: + summary: Change the state of a exemption request + tags: + - ExemptionRequests + security: + - bearer: [] + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + State: + type: string + responses: + '201': + description: State modified + '401': + $ref: '#/components/responses/UnauthorizedError' components: securitySchemes: bearer: @@ -598,7 +884,7 @@ components: type : string - SSRequests: + SSRequest: type : object properties : id : -- 2.46.0 From 83b85fc63cb8669e6bd117c5fc016bba67f3fa4d Mon Sep 17 00:00:00 2001 From: LeoMoulin Date: Mon, 11 Dec 2023 11:35:40 +0100 Subject: [PATCH 4/7] Ajoute le tag de mon extension https://www.youtube.com/watch?v=QwLvrnlfdNo --- Documents/proto/general/openapi.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documents/proto/general/openapi.yaml b/Documents/proto/general/openapi.yaml index 0f2c814..7d785bf 100644 --- a/Documents/proto/general/openapi.yaml +++ b/Documents/proto/general/openapi.yaml @@ -373,6 +373,7 @@ paths: summary : Get an array of every register requests tags : - RegisterRequests + - StudentRegistration responses : '200': description : OK @@ -389,6 +390,7 @@ paths: summary : Get all the data composing a register request tags : - RegisterRequests + - StudentRegistration responses : '200': description : OK @@ -411,6 +413,7 @@ paths: summary: Change the state of a register request tags: - RegisterRequests + - StudentRegistration security: - bearer: [] requestBody: @@ -433,6 +436,7 @@ paths: summary: Add a new register request tags : - RegisterRequests + - StudentRegistration security: - bearer: [] requestBody: @@ -452,6 +456,7 @@ paths: summary : Get an array of every reregister requests tags : - ReregisterRequests + - StudentRegistration responses : '200': description : OK @@ -465,6 +470,7 @@ paths: summary: Add a new ReRegister request tags : - ReregisterRequests + - StudentRegistration security: - bearer: [] requestBody: @@ -491,6 +497,7 @@ paths: summary : get the data of a single reregistration request tags : - ReregisterRequests + - StudentRegistration responses : '200': description : OK @@ -502,6 +509,7 @@ paths: summary: Change the state of a reregister request tags: - ReregisterRequests + - StudentRegistration security: - bearer: [] requestBody: @@ -523,6 +531,7 @@ paths: summary : Get an array of every scholarship requests tags : - ScholarshipRequests + - StudentRegistration responses : '200': description : OK @@ -536,6 +545,7 @@ paths: summary: Add a new scholarship request tags : - ScholarshipRequests + - StudentRegistration security: - bearer: [] requestBody: @@ -562,6 +572,7 @@ paths: summary : get the data of a single scholarship request tags : - ScholarshipRequests + - StudentRegistration responses : '200': description : OK @@ -573,6 +584,7 @@ paths: summary: Change the state of a scholarship request tags: - ScholarshipRequests + - StudentRegistration security: - bearer: [] requestBody: @@ -596,6 +608,7 @@ paths: summary : Get an array of every unregister requests tags : - UnregisterRequests + - StudentRegistration responses : '200': description : OK @@ -609,6 +622,7 @@ paths: summary: Add a new unregister request tags : - UnregisterRequests + - StudentRegistration security: - bearer: [] requestBody: @@ -635,6 +649,7 @@ paths: summary : get the data of a single unregistration request tags : - UnregisterRequests + - StudentRegistration responses : '200': description : OK @@ -646,6 +661,7 @@ paths: summary: Change the state of a unregister request tags: - UnregisterRequests + - StudentRegistration security: - bearer: [] requestBody: @@ -668,6 +684,7 @@ paths: summary : Get an array of every exemptions requests tags : - ExemptionRequests + - StudentRegistration responses : '200': description : OK @@ -682,6 +699,7 @@ paths: summary: Add a new exemption request tags : - ExemptionRequests + - StudentRegistration security: - bearer: [] requestBody: @@ -709,6 +727,7 @@ paths: summary : get the data of a single exemption request tags : - ExemptionRequests + - StudentRegistration responses : '200': description : OK @@ -720,6 +739,7 @@ paths: summary: Change the state of a exemption request tags: - ExemptionRequests + - StudentRegistration security: - bearer: [] requestBody: -- 2.46.0 From bab117a421d1916044965d36204485fc3e6c3f8c Mon Sep 17 00:00:00 2001 From: LeoMoulin Date: Mon, 11 Dec 2023 12:12:17 +0100 Subject: [PATCH 5/7] TRAVAIL TERMINE ! --- Documents/proto/general/openapi.yaml | 40 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/Documents/proto/general/openapi.yaml b/Documents/proto/general/openapi.yaml index 7d785bf..244ebab 100644 --- a/Documents/proto/general/openapi.yaml +++ b/Documents/proto/general/openapi.yaml @@ -373,7 +373,7 @@ paths: summary : Get an array of every register requests tags : - RegisterRequests - - StudentRegistration + - Ext (Student Registration) responses : '200': description : OK @@ -390,7 +390,7 @@ paths: summary : Get all the data composing a register request tags : - RegisterRequests - - StudentRegistration + - Ext (Student Registration) responses : '200': description : OK @@ -413,7 +413,7 @@ paths: summary: Change the state of a register request tags: - RegisterRequests - - StudentRegistration + - Ext (Student Registration) security: - bearer: [] requestBody: @@ -436,7 +436,7 @@ paths: summary: Add a new register request tags : - RegisterRequests - - StudentRegistration + - Ext (Student Registration) security: - bearer: [] requestBody: @@ -456,7 +456,7 @@ paths: summary : Get an array of every reregister requests tags : - ReregisterRequests - - StudentRegistration + - Ext (Student Registration) responses : '200': description : OK @@ -470,7 +470,7 @@ paths: summary: Add a new ReRegister request tags : - ReregisterRequests - - StudentRegistration + - Ext (Student Registration) security: - bearer: [] requestBody: @@ -497,7 +497,7 @@ paths: summary : get the data of a single reregistration request tags : - ReregisterRequests - - StudentRegistration + - Ext (Student Registration) responses : '200': description : OK @@ -509,7 +509,7 @@ paths: summary: Change the state of a reregister request tags: - ReregisterRequests - - StudentRegistration + - Ext (Student Registration) security: - bearer: [] requestBody: @@ -531,7 +531,7 @@ paths: summary : Get an array of every scholarship requests tags : - ScholarshipRequests - - StudentRegistration + - Ext (Student Registration) responses : '200': description : OK @@ -545,7 +545,7 @@ paths: summary: Add a new scholarship request tags : - ScholarshipRequests - - StudentRegistration + - Ext (Student Registration) security: - bearer: [] requestBody: @@ -572,7 +572,7 @@ paths: summary : get the data of a single scholarship request tags : - ScholarshipRequests - - StudentRegistration + - Ext (Student Registration) responses : '200': description : OK @@ -584,7 +584,7 @@ paths: summary: Change the state of a scholarship request tags: - ScholarshipRequests - - StudentRegistration + - Ext (Student Registration) security: - bearer: [] requestBody: @@ -608,7 +608,7 @@ paths: summary : Get an array of every unregister requests tags : - UnregisterRequests - - StudentRegistration + - Ext (Student Registration) responses : '200': description : OK @@ -622,7 +622,7 @@ paths: summary: Add a new unregister request tags : - UnregisterRequests - - StudentRegistration + - Ext (Student Registration) security: - bearer: [] requestBody: @@ -649,7 +649,7 @@ paths: summary : get the data of a single unregistration request tags : - UnregisterRequests - - StudentRegistration + - Ext (Student Registration) responses : '200': description : OK @@ -661,7 +661,7 @@ paths: summary: Change the state of a unregister request tags: - UnregisterRequests - - StudentRegistration + - Ext (Student Registration) security: - bearer: [] requestBody: @@ -684,7 +684,7 @@ paths: summary : Get an array of every exemptions requests tags : - ExemptionRequests - - StudentRegistration + - Ext (Student Registration) responses : '200': description : OK @@ -699,7 +699,7 @@ paths: summary: Add a new exemption request tags : - ExemptionRequests - - StudentRegistration + - Ext (Student Registration) security: - bearer: [] requestBody: @@ -727,7 +727,7 @@ paths: summary : get the data of a single exemption request tags : - ExemptionRequests - - StudentRegistration + - Ext (Student Registration) responses : '200': description : OK @@ -739,7 +739,7 @@ paths: summary: Change the state of a exemption request tags: - ExemptionRequests - - StudentRegistration + - Ext (Student Registration) security: - bearer: [] requestBody: -- 2.46.0 From aacf1eef6c63b32e02e0b3318d2c9b4df8c008d8 Mon Sep 17 00:00:00 2001 From: LeoMoulin Date: Tue, 12 Dec 2023 12:01:45 +0100 Subject: [PATCH 6/7] Applique vos remarques --- Documents/proto/general/openapi.yaml | 474 ++++++--------------------- 1 file changed, 102 insertions(+), 372 deletions(-) diff --git a/Documents/proto/general/openapi.yaml b/Documents/proto/general/openapi.yaml index 244ebab..9c28926 100644 --- a/Documents/proto/general/openapi.yaml +++ b/Documents/proto/general/openapi.yaml @@ -367,12 +367,13 @@ paths: '401': $ref: '#/components/responses/UnauthorizedError' - - /RegRequests: - get : - summary : Get an array of every register requests + + + /Requests/{type}: + get: + summary: Give an array of every requests of the specified type tags : - - RegisterRequests + - Requests - Ext (Student Registration) responses : '200': @@ -382,14 +383,81 @@ paths: schema : type : array items : - $ref : '#/components/schemas/RegRequests' - - - /RegRequest/{id}: - get : - summary : Get all the data composing a register request + oneOf: + - type : object + properties: + id : + type : integer + Firstname : + type : string + Name : + type : string + Date : + type : string + description : Follow the iso 8601 ("YYYY-MM-DD") + State : + type : string + - $ref : '#/components/schemas/RRRequest' + - $ref : '#/components/schemas/SSRequest' + - $ref : '#/components/schemas/UnRegRequest' + - $ref : '#/components/schemas/ExempRequest' + discriminator: + propertyName : type + + parameters: + - name: type + in: path + description: type of the request + required: true + schema: + type: integer + + post : + summary: create a request tags : - - RegisterRequests + - Requests + - Ext (Student Registration) + security: + - bearer: [] + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + oneOf: + - $ref : '#/components/schemas/RRRequest' + - $ref : '#/components/schemas/SSRequest' + - $ref : '#/components/schemas/UnRegRequest' + - $ref : '#/components/schemas/ExempRequest' + - $ref : '#/components/schemas/RegRequest' + discriminator: + propertyName : type + responses: + '201': + description: New request created + '401': + $ref: '#/components/responses/UnauthorizedError' + + /Requests/{type}{id}: + parameters: + - name: type + in: path + description: type of the request + required: true + schema: + type: integer + + - name : id + in : path + description: id of the selected Request + required : true + schema : + type : integer + + get : + summary : Get all the data composing a request + tags : + - Requests - Ext (Student Registration) responses : '200': @@ -397,118 +465,19 @@ paths: content : application/json : schema : - type : object - properties: - $ref : '#/components/schemas/RegRequest' - - parameters: - - name: id - in: path - description: id of a regRequest - required: true - schema: - type: integer - - patch: - summary: Change the state of a register request - tags: - - RegisterRequests - - Ext (Student Registration) - security: - - bearer: [] - requestBody: - required: true - content: - application/x-www-form-urlencoded: - schema: - type: object - properties: - State: - type: string - responses: - '201': - description: State modified - '401': - $ref: '#/components/responses/UnauthorizedError' + oneOf: + - $ref : '#/components/schemas/RRRequest' + - $ref : '#/components/schemas/SSRequest' + - $ref : '#/components/schemas/UnRegRequest' + - $ref : '#/components/schemas/ExempRequest' + - $ref : '#/components/schemas/RegRequest' + discriminator: + propertyName : type - /RegRequest: - post : - summary: Add a new register request - tags : - - RegisterRequests - - Ext (Student Registration) - security: - - bearer: [] - requestBody: - required: true - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/RegRequest' - responses: - '201': - description: New student created - '401': - $ref: '#/components/responses/UnauthorizedError' - - /ReRegRequest: - get : - summary : Get an array of every reregister requests - tags : - - ReregisterRequests - - Ext (Student Registration) - responses : - '200': - description : OK - content : - application/json : - schema : - type : array - items : - $ref : '#/components/schemas/ReRegRequest' - post : - summary: Add a new ReRegister request - tags : - - ReregisterRequests - - Ext (Student Registration) - security: - - bearer: [] - requestBody: - required: true - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ReRegRequest' - responses: - '201': - description: New ReRegister request created - '401': - $ref: '#/components/responses/UnauthorizedError' - - /ReRegRequest/{id}: - parameters: - - name: id - in: path - description: id of a reregistrationrequest - required: true - schema: - type: integer - get: - summary : get the data of a single reregistration request - tags : - - ReregisterRequests - - Ext (Student Registration) - responses : - '200': - description : OK - content : - application/json : - schema : - $ref : '#/components/schemas/ReRegRequest' patch: - summary: Change the state of a reregister request + summary: Change the state of request tags: - - ReregisterRequests + - Requests - Ext (Student Registration) security: - bearer: [] @@ -516,246 +485,22 @@ paths: required: true content: application/x-www-form-urlencoded: - schema: - type: object - properties: - State: - type: string + schema : + oneOf: + - $ref : '#/components/schemas/RRRequest' + - $ref : '#/components/schemas/SSRequest' + - $ref : '#/components/schemas/UnRegRequest' + - $ref : '#/components/schemas/ExempRequest' + - $ref : '#/components/schemas/RegRequest' + discriminator: + propertyName : type responses: '201': description: State modified '401': - $ref: '#/components/responses/UnauthorizedError' - /SSRequest: - get : - summary : Get an array of every scholarship requests - tags : - - ScholarshipRequests - - Ext (Student Registration) - responses : - '200': - description : OK - content : - application/json : - schema : - type : array - items : - $ref : '#/components/schemas/SSRequest' - post : - summary: Add a new scholarship request - tags : - - ScholarshipRequests - - Ext (Student Registration) - security: - - bearer: [] - requestBody: - required: true - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/SSRequest' - responses: - '201': - description: New scholarship request created - '401': - $ref: '#/components/responses/UnauthorizedError' + $ref: '#/components/responses/UnauthorizedError' - /SSRequest/{id}: - parameters: - - name: id - in: path - description: id of a scholarshiprequest - required: true - schema: - type: integer - get: - summary : get the data of a single scholarship request - tags : - - ScholarshipRequests - - Ext (Student Registration) - responses : - '200': - description : OK - content : - application/json : - schema : - $ref : '#/components/schemas/SSRequest' - patch: - summary: Change the state of a scholarship request - tags: - - ScholarshipRequests - - Ext (Student Registration) - security: - - bearer: [] - requestBody: - required: true - content: - application/x-www-form-urlencoded: - schema: - type: object - properties: - State: - type: string - responses: - '201': - description: State modified - '401': - $ref: '#/components/responses/UnauthorizedError' - - - /UnRegRequest: - get : - summary : Get an array of every unregister requests - tags : - - UnregisterRequests - - Ext (Student Registration) - responses : - '200': - description : OK - content : - application/json : - schema : - type : array - items : - $ref : '#/components/schemas/UnRegRequest' - post : - summary: Add a new unregister request - tags : - - UnregisterRequests - - Ext (Student Registration) - security: - - bearer: [] - requestBody: - required: true - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/UnRegRequest' - responses: - '201': - description: New unregister request created - '401': - $ref: '#/components/responses/UnauthorizedError' - - /UnRegRequest{id}: - parameters: - - name: id - in: path - description: id of a unregistrationrequest - required: true - schema: - type: integer - get: - summary : get the data of a single unregistration request - tags : - - UnregisterRequests - - Ext (Student Registration) - responses : - '200': - description : OK - content : - application/json : - schema : - $ref : '#/components/schemas/UnRegRequest' - patch: - summary: Change the state of a unregister request - tags: - - UnregisterRequests - - Ext (Student Registration) - security: - - bearer: [] - requestBody: - required: true - content: - application/x-www-form-urlencoded: - schema: - type: object - properties: - State: - type: string - responses: - '201': - description: State modified - '401': - $ref: '#/components/responses/UnauthorizedError' - - /ExempRequest: - get : - summary : Get an array of every exemptions requests - tags : - - ExemptionRequests - - Ext (Student Registration) - responses : - '200': - description : OK - content : - application/json : - schema : - type : array - items : - $ref : '#/components/schemas/ExempRequest' - - post : - summary: Add a new exemption request - tags : - - ExemptionRequests - - Ext (Student Registration) - security: - - bearer: [] - requestBody: - required: true - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ExempRequest' - responses: - '201': - description: New exemption request created - '401': - $ref: '#/components/responses/UnauthorizedError' - - - /ExempRequest/{id}: - parameters: - - name: id - in: path - description: id of a exemption request - required: true - schema: - type: integer - get: - summary : get the data of a single exemption request - tags : - - ExemptionRequests - - Ext (Student Registration) - responses : - '200': - description : OK - content : - application/json : - schema : - $ref : '#/components/schemas/ExempRequest' - patch: - summary: Change the state of a exemption request - tags: - - ExemptionRequests - - Ext (Student Registration) - security: - - bearer: [] - requestBody: - required: true - content: - application/x-www-form-urlencoded: - schema: - type: object - properties: - State: - type: string - responses: - '201': - description: State modified - '401': - $ref: '#/components/responses/UnauthorizedError' + components: securitySchemes: bearer: @@ -887,23 +632,8 @@ components: State: type : string - RegRequests: - type : object - properties: - id : - type : integer - Firstname : - type : string - Name : - type : string - Date : - type : string - description : Follow the iso 8601 ("YYYY-MM-DD") - State : - type : string - - ReRegRequest: + RRRequest: type : object properties : id : -- 2.46.0 From 74e6d18f979e72daf2869ee542c9db35d408e2a7 Mon Sep 17 00:00:00 2001 From: LeoMoulin Date: Wed, 13 Dec 2023 15:39:20 +0100 Subject: [PATCH 7/7] caca Fix vos trucs --- Documents/proto/general/openapi.yaml | 61 +++++++++++++--------------- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/Documents/proto/general/openapi.yaml b/Documents/proto/general/openapi.yaml index 9c28926..bce19c9 100644 --- a/Documents/proto/general/openapi.yaml +++ b/Documents/proto/general/openapi.yaml @@ -374,6 +374,7 @@ paths: summary: Give an array of every requests of the specified type tags : - Requests + - SI - Ext (Student Registration) responses : '200': @@ -383,24 +384,17 @@ paths: schema : type : array items : - oneOf: - - type : object - properties: - id : - type : integer - Firstname : - type : string - Name : - type : string - Date : - type : string - description : Follow the iso 8601 ("YYYY-MM-DD") - State : - type : string + allOf: + - type : object + properties : + id : + type : integer + - oneOf : - $ref : '#/components/schemas/RRRequest' - $ref : '#/components/schemas/SSRequest' - $ref : '#/components/schemas/UnRegRequest' - $ref : '#/components/schemas/ExempRequest' + - $ref : '#/components/schemas/RegRequest' discriminator: propertyName : type @@ -416,6 +410,8 @@ paths: summary: create a request tags : - Requests + - Guest + - Student - Ext (Student Registration) security: - bearer: [] @@ -438,7 +434,7 @@ paths: '401': $ref: '#/components/responses/UnauthorizedError' - /Requests/{type}{id}: + /Requests/{type}/{id}: parameters: - name: type in: path @@ -458,6 +454,8 @@ paths: summary : Get all the data composing a request tags : - Requests + - SI + - Teacher - Ext (Student Registration) responses : '200': @@ -465,12 +463,17 @@ paths: content : application/json : schema : - oneOf: - - $ref : '#/components/schemas/RRRequest' - - $ref : '#/components/schemas/SSRequest' - - $ref : '#/components/schemas/UnRegRequest' - - $ref : '#/components/schemas/ExempRequest' - - $ref : '#/components/schemas/RegRequest' + allOf: + - type : object + properties : + id : + type : integer + - oneOf : + - $ref : '#/components/schemas/RRRequest' + - $ref : '#/components/schemas/SSRequest' + - $ref : '#/components/schemas/UnRegRequest' + - $ref : '#/components/schemas/ExempRequest' + - $ref : '#/components/schemas/RegRequest' discriminator: propertyName : type @@ -478,6 +481,8 @@ paths: summary: Change the state of request tags: - Requests + - SI + - Teacher - Ext (Student Registration) security: - bearer: [] @@ -485,8 +490,8 @@ paths: required: true content: application/x-www-form-urlencoded: - schema : - oneOf: + schema: + oneOf : - $ref : '#/components/schemas/RRRequest' - $ref : '#/components/schemas/SSRequest' - $ref : '#/components/schemas/UnRegRequest' @@ -597,8 +602,6 @@ components: RegRequest: type : object properties: - id: - type : integer Name : type: string Firstname : @@ -636,8 +639,6 @@ components: RRRequest: type : object properties : - id : - type : integer RegNo : type : integer NewCursusid : @@ -649,8 +650,6 @@ components: SSRequest: type : object properties : - id : - type : integer RegNo : type : integer Amount : @@ -662,8 +661,6 @@ components: UnRegRequest : type : object properties : - id : - type : integer RegNo : type : integer State : @@ -672,8 +669,6 @@ components: ExempRequest : type : object properties : - id: - type : integer RegNo : type : integer Courseid : -- 2.46.0