-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Jaxrs defined extension mappings interfere with swagger.json #1169
Comments
Could be the hour for me, but I don't follow you. |
Sorry I wasn't clear. The Jaxrs will follow this update with a removal of the So I wonder whether this would make a candidate for configuration or simply a case of documentation. Caveat: judging from the few hits I get when searching, I don't think that configuring extension mappings in Jaxrs is a very widely used feature. |
Whether it is or isn't, it may still be worth investigating. Just keep in mind that the usage of |
Good point. I guess if one wants their API to be discoverable by Swagger-knowledgeable tools, changing the usage won't be a very good workaround. Another (somewhat rudimentary) possibility would be for one to expose the Swagger definitions with a different endpoint on a different root than the rest of the API |
Funny you should mention it. The specification does not mention where it should be hosted, and then came this - OAI/OpenAPI-Specification#393. It doesn't affect this version, but may affect future ones. |
Thanks for pointing that out. I'll be curious to see how it develops. I see you also referenced to #1145 - that basically brings in the workaround that I have now into the fold of Swagger directly. That fix will solve my issue quite nicely. I'm not very clear on the release process, so any idea when it might make it into a release? In the meantime I can continue using my workaround, so there's no particular rush for me. Thanks for the help, and thanks for such a great tool! |
For easier reference, this should now be resolved by #1172. |
Well, not now, but will be resolved with it is merged. |
This is resolved as the PR is merged. |
Hi,
I'm not sure if this is something that should be fixed or simply documented. I've found that if Jaxrs has been configured with explicit extension mappings (ex: for JSON), it makes it impossible to access the new Swagger resource swagger.json. It's because the /swagger.json will get rewritten to /swagger by Jaxrs, which will no longer resolve to the API listing resource. The same happens if you have a yaml extension mapping defined.
One workaround is to extend the
ApiListingResource
, map /swagger and internally call eithergetListingJson(...)
orgetListingYaml(...)
.Cheers,
Sebastien
The text was updated successfully, but these errors were encountered: