1
votes
public Item addProperties(
        @Parameter(description = "identifier of the item")
        @PathVariable("id") String id,
        @Parameter(description = "map of property names and values ", 
                content = @Content(schema = @Schema(type = "object", implementation = Map.class)))
        @RequestBody Map<String, Object> properties) 

For the above code, only Parameter id is getting generated and its completely missing requestBody. I added type="object" based on https://swagger.io/docs/specification/data-models/dictionaries/ .

1

1 Answers

3
votes

RequestBody type has to be a class. So any of Map's implementations would work (i.e. HashMap)

@RequestBody HashMap<String, Object> properties