From ca06d14d7ff2d1ac0608ac2071a88b012a715085 Mon Sep 17 00:00:00 2001 From: Yvan Peter <yvan.peter@univ-lille.fr> Date: Fri, 5 Feb 2021 18:17:35 +0100 Subject: [PATCH] =?UTF-8?q?ajout=20des=20formats=20de=20repr=C3=A9sentatio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 075b61d..4c61d0c 100644 --- a/README.md +++ b/README.md @@ -119,11 +119,22 @@ Notre ressource sera accessible via le chemin `/api/v1`. Le tableau ci-dessous l | URI | Méthode | MIME | Requête | Réponse | |--------------------------|---------|--------------------------------------------------------------------------------------------|------------|----------------------| | /taches | GET | <-application/json<br><-application/xml | | liste des tâches | -| /taches | POST | <-:->application/json<br><-:application/x-www-form-urlencoded | tâche (T1) | | -| /taches/{id} | GET | <-:application/json<br><-:application/xml | | la tâche (T2) | -| /taches/{id} | PUT | <-:->application/json | tâche (T2) | la nouvelle tâche (T2) | +| /taches | POST | <-/->application/json<br>->application/x-www-form-urlencoded | tâche (T1) | | +| /taches/{id} | GET | <-application/json<br><-application/xml | | la tâche (T2) | +| /taches/{id} | PUT | <-/->application/json | tâche (T2) | la nouvelle tâche (T2) | | /taches/{id} | DELETE | | | 204 No Content | -| /taches/{id}/description | GET | <-:text/plain | | chaîne de caractères | +| /taches/{id}/description | GET | <-text/plain | | chaîne de caractères | + +Le format de création d'une tâche (T1) correspond à ce type de représentation : +~~~json +{"description":"une description", "nom":"un nom de tâche"} +~~~ + +Le format de tâche complet (T2) correspond à ce type de représentation : + +~~~json +{"description":"une description", "id":"4ba24fd7-5856-4678-8f9e-84802e3334dd", "nom":"un nom de tâche"} +~~~ ## Récupérer une tâche Nous pouvons déjà lancer les tests pour voir ce qu'il se passe : `mvn test`. -- GitLab