Ask a Question

Specifying apimodel type for map value in swagger annotations

ankurt
Occasional Visitor

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!
0 REPLIES 0
cancel
Showing results for 
Search instead for 
Did you mean: