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

io.swagger.v3.jaxrs2.Reader#resolveApplicationPath does not work with proxies #2966

Closed
nelsongraca opened this issue Sep 24, 2018 · 7 comments

Comments

@nelsongraca
Copy link

The current implementation of resolveApplicationPath fails to find the @ApplicationPath annotation if the application is a proxy, it should search for the annotation in the superclass too.

I can provide a PR with a fix if needed.

@frantuma
Copy link
Member

Thanks for reporting this, and yes a PR is welcome!

@nelsongraca
Copy link
Author

Ok, I will work on it and submit it ASAP since this would be useful for me.

@nelsongraca
Copy link
Author

Turns out it's not that simple to detect if the class is a Proxy, (at least with the ones created by Weld) I'm considering checking the superclasses until I find the @ApplicationPath annotation, from my knowledge it will not be a problem, but I would like some feedback before jumping into code.

@frantuma
Copy link
Member

frantuma commented Oct 4, 2018

I guess it's a good approach, shouldn't have side effects

@nelsongraca
Copy link
Author

Hi the PR is submitted: #2974

frantuma added a commit that referenced this issue Oct 9, 2018
@frantuma
Copy link
Member

frantuma commented Oct 9, 2018

Thanks! PR merged, closing ticket

@frantuma frantuma closed this as completed Oct 9, 2018
@jgangemi
Copy link

this issue is still broken w/ version 2.0.8. i'm using helidon, which in turn uses weld and stepping through the code, it seems the logic is reversed. the ResourceConfig is found where the weld proxy is looked for and the proxy is found where the resource config is looked for, specifically when application.getClass().getMethod("getApplication", null); is invoked.

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