Forum Discussion

ankurt's avatar
Occasional Visitor
2 years ago

Specifying apimodel type for map value in swagger annotations

Hi all, 


I am trying to specify api response type in swagger annotations in Java. Currently, the type is Map<sting, CustomClass>.



@ApiResponse(code = 200, message = "request succeeded", response = Map.class) results into a schema where additionalProperties is Object type.
Whereas, I would like to use a ref to the CustomClass apimodel. How can I specify type of the Map value in swagger annotations?
No RepliesBe the first to reply