From 375812f17fe23c078cb35063697caf72bfad63d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yana=C3=ABl=20GRETTE?= Date: Fri, 4 Dec 2020 11:18:35 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20des=20urls=20et=20du=20DTO=20pour=20la?= =?UTF-8?q?=20partie=20referentEP=20=C3=A0=20l'aide=20des=20sp=C3=A9cifica?= =?UTF-8?q?tions=20techniques?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openapi.yaml | 12 ++++------ .../referentep/collaborateursIdReferent.yaml | 24 +++++++++++++++++++ paths/referentep/referentIdCollaborateur.yaml | 24 +++++++++++++++++++ .../referentActuelByCollaborateur.yaml | 16 ------------- paths/referents/referentbyid.yaml | 16 ------------- paths/referents/referents.yaml | 20 ---------------- paths/referents/referentsByCollaborateur.yaml | 21 ---------------- requestbodies/_index.yaml | 3 +++ requestbodies/referentEP.yaml | 5 ++++ responses/_index.yaml | 7 ++---- responses/referent/getListeReferrents.yaml | 7 ------ responses/referent/getReferent.yaml | 5 ---- responses/referentep/updateReferentEP.yaml | 5 ++++ schemas/_index.yaml | 3 +++ schemas/collaborateur/referentEP.yaml | 14 +++++++++++ 15 files changed, 84 insertions(+), 98 deletions(-) create mode 100644 paths/referentep/collaborateursIdReferent.yaml create mode 100644 paths/referentep/referentIdCollaborateur.yaml delete mode 100644 paths/referents/referentActuelByCollaborateur.yaml delete mode 100644 paths/referents/referentbyid.yaml delete mode 100644 paths/referents/referents.yaml delete mode 100644 paths/referents/referentsByCollaborateur.yaml create mode 100644 requestbodies/referentEP.yaml delete mode 100644 responses/referent/getListeReferrents.yaml delete mode 100644 responses/referent/getReferent.yaml create mode 100644 responses/referentep/updateReferentEP.yaml create mode 100644 schemas/collaborateur/referentEP.yaml diff --git a/openapi.yaml b/openapi.yaml index 15db804..404b9e0 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -40,14 +40,10 @@ paths: #ReferentEP - #/referents: - #$ref: ./paths/referents/referents.yaml - #/referents/{idReferent}: - #$ref: ./paths/referents/referentById.yaml - #/referents/collaborateur/{idCollaborateur}: - #$ref: ./paths/referents/referentsByCollaborateur.yaml - #/referents/actuel/collaborateur/{idCollaborateur}: - #$ref: ./paths/referents/referentActuelByCollaborateur.yaml + /referentsep/collaborateur/{idCollaborateur}: + $ref: ./paths/referentep/referentIdCollaborateur.yaml + /referentsep/referent/{idReferent}: + $ref: ./paths/referentep/collaborateursIdReferent.yaml #EP /ep/{idCollaborateur}: diff --git a/paths/referentep/collaborateursIdReferent.yaml b/paths/referentep/collaborateursIdReferent.yaml new file mode 100644 index 0000000..3dd48e9 --- /dev/null +++ b/paths/referentep/collaborateursIdReferent.yaml @@ -0,0 +1,24 @@ +put: + tags: + - referentsep + operationId: updateCollaborateursReferent + description: Mettre à jour le référent de plusieurs collaborateurs + parameters: + - $ref: ../../parameters/path/idReferent.yaml + requestBody: + $ref: ../../requestbodies/referentEP.yaml + responses: + '200': + $ref: ../../responses/referentep/updateReferentEP.yaml + + '401': + $ref: ../../responses/erreur/unauthorized.yaml + + '403': + $ref: ../../responses/erreur/forbidden.yaml + + '404': + $ref: ../../responses/erreur/notFound.yaml + + '500': + $ref: ../../responses/erreur/internalServerError.yaml \ No newline at end of file diff --git a/paths/referentep/referentIdCollaborateur.yaml b/paths/referentep/referentIdCollaborateur.yaml new file mode 100644 index 0000000..a342eb2 --- /dev/null +++ b/paths/referentep/referentIdCollaborateur.yaml @@ -0,0 +1,24 @@ +put: + tags: + - referentsep + operationId: updateReferentCollaborateur + description: Mettre à jour le référent d'un collaborateur + parameters: + - $ref: ../../parameters/path/idCollaborateur.yaml + requestBody: + $ref: ../../requestbodies/referentEP.yaml + responses: + '200': + $ref: ../../responses/referentep/updateReferentEP.yaml + + '401': + $ref: ../../responses/erreur/unauthorized.yaml + + '403': + $ref: ../../responses/erreur/forbidden.yaml + + '404': + $ref: ../../responses/erreur/notFound.yaml + + '500': + $ref: ../../responses/erreur/internalServerError.yaml \ No newline at end of file diff --git a/paths/referents/referentActuelByCollaborateur.yaml b/paths/referents/referentActuelByCollaborateur.yaml deleted file mode 100644 index 9b0132a..0000000 --- a/paths/referents/referentActuelByCollaborateur.yaml +++ /dev/null @@ -1,16 +0,0 @@ -get: - tags: - - referents - operationId: getReferentActuelCollaborateur - description: Récupérer le référent d'un collaborateur - parameters: - - $ref: ../../parameters/path/idCollaborateur.yaml - responses: - '200': - $ref: ../../responses/referent/getReferent.yaml - - '403': - $ref: ../../responses/erreur/forbidden.yaml - - '404': - $ref: ../../responses/erreur/notFound.yaml \ No newline at end of file diff --git a/paths/referents/referentbyid.yaml b/paths/referents/referentbyid.yaml deleted file mode 100644 index aa1076c..0000000 --- a/paths/referents/referentbyid.yaml +++ /dev/null @@ -1,16 +0,0 @@ -get: - tags: - - referents - operationId: getReferentById - description: Récupérer un referent par son id - parameters: - - $ref: ../../parameters/path/idReferent.yaml - responses: - '200': - $ref: ../../responses/referent/getReferent.yaml - - '403': - $ref: ../../responses/erreur/forbidden.yaml - - '404': - $ref: ../../responses/erreur/notFound.yaml \ No newline at end of file diff --git a/paths/referents/referents.yaml b/paths/referents/referents.yaml deleted file mode 100644 index 50cb296..0000000 --- a/paths/referents/referents.yaml +++ /dev/null @@ -1,20 +0,0 @@ -get: - tags: - - referents - operationId: getReferents - description: Récupérer la liste de tous les referents - parameters: - - $ref: ../../parameters/query/asc.yaml - - $ref: ../../parameters/query/roles.yaml - - $ref: ../../parameters/query/idAgence.yaml - - $ref: ../../parameters/query/idBU.yaml - - $ref: ../../parameters/query/numPage.yaml - - $ref: ../../parameters/query/parPage.yaml - - $ref: ../../parameters/query/texte.yaml - - $ref: ../../parameters/query/tri.yaml - responses: - '200': - $ref: ../../responses/referent/getListeReferrents.yaml - - '403': - $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file diff --git a/paths/referents/referentsByCollaborateur.yaml b/paths/referents/referentsByCollaborateur.yaml deleted file mode 100644 index c86743a..0000000 --- a/paths/referents/referentsByCollaborateur.yaml +++ /dev/null @@ -1,21 +0,0 @@ -get: - tags: - - referents - operationId: getReferentsByCollaborateur - description: Récupérer la liste des référents d'un collaborateur - parameters: - - $ref: ../../parameters/query/asc.yaml - - $ref: ../../parameters/path/idCollaborateur.yaml - - $ref: ../../parameters/query/numPage.yaml - - $ref: ../../parameters/query/parPage.yaml - - $ref: ../../parameters/query/texte.yaml - - $ref: ../../parameters/query/tri.yaml - responses: - '200': - $ref: ../../responses/referent/getListeReferrents.yaml - - '403': - $ref: ../../responses/erreur/forbidden.yaml - - '404': - $ref: ../../responses/erreur/notFound.yaml \ No newline at end of file diff --git a/requestbodies/_index.yaml b/requestbodies/_index.yaml index 92737cf..0097810 100644 --- a/requestbodies/_index.yaml +++ b/requestbodies/_index.yaml @@ -23,5 +23,8 @@ FormationBody: NoteBody: $ref: ./note.yaml +ReferentEPBody: + $ref: ./referentEP.yaml + SaisieEPBody: $ref: ./saisieEP.yaml \ No newline at end of file diff --git a/requestbodies/referentEP.yaml b/requestbodies/referentEP.yaml new file mode 100644 index 0000000..140f22c --- /dev/null +++ b/requestbodies/referentEP.yaml @@ -0,0 +1,5 @@ +required: true +content: + application/json: + schema: + $ref: ../schemas/collaborateur/referentEP.yaml \ No newline at end of file diff --git a/responses/_index.yaml b/responses/_index.yaml index 0693ab6..42af475 100644 --- a/responses/_index.yaml +++ b/responses/_index.yaml @@ -172,9 +172,6 @@ ReponseDemandeFormationResponse: $ref: ./demandeformation/reponseDemandeFormation.yaml -#Referent +#ReferentEP GetReferentResponse: - $ref: ./referent/getReferent.yaml - -GetListereferentsResponse: - $ref: ./referent/getListeReferrents.yaml \ No newline at end of file + $ref: ./referentep/updateReferentEP.yaml \ No newline at end of file diff --git a/responses/referent/getListeReferrents.yaml b/responses/referent/getListeReferrents.yaml deleted file mode 100644 index eb77d3e..0000000 --- a/responses/referent/getListeReferrents.yaml +++ /dev/null @@ -1,7 +0,0 @@ -description: OK -content: - application/json: - schema: - type: array - items: - $ref: ../../schemas/collaborateur/collaborateur.yaml diff --git a/responses/referent/getReferent.yaml b/responses/referent/getReferent.yaml deleted file mode 100644 index 1dd8b7a..0000000 --- a/responses/referent/getReferent.yaml +++ /dev/null @@ -1,5 +0,0 @@ -description: OK -content: - application/json: - schema: - $ref: ../../schemas/collaborateur/collaborateur.yaml \ No newline at end of file diff --git a/responses/referentep/updateReferentEP.yaml b/responses/referentep/updateReferentEP.yaml new file mode 100644 index 0000000..cce505a --- /dev/null +++ b/responses/referentep/updateReferentEP.yaml @@ -0,0 +1,5 @@ +description: OK +content: + application/json: + schema: + $ref: ../../schemas/collaborateur/referentEP.yaml diff --git a/schemas/_index.yaml b/schemas/_index.yaml index b978a32..a118e39 100644 --- a/schemas/_index.yaml +++ b/schemas/_index.yaml @@ -8,6 +8,9 @@ BusinessUnitDTO: CollaborateurDTO: $ref: ./collaborateur/collaborateur.yaml +ReferentEPDTO: + $ref: ./collaborateur/referentEP.yaml + #Note AffichageNoteDTO: $ref: ./note/affichageNote.yaml diff --git a/schemas/collaborateur/referentEP.yaml b/schemas/collaborateur/referentEP.yaml new file mode 100644 index 0000000..478d196 --- /dev/null +++ b/schemas/collaborateur/referentEP.yaml @@ -0,0 +1,14 @@ +type: object +description: DTO permettant de gérer les référents EP +properties: + idReferent: + type: string + format: uuid + description: Id du référent + idsCollaborateur: + type: array + items: + type: string + format: uuid +required: + - idReferent \ No newline at end of file