swagger-api/swagger-codegen

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

開放

#8,554 建立於 2018年8月8日

 (0 則留言) (0 個反應) (0 位負責人)HTML (5,474 個分叉)batch import
help wanted

倉庫指標

星標
 (12,701 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南