|
|
Il est possible d'ajouter des chemins pour l'API REST.
|
|
|
|
|
|
Par exemple, un chemin pour récupérer les véhicules appartenants à une agence : `/agences/{id}/vehicules`
|
|
|
|
|
|
`@GetMapping("/agences/{id}/vehicules")
|
|
|
@Timed
|
|
|
public void getAgenceVehicule(@PathVariable Long id) {
|
|
|
log.debug("REST request to get vehicules in agence with id " + id.toString());
|
|
|
}`
|
|
|
|
|
|
La documentation Swagger est automatiquement générée : ![add-api-path](uploads/1a277f5fc6b3fa2790ffdc02d90a99c6/add-api-path.png) |
|
|
\ No newline at end of file |