-
Notifications
You must be signed in to change notification settings - Fork 113
#1357 Load openapi specifications from jar maven dependency (GAV) of project #1376
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
base: main
Are you sure you want to change the base?
Conversation
…quarkiverse#1357 - Added support for zipped (jar/zip) OpenAPI specifications. - Introduced `ZippedSpecInputModel` and `JarOrZipGAVCoordinateOpenApiSpecInputProvider`. - Updated `SpecItemConfig` and `CodegenConfig` to allow specification of multiple GAV-based files. - Reworked tests to include parameterized testing for multiple GAV sources. - Simplified YAML-based GAV provider to inherit from `AbstractGAVCoordinateOpenApiSpecInputProvider`.
ricardozanini
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Many thanks for this contrib. Can you please also add the documentation side for this? The ones added to this PR was automatically added by the quarkus plugin based on the new properties.
...erse/openapi/generator/deployment/codegen/JarOrZipGAVCoordinateOpenApiSpecInputProvider.java
Outdated
Show resolved
Hide resolved
client/integration-tests/gav/src/it/02-consume-gav/src/main/resources/application.properties
Outdated
Show resolved
Hide resolved
ricardozanini
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I have a few nitypicks; Aside, I think there's one small fix we need to do in the config scheme since Quarkus now thinks that gav inherits everything from spec.
...se/openapi/generator/deployment/codegen/YamlOrJsonGAVCoordinateOpenApiSpecInputProvider.java
Outdated
Show resolved
Hide resolved
docs/modules/ROOT/pages/includes/quarkus-openapi-generator_quarkus.openapi-generator.adoc
Outdated
Show resolved
Hide resolved
client/deployment/src/main/java/io/quarkiverse/openapi/generator/deployment/GavItemConfig.java
Outdated
Show resolved
Hide resolved
ricardozanini
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outstanding addition, congrats!
|
Adding a few folks who used to maintain this stream feature. |
|
@fjtirado can you please take a look? |
gmunozfe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, just some comments in documentation, great work @michaelsonnleitner !
| </dependency> | ||
|
|
||
| GAV scanning is activated by default. JAR and ZIP types are supported. The default artifact ID filter is `.\*openapi.*`. To add | ||
| GAV scanning support for JAR and ZIP files, you also need to add each one explicitly in your `application.properties`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is ambiguous ("each one" refers to what? each JAR/ZIP? each GAV?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not very clear to me: If scanning is “default”, what exactly is not scanned unless included manually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
general gav scanning (yaml/jar/zip/json/yml) is active by default. yamls/json/yml gavs are found without the need of explicitly defined if pattern openapi matches. jars/zips gavs must be added to include list because there might be alot jars which have openapi in their name...
#1357 Load openapi specifications from jar maven dependency (GAV) of project
ZippedSpecInputModelandJarOrZipGAVCoordinateOpenApiSpecInputProvider.SpecItemConfigandCodegenConfigto allow specification of multiple GAV-based files.AbstractGAVCoordinateOpenApiSpecInputProvider.Many thanks for submitting your Pull Request ❤️!
Please make sure that your PR meets the following requirements:
[0.9.x] SubjectHow to backport a pull request to a different branch?
In order to automatically create a backporting pull request please add one or more labels having the following format
backport-<branch-name>, where<branch-name>is the name of the branch where the pull request must be backported to (e.g.,backport-quarkus2to backport the original PR to thequarkus2branch).Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.
If something goes wrong, the author will be notified and at this point a manual backporting is needed.