Jacket
5 years agoFrequent Visitor
Document a @RequestBody Map/List in Swagger
I'm creating the swagger file for the documentation of the various APi. In a controller I have the case where I request a RequestParam and a RequestBody:
@PostMapping("/message-now/save-with-params")
@Timed(value = MetricsTimerConstants.storeMessageWithParamsTimer)
public ResponseEntity<Object> saveMessageWithParams(@RequestBody Map<String, Object> request,
@RequestParam List<String> params) { .....
Is there a way to define Lists and Maps in OpenApi?I have read the documentation but I can't find a part where they explain how to define the Maps and the Lists in the Swaggers. Thanks so much for the support