-
Notifications
You must be signed in to change notification settings - Fork 13
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
Adding endpoint from other libs to openapi documentation #51
Comments
My first thought is something like: Each module generates the swagger file with a unique name (e.g. health-openapi.json) and a properties resource that points to it's location (/openapi.location.properties with content like location=/health-openapi.json). Then to "merge" the API's into a single API something could load all the /openapi.location.properties resources and hence then load all the module api json resources and then merge them. Something like that. Hmmm. |
Could be an idea bundling the openapi files, I should try it with 2 files. I have done a quick search but did not find a good library but will try again tomorror. Or trying to merge them just as json files... I have also been checking if I can find the other controllers and maybe add them to the openapi processor from the io.avaje.http.generator.core.BaseProcessor but I cannot search other jar files. Maybe it cannot be done or it is some knowledge that I lack, could also just be not a good way to go... Tijs PS, not really for this issue did you find some time to check my pull request because it would be nice to use it in my application |
Hi @rbygrave I have found a way but it is quite some workand do not know if you are interested in this. Like this:
But to actually process them I was looking into the code, and could not convert them into elements. I tried another way but it costs a lot of time so I would like to know if you would be interested in this because then I will try to find some more time to process the classes next to the Elements and Types Tijs |
…tters) and configureWith(BeanScope)
Hi Rob,
I was looking into a way to add endpoint from another lib to the openapi documentation of the final service.
For example I have a base project y that provides a general /health or /info endpoint and I use that lib in project z.
The endpoints are made available with the use of your inject project when I start the application, but they are not present in the openapi documentation.
Now I was wondering and trying out but could not achieve this by looking for the "Controller" classes and trying to add them but it is not looking to other inherited projects.
Would something like this be possible in combination with the @ContextModule[depenson=project y] so we know where to look and then add those endpoints? Because it would be nice to add all available endpoints to the final documentation.
Kind regards,
Tijs
The text was updated successfully, but these errors were encountered: