I've got a java webapp where I'm doing version control via content negotiation. My method looks like:
@POST
@Consumes("application/vnd.mycompany.foo.v1+json")
@Produces("application/vnd.mycompany.bar.v1+json")
@ApiOperation(...)
@ApiResponses(...)
public Response createBar(
@ApiParam(required = true) final Foo foo) {
..
}
On the UI, for Parameter Content Type, I select "vnd.mycompany.foo.v1+json". When I [Try it out!], I get back a 406 Not Acceptable. These are the headers that go out:
Accept: application/json
Content-Type: application/vnd.eim.initial.query.v1+json; charset=UTF-8
So it's not surprising that I'm getting a 406, because my response type doesn't match the accept header. How does Swagger-UI deal with this?
Thanks,
Eric