Reputation: 415
I want to split different resources by custom accept header for example:
@Produces("application/vnd.test+json; version=1.0")
public method1...
@Produces("application/vnd.test+json; version=2.0")
public method2
which throws
org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization.|[[FATAL] A resource model has ambiguous (sub-)resource method for HTTP method GET and input mime-types as defined by"@Consumes" and "@Produces" annotations at Java methods...
These two methods produces and consumes exactly the same mime-types and therefore their invocation as a resource methods will always fail.; source='org.glassfish.jersey.server.model.RuntimeResource@7d44a19
Did anyone got a working solution with this pattern?
Upvotes: 1
Views: 426
Reputation: 415
Looks like bug in jersey library.
https://java.net/jira/browse/JERSEY-3003
Upvotes: 1