-
Notifications
You must be signed in to change notification settings - Fork 90
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 (de)activating annotation scanners via the maven plugin config #1370
Labels
Comments
Olard
pushed a commit
to Olard/smallrye-open-api
that referenced
this issue
Jul 2, 2024
MikeEdgar
added a commit
that referenced
this issue
Jul 4, 2024
…ig. (#1894) * Enable selection of annotation scanners (#1370) via maven plugin config. * Update tools/maven-plugin/README.adoc --------- Co-authored-by: Bernhard Öhlinger <[email protected]> Co-authored-by: Michael Edgar <[email protected]>
MikeEdgar
added a commit
to MikeEdgar/smallrye-open-api
that referenced
this issue
Jul 9, 2024
…gin config. (smallrye#1894) * Enable selection of annotation scanners (smallrye#1370) via maven plugin config. * Update tools/maven-plugin/README.adoc --------- Co-authored-by: Bernhard Öhlinger <[email protected]> Co-authored-by: Michael Edgar <[email protected]>
MikeEdgar
added a commit
that referenced
this issue
Jul 9, 2024
* Bump org.skyscreamer:jsonassert from 1.5.1 to 1.5.3 (#1888) Bumps [org.skyscreamer:jsonassert](https://github.com/skyscreamer/JSONassert) from 1.5.1 to 1.5.3. - [Release notes](https://github.com/skyscreamer/JSONassert/releases) - [Changelog](https://github.com/skyscreamer/JSONassert/blob/master/CHANGELOG.md) - [Commits](skyscreamer/JSONassert@jsonassert-1.5.1...jsonassert-1.5.3) --- updated-dependencies: - dependency-name: org.skyscreamer:jsonassert dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump org.jboss.arquillian:arquillian-bom from 1.8.0.Final to 1.8.1.Final (#1889) Bumps [org.jboss.arquillian:arquillian-bom](https://github.com/arquillian/arquillian-core) from 1.8.0.Final to 1.8.1.Final. - [Release notes](https://github.com/arquillian/arquillian-core/releases) - [Commits](arquillian/arquillian-core@1.8.0.Final...1.8.1.Final) --- updated-dependencies: - dependency-name: org.jboss.arquillian:arquillian-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Enable selection of annotation scanners (#1370) via maven plugin config. (#1894) * Enable selection of annotation scanners (#1370) via maven plugin config. * Update tools/maven-plugin/README.adoc --------- Co-authored-by: Bernhard Öhlinger <[email protected]> Co-authored-by: Michael Edgar <[email protected]> * Bump the quarkus group with 4 updates (#1898) Bumps the quarkus group with 4 updates: io.quarkus.resteasy.reactive:resteasy-reactive-common, io.quarkus:quarkus-reactive-routes, [io.quarkus:quarkus-bom](https://github.com/quarkusio/quarkus) and io.quarkus:quarkus-maven-plugin. Updates `io.quarkus.resteasy.reactive:resteasy-reactive-common` from 3.12.0 to 3.12.1 Updates `io.quarkus:quarkus-reactive-routes` from 3.12.0 to 3.12.1 Updates `io.quarkus:quarkus-reactive-routes` from 3.12.0 to 3.12.1 Updates `io.quarkus:quarkus-bom` from 3.12.0 to 3.12.1 - [Release notes](https://github.com/quarkusio/quarkus/releases) - [Commits](quarkusio/quarkus@3.12.0...3.12.1) Updates `io.quarkus:quarkus-maven-plugin` from 3.12.0 to 3.12.1 Updates `io.quarkus:quarkus-maven-plugin` from 3.12.0 to 3.12.1 --- updated-dependencies: - dependency-name: io.quarkus.resteasy.reactive:resteasy-reactive-common dependency-type: direct:development update-type: version-update:semver-patch dependency-group: quarkus - dependency-name: io.quarkus:quarkus-reactive-routes dependency-type: direct:development update-type: version-update:semver-patch dependency-group: quarkus - dependency-name: io.quarkus:quarkus-reactive-routes dependency-type: direct:development update-type: version-update:semver-patch dependency-group: quarkus - dependency-name: io.quarkus:quarkus-bom dependency-type: direct:production update-type: version-update:semver-patch dependency-group: quarkus - dependency-name: io.quarkus:quarkus-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch dependency-group: quarkus - dependency-name: io.quarkus:quarkus-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch dependency-group: quarkus ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump io.smallrye:smallrye-parent from 44 to 45 (#1899) * Bump io.smallrye:smallrye-parent from 44 to 45 Bumps [io.smallrye:smallrye-parent](https://github.com/smallrye/smallrye-parent) from 44 to 45. - [Release notes](https://github.com/smallrye/smallrye-parent/releases) - [Commits](https://github.com/smallrye/smallrye-parent/commits) --- updated-dependencies: - dependency-name: io.smallrye:smallrye-parent dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Drop support for Java 8 compatibility Signed-off-by: Michael Edgar <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Michael Edgar <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Michael Edgar <[email protected]> * Bump io.smallrye:smallrye-build-parent from 44 to 45 (#1900) Bumps [io.smallrye:smallrye-build-parent](https://github.com/smallrye/smallrye-parent) from 44 to 45. - [Release notes](https://github.com/smallrye/smallrye-parent/releases) - [Commits](https://github.com/smallrye/smallrye-parent/commits) --- updated-dependencies: - dependency-name: io.smallrye:smallrye-build-parent dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Improve parsing of strings to objects (examples, defaults) (#1904) Signed-off-by: Michael Edgar <[email protected]> * Resource classes inherit tags from super class(es) (#1905) Signed-off-by: Michael Edgar <[email protected]> * Bump org.eclipse.jetty:jetty-bom from 11.0.21 to 11.0.22 (#1906) Bumps [org.eclipse.jetty:jetty-bom](https://github.com/jetty/jetty.project) from 11.0.21 to 11.0.22. - [Release notes](https://github.com/jetty/jetty.project/releases) - [Commits](jetty/jetty.project@jetty-11.0.21...jetty-11.0.22) --- updated-dependencies: - dependency-name: org.eclipse.jetty:jetty-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump com.fasterxml.jackson:jackson-bom from 2.17.1 to 2.17.2 (#1907) Bumps [com.fasterxml.jackson:jackson-bom](https://github.com/FasterXML/jackson-bom) from 2.17.1 to 2.17.2. - [Commits](FasterXML/jackson-bom@jackson-bom-2.17.1...jackson-bom-2.17.2) --- updated-dependencies: - dependency-name: com.fasterxml.jackson:jackson-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Michael Edgar <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Olard <[email protected]> Co-authored-by: Bernhard Öhlinger <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
When using the maven plugin for generating the openapi.json files, it's not possible to deactivate scanners that are not required.
For example, we do not use spring or vert.x, but the scanners are running still.
Also, this prevents us from extending the generated document with additional information.
The method
OpenApiAnnotationScanner#scan
already provides the means of filtering the scanners that are executed, but the maven plugin does not offer a way of setting the filter property. So it would be nice if that could be added.Rationale
I found this discussion and we have the same problem basically, so I want to elaborate further:
We also want to extend the generated document with additional information, like special query parameters which are handled by jax-rs filters and therefore aren't present in the endpoint method signatures.
We tried to achieve that by subclassing the
JaxRsAnnotationScanner
, and adding the information after e.g.processResponse
has been called since the context, the method info, and the operation are available there, and the information scanned from the annotations is already there. And generally, this does work as expected.The only problem is that the added information gets overwritten if the original
JaxRsAnnotationScanner
is executed after our custom one. The order in which the scanners are called varies since they are loaded via the javaServiceLoader
and stored in a hash map, and we found no reasonable way of making sure that our added information persists.If we just could disable the other scanners, that would make things easier 😇.
The text was updated successfully, but these errors were encountered: