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

Allow multiple static openapi.yaml/json files #19131

Closed
languitar opened this issue Jul 30, 2021 · 3 comments · Fixed by #19148
Closed

Allow multiple static openapi.yaml/json files #19131

languitar opened this issue Jul 30, 2021 · 3 comments · Fixed by #19148
Assignees
Milestone

Comments

@languitar
Copy link
Contributor

Description

A service might implement multiple predefined APIs when using an API-first approach. I can also generate the appropriate model and API classes with the openapi generator by configuring multiple executions of the maven plugin with different input definition files. However, the ability of the openapi plugin for serving a static definition is currently limited to a single openapi.yaml or openapi.json file. Having the possibility to specify multiple files would aid when implementing several predefined API specifications and would avoid the need to manually merge them.

Implementation ideas

Maybe extending the list of searched paths to something like

META-INF/openapi/*.json
META-INF/openapi/*.yaml

would already be sufficient.

The configuration property should probably also accept a list of file names.

@languitar languitar added the kind/enhancement New feature or request label Jul 30, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 30, 2021

@languitar languitar changed the title Alloow multiple static openapi.yaml/json files Allow multiple static openapi.yaml/json files Jul 30, 2021
@phillip-kruger
Copy link
Member

Hi @languitar - thanks for this. We have thought about this before, and it should be possible to enhance the extension to do this. I'll have a look a.s.a.p.

Basically, we will keep the default to look for META-INF/openapi.json or META-INF/openapi.yaml except if some config is set that define the path(s) for the static file(s).

When more than one file, we merge them into one.

Something like that ?

@phillip-kruger phillip-kruger self-assigned this Jul 30, 2021
@languitar
Copy link
Contributor Author

Sounds ok to me.

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

Successfully merging a pull request may close this issue.

2 participants