swagger-api/swagger-codegen

[jaxrs-jersey] 3.0.0 error found running sample with useTags libbrary

Open

#8554 opened on Aug 8, 2018

View on GitHub
 (0 comments) (0 reactions) (0 assignees)HTML (12,701 stars) (5,474 forks)batch import
help wanted

Description

Description

This error is present for jersey1 and jersey2 libraries, generator works fine and output code can be build with mvn package, however when we try to run sample with mvn jetty:run we got a long error message like this:

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 public javax.ws.rs.core.Response io.swagger.api.StoreApi.getInventory(javax.ws.rs.core.SecurityContext) throws io.swagger.api.NotFoundException 
and public javax.ws.rs.core.Response io.swagger.api.StoreApi.getOrderById(java.lang.Integer,javax.ws.rs.core.SecurityContext) throws io.swagger.api.NotFoundException at matching regular expression /Store. 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@259b85d6', 
[FATAL] A resource model has ambiguous (sub-)resource method for HTTP method POST and input mime-types as defined by"@Consumes" and "@Produces" annotations at Java methods public javax.ws.rs.core.Response io.swagger.api.UserApi.createUser(io.swagger.model.User,javax.ws.rs.core.SecurityContext) throws io.swagger.api.NotFoundException 
and public javax.ws.rs.core.Response io.swagger.api.UserApi.createUsersWithArrayInput(java.util.List,javax.ws.rs.core.SecurityContext) throws io.swagger.api.NotFoundException at matching regular expression /User. 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@48eaf42f',
Swagger-codegen version

3.0.0

Swagger declaration file content or url

https://gist.github.com/HugoMario/5292d9936367ac145ba80e895793e003

Contributor guide