Skip to content

Conversation

@michaelsonnleitner
Copy link
Contributor

#1357 Load openapi specifications from jar maven dependency (GAV) of project

  • 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.

Many thanks for submitting your Pull Request ❤️!

Please make sure that your PR meets the following requirements:

  • You have read the contributors guide
  • Your code is properly formatted according to our code style
  • Pull Request title contains the target branch if not targeting main: [0.9.x] Subject
  • Pull Request contains link to the issue
  • Pull Request contains link to any dependent or related Pull Request
  • Pull Request contains description of the issue
  • Pull Request does not include fixes for issues other than the main ticket
How 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-quarkus2 to backport the original PR to the quarkus2 branch).

NOTE: backporting is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another.

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.

NOTE: this automated backporting is triggered whenever a pull request on main branch is labeled or closed, but both conditions must be satisfied to get the new PR created.

Michael Sonnleitner added 2 commits November 10, 2025 10:05
…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`.
@michaelsonnleitner michaelsonnleitner requested a review from a team as a code owner November 10, 2025 11:02
Copy link
Member

@ricardozanini ricardozanini left a 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.

Michael Sonnleitner added 3 commits November 11, 2025 10:00
Copy link
Member

@ricardozanini ricardozanini left a 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.

Copy link
Member

@ricardozanini ricardozanini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outstanding addition, congrats!

@ricardozanini
Copy link
Member

ricardozanini commented Nov 11, 2025

Adding a few folks who used to maintain this stream feature.

@ricardozanini
Copy link
Member

@fjtirado can you please take a look?

Copy link
Contributor

@gmunozfe gmunozfe left a 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`:
Copy link
Contributor

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?)

Copy link
Contributor

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?

Copy link
Contributor Author

@michaelsonnleitner michaelsonnleitner Nov 14, 2025

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...

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants