diff --git a/paths/formation/formations.yaml b/paths/formation/formations.yaml index da006c9..66ff8c5 100644 --- a/paths/formation/formations.yaml +++ b/paths/formation/formations.yaml @@ -2,7 +2,7 @@ get: tags: - formations operationId: getFormations - description: Récupérer la liste des formations + description: Récupérer la liste des formations. parameters: - $ref: ../../parameters/query/idAgence.yaml - $ref: ../../parameters/query/idStatuts.yaml @@ -29,13 +29,13 @@ get: post: tags: - formations - operationId: ajouterFormation - description: Ajouter une nouvelle formation + operationId: addFormation + description: Créer une nouvelle formation. requestBody: $ref: ../../requestbodies/formation.yaml responses: '201': - $ref: ../../responses/formation/formationCreee.yaml + $ref: ../../responses/formation/AddFormation.yaml '401': $ref: ../../responses/erreur/unauthorized.yaml diff --git a/paths/formation/formationsCount.yaml b/paths/formation/formationsCount.yaml index 41553d2..1f790fd 100644 --- a/paths/formation/formationsCount.yaml +++ b/paths/formation/formationsCount.yaml @@ -2,7 +2,7 @@ get: tags: - formations operationId: getFormationsCount - description: Récupérer le nombre total de formations + description: Récupérer le nombre total de formations. parameters: - $ref: ../../parameters/query/idAgence.yaml - $ref: ../../parameters/query/idStatuts.yaml diff --git a/paths/formation/formationsIdFormation.yaml b/paths/formation/formationsIdFormation.yaml new file mode 100644 index 0000000..3e15031 --- /dev/null +++ b/paths/formation/formationsIdFormation.yaml @@ -0,0 +1,73 @@ +get: + tags: + - formations + operationId: getFormationById + description: Récupérer une formation par son id. + parameters: + - $ref: ../../parameters/path/idFormation.yaml + responses: + '200': + $ref: ../../responses/formation/getFormation.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 + +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 + + '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 + +delete: + tags: + - formations + operationId: deleteFormation + description: Supprimer une formation par son id. + parameters: + - $ref: ../../parameters/path/idFormation.yaml + responses: + '204': + $ref: ../../responses/formation/deleteFormation.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/formation/modesFormation.yaml b/paths/formation/modesFormation.yaml index c7f0ebf..1ba7410 100644 --- a/paths/formation/modesFormation.yaml +++ b/paths/formation/modesFormation.yaml @@ -2,10 +2,16 @@ get: tags: - formations operationId: getModesFormation - description: Récupérer les modes de formation + description: Récupérer la liste des modes de formation. responses: '200': $ref: ../../responses/formation/getListeModesFormation.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 diff --git a/paths/formation/originesFormation.yaml b/paths/formation/originesFormation.yaml index bef2e38..4e29f4d 100644 --- a/paths/formation/originesFormation.yaml +++ b/paths/formation/originesFormation.yaml @@ -2,10 +2,16 @@ get: tags: - formations operationId: getOriginesFormation - description: Récupérer les origines de formation + description: Récupérer la liste des origines de formation. responses: '200': $ref: ../../responses/formation/getListeOriginesFormation.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 diff --git a/paths/formation/statutsFormation.yaml b/paths/formation/statutsFormation.yaml index 76ee727..3020f44 100644 --- a/paths/formation/statutsFormation.yaml +++ b/paths/formation/statutsFormation.yaml @@ -2,10 +2,16 @@ get: tags: - formations operationId: getStatutsFormation - description: Récupérer les statuts de formation + description: Récupérer la liste des statuts de formation. responses: '200': $ref: ../../responses/formation/getListeStatutsFormation.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 diff --git a/paths/formation/typesFormation.yaml b/paths/formation/typesFormation.yaml index 6dab57c..1707279 100644 --- a/paths/formation/typesFormation.yaml +++ b/paths/formation/typesFormation.yaml @@ -2,10 +2,16 @@ get: tags: - formations operationId: getTypesFormation - description: Récupérer les types de formation + description: Récupérer la liste des types de formation. responses: '200': $ref: ../../responses/formation/getListeTypesFormation.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