'Swagger annotations for fixed set of Strings for input
Currently I have API which have something like below
@GetMapping("/list/{type}")
@ApiOperation(nickname = "reportUnits", httpMethod = "GET", produces = "application/json", responseContainer = "List", response = ReportFormatDTO.class, value = "Returns all available report Units", notes = "Returns all available report Units", consumes = "text")
@ApiResponses({ @ApiResponse(code = 404, message = "No data found"),
@ApiResponse(code = 500, message = "Error getting Report Units"), })
Flux<ReportFormatDTO> getList(@PathVariable("type") String type);
I need to tell swagger about fixed set of String to be passed in the Path variable.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
