1
votes

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?

1
Why not use application/vnc.test.1+json?user6999902
its legacy system.Gregor

1 Answers

1
votes