MAJ des urls pour la partie note en fonction des spécifications techniques

master
jboinembalome 4 years ago
parent 2309c44093
commit 8d8d593fe3
  1. 32
      openapi.yaml
  2. 2
      parameters/path/idAuteur.yaml
  3. 16
      paths/note/noteById.yaml
  4. 30
      paths/note/notes.yaml
  5. 18
      paths/note/notesIdAuteur.yaml
  6. 27
      paths/note/notesIdAuteurCount.yaml
  7. 65
      paths/note/notesIdNote.yaml
  8. 22
      paths/note/notesParCollaborateur.yaml
  9. 12
      paths/note/nouvelleNote.yaml
  10. 16
      paths/note/supprimerNote.yaml
  11. 18
      paths/note/updateNote.yaml
  12. 2
      responses/erreur/notfound.yaml
  13. 5
      responses/erreur/unsupportedMediaType.yaml
  14. 7
      responses/note/getCountNote.yaml
  15. 6
      responses/note/noteCreee.yaml
  16. 2
      responses/note/noteSupprimee.yaml
  17. 6
      responses/note/updateNote.yaml

@ -31,28 +31,22 @@ paths:
#Note #Note
/notes/: /notes/:
$ref: ./paths/note/notes.yaml $ref: ./paths/note/notes.yaml
/notes/nouvellenote:
$ref: ./paths/note/nouvelleNote.yaml
/notes/{idNote}: /notes/{idNote}:
$ref: ./paths/note/noteById.yaml $ref: ./paths/note/notesIdNote.yaml
/notes/{idNote}/updateNote: /notes/{idAuteur}:
$ref: ./paths/note/updateNote.yaml $ref: ./paths/note/notesIdAuteur.yaml
/notes/auteur/{idReferent}: /notes/{idAuteur}/count:
$ref: ./paths/note/notesAuteur.yaml $ref: ./paths/note/notesIdAuteurCount.yaml
/notes/auteur/{idReferent}/collaborateur/{idCollaborateur}:
$ref: ./paths/note/notesParCollaborateur.yaml
/notes/{idNote}/supprimer:
$ref: ./paths/note/supprimerNote.yaml
#Referent #Referent
/referents: #/referents:
$ref: ./paths/referents/referents.yaml #$ref: ./paths/referents/referents.yaml
/referents/{idReferent}: #/referents/{idReferent}:
$ref: ./paths/referents/referentById.yaml #$ref: ./paths/referents/referentById.yaml
/referents/collaborateur/{idCollaborateur}: #/referents/collaborateur/{idCollaborateur}:
$ref: ./paths/referents/referentsByCollaborateur.yaml #$ref: ./paths/referents/referentsByCollaborateur.yaml
/referents/actuel/collaborateur/{idCollaborateur}: #/referents/actuel/collaborateur/{idCollaborateur}:
$ref: ./paths/referents/referentActuelByCollaborateur.yaml #$ref: ./paths/referents/referentActuelByCollaborateur.yaml
#EP #EP
/ep: /ep:

@ -4,4 +4,4 @@ schema:
type: string type: string
format: uuid format: uuid
required: true required: true
description: id de l'auteur description: Id de l'auteur

@ -1,16 +0,0 @@
get:
tags:
- notes
operationId: getNoteById
description: Récupérer une note par son id
parameters:
- $ref: ../../parameters/path/idNote.yaml
responses:
'200':
$ref: ../../responses/note/getNote.yaml
'403':
$ref: ../../responses/erreur/forbidden.yaml
'404':
$ref: ../../responses/erreur/notFound.yaml

@ -1,16 +1,22 @@
get: post:
tags: tags:
- notes - notes
operationId: getNotes operationId: addNote
description: Récupérer toutes les notes description: Créer une nouvelle note.
parameters: requestBody:
- $ref: ../../parameters/query/asc.yaml $ref: ../../requestbodies/note.yaml
- $ref: ../../parameters/query/numPage.yaml
- $ref: ../../parameters/query/parPage.yaml
- $ref: ../../parameters/query/texte.yaml
- $ref: ../../parameters/query/tri.yaml
responses: responses:
'200': '201':
$ref: ../../responses/note/getListeNotes.yaml $ref: ../../responses/note/noteCreee.yaml
'401':
$ref: ../../responses/erreur/unauthorized.yaml
'403': '403':
$ref: ../../responses/erreur/forbidden.yaml $ref: ../../responses/erreur/forbidden.yaml
'415':
$ref: ../../responses/erreur/unsupportedMediaType.yaml
'500':
$ref: ../../responses/erreur/internalServerError.yaml

@ -1,21 +1,27 @@
get: get:
tags: tags:
- notes - notes
operationId: getNotesByAuteur operationId: getNotesAuteur
description: Récupérer les notes d'une personne a écrite description: Récupérer les notes d’un auteur.
parameters: parameters:
- $ref: ../../parameters/path/idAuteur.yaml
- $ref: ../../parameters/query/asc.yaml - $ref: ../../parameters/query/asc.yaml
- $ref: ../../parameters/path/idReferent.yaml
- $ref: ../../parameters/query/numPage.yaml - $ref: ../../parameters/query/numPage.yaml
- $ref: ../../parameters/query/parPage.yaml - $ref: ../../parameters/query/parPage.yaml
- $ref: ../../parameters/query/texte.yaml - $ref: ../../parameters/query/texte.yaml
- $ref: ../../parameters/query/tri.yaml - $ref: ../../parameters/query/tri.yaml
responses: responses:
'200': '200':
$ref: ../../responses/note/getListeNotes.yaml $ref: ../../responses/note/getListeNotes.yaml
'401':
$ref: ../../responses/erreur/unauthorized.yaml
'403': '403':
$ref: ../../responses/erreur/forbidden.yaml $ref: ../../responses/erreur/forbidden.yaml
'404': '404':
$ref: ../../responses/erreur/notFound.yaml $ref: ../../responses/erreur/notFound.yaml
'500':
$ref: ../../responses/erreur/internalServerError.yaml

@ -0,0 +1,27 @@
get:
tags:
- notes
operationId: getNotesAuteurCount
description: Récupérer le nombre total de notes d’un auteur.
parameters:
- $ref: ../../parameters/path/idAuteur.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/note/getCountNote.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

@ -0,0 +1,65 @@
get:
tags:
- notes
operationId: getNoteById
description: Récupérer une note par son id.
parameters:
- $ref: ../../parameters/path/idNote.yaml
responses:
'200':
$ref: ../../responses/note/getNote.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:
- notes
operationId: updateNote
description: Modifier une note.
parameters:
- $ref: ../../parameters/path/idNote.yaml
requestBody:
$ref: ../../requestbodies/note.yaml
responses:
'200':
$ref: ../../responses/note/updateNote.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:
- 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

@ -1,22 +0,0 @@
get:
tags:
- notes
operationId: getNotesByCollaborateur
description: Récupérer une note par son id
parameters:
- $ref: ../../parameters/query/asc.yaml
- $ref: ../../parameters/path/idCollaborateur.yaml
- $ref: ../../parameters/path/idReferent.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/note/getListeNotes.yaml
'403':
$ref: ../../responses/erreur/forbidden.yaml
'404':
$ref: ../../responses/erreur/notFound.yaml

@ -1,12 +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

@ -1,16 +0,0 @@
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

@ -1,18 +0,0 @@
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

@ -1,4 +1,4 @@
description: Ressource n'a pas été trouvée description: La ressource n'a pas été trouvée
content: content:
application/json: application/json:
schema: schema:

@ -0,0 +1,5 @@
description: L’opération ne peut pas être effectuée car certaines données sont manquantes
content:
application/json:
schema:
$ref: ../../schemas/erreur/erreur.yaml

@ -0,0 +1,7 @@
description: OK
content:
application/json:
schema:
type: integer
format: int64
description: Nombre total de notes

@ -1 +1,5 @@
description: Note créée avec succès description: Note créée avec succès
content:
application/json:
schema:
$ref: ../../schemas/note/detailsNote.yaml

@ -1 +1 @@
description: Note supprimée description: Note supprimée avec succès

@ -1 +1,5 @@
description: Note mise à jour avec succès description: Note modifiée avec succès
content:
application/json:
schema:
$ref: ../../schemas/note/detailsNote.yaml
Loading…
Cancel
Save