Skip to content
Snippets Groups Projects
Commit ca06d14d authored by Yvan Peter's avatar Yvan Peter
Browse files

ajout des formats de représentation

parent 60b681ae
No related branches found
No related tags found
No related merge requests found
......@@ -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`.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment