diff --git a/openapi.yaml b/openapi.yaml index d4b88cc..d9d02ca 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -120,22 +120,18 @@ paths: $ref: ./paths/demandedelegation/demandeDelegationId.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: - $ref: ./paths/demandeformation/demandesFormationRepondues.yaml + /demandesformation: + $ref: ./paths/demandeformation/demandesFormation.yaml + /demandesformation/{idDemandeFormation}: + $ref: ./paths/demandeformation/demandeFormationId.yaml #OrigineDemandeFormation /originesdemandesformation: $ref: ./paths/demandeformation/originesDemandesFormation.yaml #Theme - /themes: - $ref: ./paths/demandeformation/themes.yaml + #/themes: + # $ref: ./paths/demandeformation/themes.yaml #Formation /formations: diff --git a/paths/demandeformation/demandeFormationId.yaml b/paths/demandeformation/demandeFormationId.yaml new file mode 100644 index 0000000..33c06d0 --- /dev/null +++ b/paths/demandeformation/demandeFormationId.yaml @@ -0,0 +1,48 @@ +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 + + '401': + $ref: ../../responses/erreur/unauthorized.yaml + + '403': + $ref: ../../responses/erreur/forbidden.yaml + + '404': + $ref: ../../responses/erreur/notFound.yaml + + '500': + $ref: ../../responses/erreur/internalServerError.yaml + +delete: + tags: + - demandesFormation + operationId: SupprimerDemandeFormation + description: Supprimer une demande de formation + parameters: + - $ref: ../../parameters/path/idDemandeFormation.yaml + responses: + '200': + $ref: ../../responses/demandeformation/demandeFormationSupprimee.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 + diff --git a/paths/demandeformation/demandeFormationRepondre.yaml b/paths/demandeformation/demandeFormationRepondre.yaml deleted file mode 100644 index ff49ca3..0000000 --- a/paths/demandeformation/demandeFormationRepondre.yaml +++ /dev/null @@ -1,18 +0,0 @@ -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/demandesFormationAttente.yaml b/paths/demandeformation/demandesFormationAttente.yaml deleted file mode 100644 index 3d529e8..0000000 --- a/paths/demandeformation/demandesFormationAttente.yaml +++ /dev/null @@ -1,20 +0,0 @@ -get: - tags: - - demandesFormation - operationId: getDemandesFormationEnAttente - description: Récupérer la liste des demandes de formations en attente d'une réponse - parameters: - - $ref: ../../parameters/query/asc.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/theme.yaml - - $ref: ../../parameters/query/tri.yaml - responses: - '200': - $ref: ../../responses/demandeformation/getListeDemandesFormation.yaml - - '403': - $ref: ../../responses/erreur/forbidden.yaml \ No newline at end of file diff --git a/paths/demandeformation/demandesFormationRepondues.yaml b/paths/demandeformation/demandesFormationRepondues.yaml deleted file mode 100644 index a8f681e..0000000 --- a/paths/demandeformation/demandesFormationRepondues.yaml +++ /dev/null @@ -1,20 +0,0 @@ -get: - tags: - - demandesFormation - operationId: getDemandesFormationRepondues - description: Récupérer la liste des demandes de formations ayant reçu une réponse - parameters: - - $ref: ../../parameters/query/asc.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/theme.yaml - - $ref: ../../parameters/query/tri.yaml - responses: - '200': - $ref: ../../responses/demandeformation/getListeDemandesFormation.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 1317dfc..369ecff 100644 --- a/paths/demandeformation/demandesformation.yaml +++ b/paths/demandeformation/demandesformation.yaml @@ -2,7 +2,7 @@ get: tags: - demandesFormation operationId: getDemandesFormation - description: Récupérer la liste des demandes de formations + description: Récupérer une liste de demandes de formation parameters: - $ref: ../../parameters/query/etatsDemande.yaml - $ref: ../../parameters/query/idBUs.yaml @@ -11,10 +11,38 @@ get: - $ref: ../../parameters/query/parPage.yaml - $ref: ../../parameters/query/texte.yaml - $ref: ../../parameters/query/tri.yaml - - $ref: ../../parameters/query/theme.yaml + #- $ref: ../../parameters/query/theme.yaml + - $ref: ../../parameters/query/dateDebut.yaml + - $ref: ../../parameters/query/dateFin.yaml responses: '200': $ref: ../../responses/demandeformation/getListeDemandesFormation.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 + +post: + tags: + - demandesFormation + operationId: ajouterDemandeFormation + description: Créer demande de formation pour un collaborateur + requestBody: + $ref: ../../requestbodies/demandeFormation.yaml + responses: + '200': + $ref: ../../responses/demandeformation/demandeFormationCreee.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/demandeformation/originesDemandesFormation.yaml b/paths/demandeformation/originesDemandesFormation.yaml index b2a1d94..9397109 100644 --- a/paths/demandeformation/originesDemandesFormation.yaml +++ b/paths/demandeformation/originesDemandesFormation.yaml @@ -7,5 +7,11 @@ get: '200': $ref: ../../responses/demandeformation/getListeOriginesDemandesFormation.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/participationformation/evaluer.yaml b/paths/participationformation/evaluer.yaml index afaf4aa..de715e8 100644 --- a/paths/participationformation/evaluer.yaml +++ b/paths/participationformation/evaluer.yaml @@ -19,6 +19,9 @@ put: '404': $ref: ../../responses/erreur/notFound.yaml + + '415': + $ref: ../../responses/erreur/unsupportedMediaType.yaml '500': $ref: ../../responses/erreur/internalServerError.yaml \ No newline at end of file diff --git a/responses/demandeformation/demandeFormationCreee.yaml b/responses/demandeformation/demandeFormationCreee.yaml index 5e909df..1ba3e69 100644 --- a/responses/demandeformation/demandeFormationCreee.yaml +++ b/responses/demandeformation/demandeFormationCreee.yaml @@ -1 +1,5 @@ -description: Demande formation créée \ No newline at end of file +description: Demande formation créée +content: + application/json: + schema: + $ref: ../../schemas/demandeformation/demandeFormation.yaml \ No newline at end of file diff --git a/responses/demandeformation/demandeFormationSupprimee.yaml b/responses/demandeformation/demandeFormationSupprimee.yaml new file mode 100644 index 0000000..0e0942d --- /dev/null +++ b/responses/demandeformation/demandeFormationSupprimee.yaml @@ -0,0 +1 @@ +description: Demande de formation supprimée avec succès \ No newline at end of file diff --git a/responses/demandeformation/reponseDemandeFormation.yaml b/responses/demandeformation/reponseDemandeFormation.yaml index 4730e0a..c0b431a 100644 --- a/responses/demandeformation/reponseDemandeFormation.yaml +++ b/responses/demandeformation/reponseDemandeFormation.yaml @@ -1 +1,5 @@ -description: demande formation mise à jour \ No newline at end of file +description: demande formation mise à jour +content: + application/json: + schema: + $ref: ../../schemas/demandeformation/demandeFormation.yaml \ No newline at end of file