Forum Discussion

ankurt's avatar
ankurt
Occasional Visitor
12 months 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>.

 

Using 

@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?
 
Thanks!
No RepliesBe the first to reply