diff --git a/openapi.yaml b/openapi.yaml index bc5a922..a3a9156 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -87,6 +87,14 @@ paths: /ep/participation/{idCollaborateur}/count: $ref: ./paths/ep/epParticipationIdCollaborateurCount.yaml + #Engagement + /engagements: + $ref: ./paths/engagement/engagements.yaml + /engagements/count: + $ref: ./paths/engagement/engagementsCount.yaml + /engagements/{idEngagement}: + $ref: ./paths/engagement/engagementsIdEngagement.yaml + #DemandeEPI /demandesepi/collaborateur/{idCollaborateur}: $ref: ./paths/demandeepi/demandesEPICollaborateur.yaml @@ -113,16 +121,6 @@ paths: /demandesdelegation/{idDemandeDelegation}/repondre: $ref: ./paths/demandedelegation/repondreDemandeDelegation.yaml - #Engagement - /engagements: - $ref: ./paths/engagement/engagements.yaml - /engagements/enattente: - $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 diff --git a/parameters/query/etatsEngagement.yaml b/parameters/query/etatsEngagement.yaml index c7a25a7..5b39ec8 100644 --- a/parameters/query/etatsEngagement.yaml +++ b/parameters/query/etatsEngagement.yaml @@ -4,5 +4,6 @@ schema: type: array items: $ref: ../../schemas/enum/etatEngagement.yaml + default: null required: false -description: Etat de l'engagement \ No newline at end of file +description: Etats de l'engagement \ No newline at end of file diff --git a/paths/engagement/engagementReponse.yaml b/paths/engagement/engagementReponse.yaml deleted file mode 100644 index 6edf464..0000000 --- a/paths/engagement/engagementReponse.yaml +++ /dev/null @@ -1,15 +0,0 @@ -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 209a8dc..216e64e 100644 --- a/paths/engagement/engagements.yaml +++ b/paths/engagement/engagements.yaml @@ -2,11 +2,11 @@ get: tags: - engagements operationId: getEngagements - description: Récupérer la liste des engagements + description: Récupérer la liste des engagements. parameters: - $ref: ../../parameters/query/etatsEngagement.yaml - - $ref: ../../parameters/query/asc.yaml - $ref: ../../parameters/query/idBUs.yaml + - $ref: ../../parameters/query/asc.yaml - $ref: ../../parameters/query/numPage.yaml - $ref: ../../parameters/query/parPage.yaml - $ref: ../../parameters/query/texte.yaml @@ -16,5 +16,11 @@ get: '200': $ref: ../../responses/engagement/getListeEngagements.yaml + '401': + $ref: ../../responses/erreur/unauthorized.yaml + '403': - $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file + $ref: ../../responses/erreur/forbidden.yaml + + '500': + $ref: ../../responses/erreur/internalServerError.yaml \ No newline at end of file diff --git a/paths/engagement/engagementsCount.yaml b/paths/engagement/engagementsCount.yaml new file mode 100644 index 0000000..8bbb7ed --- /dev/null +++ b/paths/engagement/engagementsCount.yaml @@ -0,0 +1,26 @@ +get: + tags: + - engagements + operationId: getEngagementsCount + description: Récupérer le nombre total d’engagements. + parameters: + - $ref: ../../parameters/query/etatsEngagement.yaml + - $ref: ../../parameters/query/idBUs.yaml + - $ref: ../../parameters/query/asc.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/engagement/getCountEngagement.yaml + + '401': + $ref: ../../responses/erreur/unauthorized.yaml + + '403': + $ref: ../../responses/erreur/forbidden.yaml + + '500': + $ref: ../../responses/erreur/internalServerError.yaml \ No newline at end of file diff --git a/paths/engagement/engagementsEnAttente.yaml b/paths/engagement/engagementsEnAttente.yaml deleted file mode 100644 index a3f13a7..0000000 --- a/paths/engagement/engagementsEnAttente.yaml +++ /dev/null @@ -1,19 +0,0 @@ -get: - tags: - - engagements - operationId: getEngagementsEnAttente - description: Récupérer la liste des engagements en attente - parameters: - - $ref: ../../parameters/query/asc.yaml - - $ref: ../../parameters/query/idAgence.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/engagement/getListeEngagements.yaml - - '403': - $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file diff --git a/paths/engagement/engagementsIdEngagement.yaml b/paths/engagement/engagementsIdEngagement.yaml new file mode 100644 index 0000000..4258d64 --- /dev/null +++ b/paths/engagement/engagementsIdEngagement.yaml @@ -0,0 +1,27 @@ +put: + tags: + - engagements + operationId: updateEngagement + description: Répondre à un engagement. + parameters: + - $ref: ../../parameters/path/idEngagement.yaml + requestBody: + $ref: ../../requestbodies/engagement.yaml + responses: + '200': + $ref: ../../responses/engagement/updateEngagement.yaml + + '401': + $ref: ../../responses/erreur/unauthorized.yaml + + '403': + $ref: ../../responses/erreur/forbidden.yaml + + '404': + $ref: ../../responses/erreur/notFound.yaml + + '415': + $ref: ../../responses/erreur/unsupportedMediaType.yaml + + '500': + $ref: ../../responses/erreur/internalServerError.yaml diff --git a/paths/engagement/engagementsRepondus.yaml b/paths/engagement/engagementsRepondus.yaml deleted file mode 100644 index 6821043..0000000 --- a/paths/engagement/engagementsRepondus.yaml +++ /dev/null @@ -1,19 +0,0 @@ -get: - tags: - - engagements - operationId: getEngagementsRepondus - description: Récupérer la liste des engagements ayant reçu une réponse - parameters: - - $ref: ../../parameters/query/asc.yaml - - $ref: ../../parameters/query/idAgence.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/engagement/getListeEngagements.yaml - - '403': - $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file diff --git a/responses/_index.yaml b/responses/_index.yaml index f3bb0c4..1fd5073 100644 --- a/responses/_index.yaml +++ b/responses/_index.yaml @@ -81,14 +81,11 @@ ReponseEPIReponse: #Engagement -GetEngagementReponse: - $ref: ./engagement/getEngagement.yaml - GetListeEngagementsReponse: $ref: ./engagement/getListeEngagements.yaml ReponseEngagementReponse: - $ref: ./engagement/reponseEngagement.yaml + $ref: ./engagement/updateEngagement.yaml #DemandeDelegation diff --git a/responses/engagement/getCountEngagement.yaml b/responses/engagement/getCountEngagement.yaml new file mode 100644 index 0000000..6aa8bbc --- /dev/null +++ b/responses/engagement/getCountEngagement.yaml @@ -0,0 +1,7 @@ +description: OK +content: + application/json: + schema: + type: integer + format: int64 + description: Nombre total d'engagements \ No newline at end of file diff --git a/responses/engagement/getEngagement.yaml b/responses/engagement/getEngagement.yaml deleted file mode 100644 index ecf306f..0000000 --- a/responses/engagement/getEngagement.yaml +++ /dev/null @@ -1,5 +0,0 @@ -description: OK -content: - application/json: - schema: - $ref: ../../schemas/ep/engagement.yaml \ No newline at end of file diff --git a/responses/engagement/reponseEngagement.yaml b/responses/engagement/reponseEngagement.yaml deleted file mode 100644 index c4f4491..0000000 --- a/responses/engagement/reponseEngagement.yaml +++ /dev/null @@ -1 +0,0 @@ -description: Engagement mise à jour \ No newline at end of file diff --git a/responses/engagement/updateEngagement.yaml b/responses/engagement/updateEngagement.yaml new file mode 100644 index 0000000..cfe41a7 --- /dev/null +++ b/responses/engagement/updateEngagement.yaml @@ -0,0 +1,5 @@ +description: Engagement modifié avec succès +content: + application/json: + schema: + $ref: ../../schemas/ep/engagement.yaml \ No newline at end of file