-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
LRA extension endpoints are populated to Swagger UI automatically #23586
Comments
Thanks for this. This will have to be in the LRA Extension, but I can also have a look. |
I can take a look, @phillip-kruger |
You mean under |
yes, under /q as coordinator and proxy paths aren't user paths. |
Seems reasonable, albeit somewhat breaking |
proxy calls should not be exposed to users, these are used if the user doesn't expose business REST methods for participant. But I understand. I'll mention it in the PR. |
@xstefank - any news on this ? |
@phillip-kruger didn't have much time for this one. Will try to prioritize. |
@phillip-kruger I actually got an external contributor willing to look at this :) So sorry that I don't have time for LRA work. |
No worries :) |
I started looking at this. My first idea was to change the My second idea was to recreate proxy endpoints in LRA Extension. |
@xstefank You will find a working solution there : pcheucle@82b9a22 Basically, I used shade plugin to exclude It's working but I am still looking for a cleaner approach. |
AFAIR, the OpenAPI extension does not take into account the annotation transformer stuff at all, but @phillip-kruger would know for sure |
Yea, the best way to achieve this is with filters |
@MikeEdgar do you have any suggestions ? |
@pcheucle, sorry I'm late to the party; I was traveling. I think you're on the right path, but I think we should try a solution where we either transform Narayana classes or remove them and add a new override, as you did. I kind of don't like shading out beans.xml since this can become a problem down the line. I'll cycle this back to @geoand :) https://stackoverflow.com/a/70847243/14040597. I think this should work for our use case. Maybe Your solution as it stands now needs to at least not hardcode the Will you try this? |
If these endpoints are under the non-application path, they would still be picked up from the index by the OpenAPI scanner, right? Or would those end up in a separate index that we're not using? Otherwise, using a filter or perhaps adding a new OpenAPI build item by which extensions can provide classes/packages to exclude from the OpenAPI would work. |
@MikeEdgar similar case as /q/health or /q/metrics, do we pick those to OpenAPI? |
The Health extension can create a filter that adds those paths to the OpenAPI, but I don't believe metrics has that. If those are not using JAX-RS annotations they're invisible to the OpenAPI scanner by default. |
@xstefank I also tried And yes, I will not hardcode the |
@pcheucle TBH, if there is no better way, then we can just "hide" the endpoints from user view for this issue. Just adjust it to take the config changes into account and open a PR please. |
Description
When using LRA and OpenAPI + Swagger UI, all LRA endpoints + business endpoints are shown in the UI. I think that by default it should show only business endpoints and if it is set, then show the LRA endpints
endpoints
Implementation ideas
Remove none business endpoints from swagger UI and add a flag when you want to see them.
The text was updated successfully, but these errors were encountered: