Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug related to endpoints with the same path but different consumes (produces) #82

Open
achifal opened this issue Jun 10, 2021 · 4 comments

Comments

@achifal
Copy link

achifal commented Jun 10, 2021

Hi, imagine there are two methods which differ by the consumes (produces) value:

@Get
@Path("/path")
@Consumes(“application/json“)
@Produces(“application/json“)
public Response methodOne(…) {…}
@Get
@Path("/path")
@Consumes(“application/xml“)
@Produces(“application/json“)
public Response methodTwo(…) {…}

In this case the resulting documentation contains either methodOne or methodTwo but not two methods at the same time.

The version of plugin I am using is 2.1.5.
Is this a known issue and does it have any solution?
Thanks a lot in advance!

@langecode
Copy link
Member

langecode commented Jun 13, 2021 via email

@achifal
Copy link
Author

achifal commented Nov 24, 2021

Hello, @langecode.
Is there any news on this issue? If not, then maybe there is some workaround that comes to your mind

@tisonkun
Copy link

I read swagger-api/swagger-editor#854 that:

The Swagger/OpenAPI spec currently doesn't allow specifying such operations. The combination of verb+path uniquely identify an operation, query parameters do not affect it.

... and ditto consumes types.

@tisonkun
Copy link

Here is another case in apache/pulsar#18947. Although in another plugin, the case is the same.

If this plugin can somehow resolve the problem, I can try to make a migration XD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants