question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Excluded JAX-RS classes are visible in openapi

See original GitHub issue

Describe the bug

When JAX-RS classes are excluded via @IfBuildProfile (#15215), it is still visible in the generated openapi document.

Expected behavior

When a JAX-RS class is excluded from the current build via an IfBuildProperty annotation (or similar), it should also be excluded from openapi document generation.

Actual behavior

The endpoints of the JAX-RS class are visible in openapi and swagger, but can not be called.

To Reproduce

Steps to reproduce the behavior:

  1. Create a JAX-RS class
  2. include quarkus-smallrye-openapi extension
  3. add @IfBuildProfile("foo") to the class
  4. run in dev mode
  5. open swagger ui
  6. see that the JAX-RS class is visible

Environment (please complete the following information):

Quarkus version or git rev

1.13.0.Final

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
phillip-krugercommented, Apr 8, 2021

Thanks, will do

0reactions
geoandcommented, Apr 8, 2021

Let me know if you need anything from me

On Thu, Apr 8, 2021, 10:42 Phillip Krüger @.***> wrote:

Thanks, that is the problem then. We look at jandex when we build the schema. So we will have to build in something specific for this case…

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/quarkusio/quarkus/issues/16218#issuecomment-815531616, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBMDP6ZCZRATS7YMR3EBXLTHVM4ZANCNFSM42JRJ7XQ .

Read more comments on GitHub >

github_iconTop Results From Across the Web

REST clients are documented in Open API and ... - GitHub
The Open API documentation is correctly displayed in Swagger UI. 1-only-controller. If I add the JAX RS annotations to FooClient as follows:.
Read more >
F.A.Q - Springdoc-openapi
You can define your own groups of API based on the combination of: API paths and packages to scan. Each group should have...
Read more >
Exclude Models or properties from swagger response
I was fetching data from db and setting it to user object and passing that user object to JAX-RS response builder. Below is...
Read more >
OpenApiFeature - Apache Software Foundation
CXF OpenApiFeature --> <bean id="openApiFeature" class="org.apache.cxf.jaxrs.openapi.OpenApiFeature"> <!-- customize some of the properties --> </bean> .
Read more >
Generating REST API documentation with OpenAPI - IBM
The scanner goes through classes that are annotated with the OpenAPI 3.0 annotations on class definition and annotated with the @Path JAX-RS annotation....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found