Path Variables
Like RequestBody
, Kleuth uses Spring's PathVariable
annotation to include path variables in the url path.
Mark function parameters as path variables the same as if creating the request mapping with the Spring RequestMapping
annotation:
/pizzas/GetPizzaById.kt
The route will map to /pizzas/{id}
.
Kleuth will also see if the value/name of the PathVariable
annotation has been set:
/pizzas/GetPizzaById.kt
The route will correctly map to /pizzas/{pizzaId}
.