From 33d8189d2f7a4cf080626b3144ac38360bbe35c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yana=C3=ABl=20GRETTE?= Date: Thu, 3 Sep 2020 11:48:01 +0200 Subject: [PATCH] 1.3.2 --- openapi.yaml | 26 +++++++++++++---- .../demandeFormationRepondre.yaml | 18 ++++++++++++ paths/demandeformation/demandesformation.yaml | 17 ----------- paths/engagement/engagementReponse.yaml | 15 ++++++++++ paths/engagement/engagements.yaml | 18 +----------- paths/ep/epbyid.yaml | 3 +- paths/ep/updateEP.yaml | 2 ++ paths/ep/updateSaisieEP.yaml | 4 ++- paths/formation/formationbyid.yaml | 17 +---------- paths/formation/formations.yaml | 17 ----------- paths/formation/supprimerFormation.yaml | 13 +++++++++ paths/formation/updateFormation.yaml | 18 ++++++++++++ paths/note/note.yaml | 29 ------------------- paths/note/noteById.yaml | 17 ----------- paths/note/notes.yaml | 10 +++++++ paths/note/nouvelleNote.yaml | 12 ++++++++ paths/note/supprimerNote.yaml | 16 ++++++++++ paths/note/updateNote.yaml | 18 ++++++++++++ schemas/collaborateur/profil.yaml | 3 ++ schemas/formation/formation.yaml | 2 ++ 20 files changed, 155 insertions(+), 120 deletions(-) create mode 100644 paths/demandeformation/demandeFormationRepondre.yaml create mode 100644 paths/engagement/engagementReponse.yaml create mode 100644 paths/formation/supprimerFormation.yaml create mode 100644 paths/formation/updateFormation.yaml delete mode 100644 paths/note/note.yaml create mode 100644 paths/note/notes.yaml create mode 100644 paths/note/nouvelleNote.yaml create mode 100644 paths/note/supprimerNote.yaml create mode 100644 paths/note/updateNote.yaml diff --git a/openapi.yaml b/openapi.yaml index 2d1263b..147c92a 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: 1.3.1 + version: 1.3.2 title: API du serveur de l'application de digitalisation des EP description: API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. @@ -17,22 +17,28 @@ paths: $ref: ./paths/collaborateur/collaborateurs.yaml /collaborateurs/{idCollaborateur}: $ref: ./paths/collaborateur/collaborateurById.yaml - /collaborateurs/{mail}: + /collaborateurs/mail/{mail}: $ref: ./paths/collaborateur/collaborateurByMail.yaml - /collaborateurs/{mail}/profil: + /collaborateurs/profil/{mail}: $ref: ./paths/collaborateur/collaborateurProfilByMail.yaml /collaborateurs/referent/{idReferent}: $ref: ./paths/collaborateur/collaborateursReferent.yaml #Note /notes/: - $ref: ./paths/note/note.yaml + $ref: ./paths/note/notes.yaml + /notes/nouvellenote: + $ref: ./paths/note/nouvelleNote.yaml /notes/{idNote}: $ref: ./paths/note/noteById.yaml + /notes/{idNote}/updateNote: + $ref: ./paths/note/updateNote.yaml /notes/auteur/{idReferent}: $ref: ./paths/note/notesAuteur.yaml /notes/auteur/{idReferent}/collaborateur/{idCollaborateur}: $ref: ./paths/note/notesParCollaborateur.yaml + /notes/{idNote}/supprimer: + $ref: ./paths/note/supprimerNote.yaml #Referent /referents: @@ -59,8 +65,10 @@ paths: $ref: ./paths/ep/prochainsEPReferent.yaml /ep/{idEP}/rappelSignature: $ref: ./paths/ep/rappelSignature.yaml - /ep/update: + /ep/{idEP}/updateep: $ref: ./paths/ep/updateEP.yaml + /ep/{idEP}/updatesaisie: + $ref: ./paths/ep/updateSaisieEP.yaml /ep/enCours: $ref: ./paths/ep/epEnCours.yaml /ep/signes: @@ -99,10 +107,14 @@ paths: $ref: ./paths/engagement/engagementsEnAttente.yaml /engagements/repondus: $ref: ./paths/engagement/engagementsRepondus.yaml + /engagements/{idEngagement}/repondre: + $ref: ./paths/engagement/engagementReponse.yaml #DemandeFormation /demandeformation: $ref: ./paths/demandeformation/demandesFormation.yaml + /demandeformation/{idDemandeFormation}/repondre: + $ref: ./paths/demandeformation/demandeFormationRepondre.yaml /demandeformation/enattente: $ref: ./paths/demandeformation/demandesFormationAttente.yaml /demandeformation/repondus: @@ -121,6 +133,10 @@ paths: $ref: ./paths/formation/formations.yaml /formations/{idFormation}: $ref: ./paths/formation/formationById.yaml + /formations/{idFormation}/update: + $ref: ./paths/formation/updateFormation.yaml + /formations/{idFormation}/supprimer: + $ref: ./paths/formation/supprimerFormation.yaml /formations/prochaines: $ref: ./paths/formation/prochainesFormations.yaml /formations/realisees: diff --git a/paths/demandeformation/demandeFormationRepondre.yaml b/paths/demandeformation/demandeFormationRepondre.yaml new file mode 100644 index 0000000..ff49ca3 --- /dev/null +++ b/paths/demandeformation/demandeFormationRepondre.yaml @@ -0,0 +1,18 @@ +put: + tags: + - demandesFormation + operationId: RepondreDemandeFormation + description: Répondre a une demande de formation et la mettre à jour + parameters: + - $ref: ../../parameters/path/idDemandeFormation.yaml + requestBody: + $ref: ../../requestbodies/demandeFormation.yaml + responses: + '200': + $ref: ../../responses/demandeformation/reponseDemandeFormation.yaml + + '201': + $ref: ../../responses/demandeformation/demandeFormationCreee.yaml + + '403': + $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file diff --git a/paths/demandeformation/demandesformation.yaml b/paths/demandeformation/demandesformation.yaml index 28febc1..39b3a8b 100644 --- a/paths/demandeformation/demandesformation.yaml +++ b/paths/demandeformation/demandesformation.yaml @@ -29,22 +29,5 @@ post: '201': $ref: ../../responses/demandeformation/demandeFormationCreee.yaml - '403': - $ref: ../../responses/erreur/forbidden.yaml - -put: - tags: - - demandesFormation - operationId: UpdateDemandeFormation - description: Répondre a une demande de formation et la mettre à jour - requestBody: - $ref: ../../requestbodies/demandeFormation.yaml - responses: - '200': - $ref: ../../responses/demandeformation/reponseDemandeFormation.yaml - - '201': - $ref: ../../responses/demandeformation/demandeFormationCreee.yaml - '403': $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file diff --git a/paths/engagement/engagementReponse.yaml b/paths/engagement/engagementReponse.yaml new file mode 100644 index 0000000..6edf464 --- /dev/null +++ b/paths/engagement/engagementReponse.yaml @@ -0,0 +1,15 @@ +put: + tags: + - engagements + operationId: repondreEngagement + description: Donnez une réponse à un engagement + parameters: + - $ref: ../../parameters/path/idEngagement.yaml + requestBody: + $ref: ../../requestbodies/engagement.yaml + responses: + '200': + $ref: ../../responses/engagement/reponseEngagement.yaml + + '403': + $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file diff --git a/paths/engagement/engagements.yaml b/paths/engagement/engagements.yaml index bbc3127..480aef9 100644 --- a/paths/engagement/engagements.yaml +++ b/paths/engagement/engagements.yaml @@ -16,20 +16,4 @@ get: $ref: ../../responses/engagement/getListeEngagements.yaml '403': - $ref: ../../responses/erreur/forbidden.yaml - -put: - tags: - - engagements - operationId: repondreEngagement - description: Donnez une réponse à un engagement - requestBody: - $ref: ../../requestbodies/engagement.yaml - responses: - '200': - $ref: ../../responses/engagement/reponseEngagement.yaml - - '403': - $ref: ../../responses/erreur/forbidden.yaml - - \ No newline at end of file + $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file diff --git a/paths/ep/epbyid.yaml b/paths/ep/epbyid.yaml index 233d050..1c68d7e 100644 --- a/paths/ep/epbyid.yaml +++ b/paths/ep/epbyid.yaml @@ -13,4 +13,5 @@ get: $ref: ../../responses/erreur/forbidden.yaml '404': - $ref: ../../responses/erreur/notFound.yaml \ No newline at end of file + $ref: ../../responses/erreur/notFound.yaml + diff --git a/paths/ep/updateEP.yaml b/paths/ep/updateEP.yaml index 3b56f03..a566723 100644 --- a/paths/ep/updateEP.yaml +++ b/paths/ep/updateEP.yaml @@ -3,6 +3,8 @@ put: - ep operationId: updateEP description: Mettre à jour l'EP déjà saisie + parameters: + - $ref: ../../parameters/path/idEP.yaml requestBody: $ref: ../../requestbodies/ep.yaml responses: diff --git a/paths/ep/updateSaisieEP.yaml b/paths/ep/updateSaisieEP.yaml index 940bf50..bfb1be6 100644 --- a/paths/ep/updateSaisieEP.yaml +++ b/paths/ep/updateSaisieEP.yaml @@ -1,8 +1,10 @@ put: tags: - ep - operationId: updateEP + operationId: updateSaisieEP description: Poursuivre le processus de l'EP ou bien seulement sauvegarder les modifications + parameters: + - $ref: ../../parameters/path/idEP.yaml requestBody: $ref: ../../requestbodies/saisieEP.yaml responses: diff --git a/paths/formation/formationbyid.yaml b/paths/formation/formationbyid.yaml index 10eeb9f..7cf3d04 100644 --- a/paths/formation/formationbyid.yaml +++ b/paths/formation/formationbyid.yaml @@ -13,19 +13,4 @@ get: $ref: ../../responses/erreur/forbidden.yaml '404': - $ref: ../../responses/erreur/notFound.yaml - - -delete: - tags: - - formations - operationId: deleteFormation - description: Supprimer une formation - parameters: - - $ref: ../../parameters/path/idFormation.yaml - responses: - '204': - $ref: ../../responses/formation/formationSupprimee.yaml - - '403': - $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file + $ref: ../../responses/erreur/notFound.yaml \ No newline at end of file diff --git a/paths/formation/formations.yaml b/paths/formation/formations.yaml index ced12f3..8e994ce 100644 --- a/paths/formation/formations.yaml +++ b/paths/formation/formations.yaml @@ -29,22 +29,5 @@ post: '201': $ref: ../../responses/formation/formationCreee.yaml - '403': - $ref: ../../responses/erreur/forbidden.yaml - -put: - tags: - - formations - operationId: updateFormation - description: Mettre à jour une formation - requestBody: - $ref: ../../requestbodies/formation.yaml - responses: - '200': - $ref: ../../responses/formation/updateFormation.yaml - - '201': - $ref: ../../responses/formation/formationCreee.yaml - '403': $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file diff --git a/paths/formation/supprimerFormation.yaml b/paths/formation/supprimerFormation.yaml new file mode 100644 index 0000000..ad8484e --- /dev/null +++ b/paths/formation/supprimerFormation.yaml @@ -0,0 +1,13 @@ +delete: + tags: + - formations + operationId: deleteFormation + description: Supprimer une formation + parameters: + - $ref: ../../parameters/path/idFormation.yaml + responses: + '204': + $ref: ../../responses/formation/formationSupprimee.yaml + + '403': + $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file diff --git a/paths/formation/updateFormation.yaml b/paths/formation/updateFormation.yaml new file mode 100644 index 0000000..e6e03c5 --- /dev/null +++ b/paths/formation/updateFormation.yaml @@ -0,0 +1,18 @@ +put: + tags: + - formations + operationId: updateFormation + description: Mettre à jour une formation + parameters: + - $ref: ../../parameters/path/idFormation.yaml + requestBody: + $ref: ../../requestbodies/formation.yaml + responses: + '200': + $ref: ../../responses/formation/updateFormation.yaml + + '201': + $ref: ../../responses/formation/formationCreee.yaml + + '403': + $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file diff --git a/paths/note/note.yaml b/paths/note/note.yaml deleted file mode 100644 index ab4e786..0000000 --- a/paths/note/note.yaml +++ /dev/null @@ -1,29 +0,0 @@ -post: - tags: - - notes - operationId: nouvelleNote - description: Ajouter une nouvelle note - requestBody: - $ref: ../../requestbodies/note.yaml - responses: - '201': - $ref: ../../responses/note/noteCreee.yaml - '403': - $ref: ../../responses/erreur/forbidden.yaml - -put: - tags: - - notes - operationId: updateNote - description: Mettre à jour une note - requestBody: - $ref: ../../requestbodies/note.yaml - responses: - '200': - $ref: ../../responses/note/updateNote.yaml - - '201': - $ref: ../../responses/note/noteCreee.yaml - - '403': - $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file diff --git a/paths/note/noteById.yaml b/paths/note/noteById.yaml index 39ecd40..2b8931a 100644 --- a/paths/note/noteById.yaml +++ b/paths/note/noteById.yaml @@ -12,22 +12,5 @@ get: '403': $ref: ../../responses/erreur/forbidden.yaml - '404': - $ref: ../../responses/erreur/notFound.yaml - -delete: - tags: - - notes - operationId: deleteNote - description: Supprimer une note - parameters: - - $ref: ../../parameters/path/idNote.yaml - responses: - '204': - $ref: ../../responses/note/noteSupprimee.yaml - - '403': - $ref: ../../responses/erreur/forbidden.yaml - '404': $ref: ../../responses/erreur/notFound.yaml \ No newline at end of file diff --git a/paths/note/notes.yaml b/paths/note/notes.yaml new file mode 100644 index 0000000..3a672da --- /dev/null +++ b/paths/note/notes.yaml @@ -0,0 +1,10 @@ +get: + tags: + - notes + operationId: getNotes + description: Récupérer toutes les notes + responses: + '200': + $ref: ../../responses/note/getListeNotes.yaml + '403': + $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file diff --git a/paths/note/nouvelleNote.yaml b/paths/note/nouvelleNote.yaml new file mode 100644 index 0000000..e8edce0 --- /dev/null +++ b/paths/note/nouvelleNote.yaml @@ -0,0 +1,12 @@ +post: + tags: + - notes + operationId: nouvelleNote + description: Ajouter une nouvelle note + requestBody: + $ref: ../../requestbodies/note.yaml + responses: + '201': + $ref: ../../responses/note/noteCreee.yaml + '403': + $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file diff --git a/paths/note/supprimerNote.yaml b/paths/note/supprimerNote.yaml new file mode 100644 index 0000000..844c5e4 --- /dev/null +++ b/paths/note/supprimerNote.yaml @@ -0,0 +1,16 @@ +delete: + tags: + - notes + operationId: deleteNote + description: Supprimer une note + parameters: + - $ref: ../../parameters/path/idNote.yaml + responses: + '204': + $ref: ../../responses/note/noteSupprimee.yaml + + '403': + $ref: ../../responses/erreur/forbidden.yaml + + '404': + $ref: ../../responses/erreur/notFound.yaml \ No newline at end of file diff --git a/paths/note/updateNote.yaml b/paths/note/updateNote.yaml new file mode 100644 index 0000000..c4f42b4 --- /dev/null +++ b/paths/note/updateNote.yaml @@ -0,0 +1,18 @@ +put: + tags: + - notes + operationId: updateNote + description: Mettre à jour une note + parameters: + - $ref: ../../parameters/path/idNote.yaml + requestBody: + $ref: ../../requestbodies/note.yaml + responses: + '200': + $ref: ../../responses/note/updateNote.yaml + + '201': + $ref: ../../responses/note/noteCreee.yaml + + '403': + $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file diff --git a/schemas/collaborateur/profil.yaml b/schemas/collaborateur/profil.yaml index 8625813..820cc95 100644 --- a/schemas/collaborateur/profil.yaml +++ b/schemas/collaborateur/profil.yaml @@ -1,6 +1,9 @@ type: object description: Information utile à avoir lorsqu'un utilisateur se connecte properties: + id: + type: string + format: uuid nom: type: string prenom: diff --git a/schemas/formation/formation.yaml b/schemas/formation/formation.yaml index 4443041..35430dd 100644 --- a/schemas/formation/formation.yaml +++ b/schemas/formation/formation.yaml @@ -9,6 +9,8 @@ properties: $ref: ./origineFormation.yaml statut: $ref: ./statutFormation.yaml + idAgence: + type: integer dateDebut: type: string format: date-time