@GET
@Path("/{xxx}{yyy:(/.+)?}")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@ApiOperation(value = "Some infos", notes = "Some notes")
@ApiResponses(value = {
@ApiResponse(code = 200, message = STATUS_MESSAGE_OK, response =
Object.class)
})
public Response read(
@HeaderParam("Accept") @ApiParam(hidden = true) String
responseContentType
) {
Object response;
if (responseContentType.equals(MediaType.APPLICATION_JSON)) {
response = ...
} else {
response = ...
}
return Response.ok(response).build();
}
Hi gurus,
I'm implementing this to return a JSON depending on what the response content
type is.
The first type is Foo and the second is a Map<String, Object>.
The problem is the Example Panel uses the "response" param to show the response
structure but in this case it's Object and it shows {}.
How can I fix it? Is there a way to override the Example panel?
Regards,
Emerald
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.