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

OpenAPI still exposes@EndpointDisabled endpoints #34165

Closed
gastaldi opened this issue Jun 20, 2023 · 4 comments
Closed

OpenAPI still exposes@EndpointDisabled endpoints #34165

gastaldi opened this issue Jun 20, 2023 · 4 comments
Labels
area/openapi area/smallrye env/m1 Impacts Apple M1 machines kind/bug Something isn't working

Comments

@gastaldi
Copy link
Contributor

Describe the bug

Having an endpoint like:

@ApplicationScoped
@Path("/client")
@Tag(name = "Client", description = "Client related services")
@EndpointDisabled(name = "quarkus.registry.expose.client.config.yaml", stringValue = "false", disableIfMissing = true)
public class ClientConfigYamlEndpoint {

     @GET
    @Path("/config.yaml")
    @Produces(YAMLMediaTypes.APPLICATION_JACKSON_YAML)
    @Operation(summary = "Example Quarkus Registry Client configuration file")
    public RegistriesConfig clientConfigYaml() {}
}

When browsing the OpenAPI schema using /q/swagger-ui, I can still see the endpoint when the quarkus.registry.expose.client.config.yaml property is missing

Expected behavior

Endpoint is not listed in the OpenAPI schema

Actual behavior

Endpoint is listed and returns 404 when invoked

How to Reproduce?

  1. Run mvn quarkus:dev with Expose an example config.yaml over the registry's REST api registry.quarkus.io#197
  2. Navigate to http://localhost:8080/q/swagger-ui/
  3. The endpoint is listed there, invoking it gives 404

Output of uname -a or ver

macOS m1

Output of java -version

JDK 17

GraalVM version (if different from Java)

22.3.1

Quarkus version or git rev

3.1.2.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.2

Additional information

Extensions used:

  • io.quarkus:quarkus-resteasy-reactive-jackson
  • io.quarkus:quarkus-smallrye-openapi
@gastaldi gastaldi added the kind/bug Something isn't working label Jun 20, 2023
@quarkus-bot quarkus-bot bot added area/openapi area/smallrye env/m1 Impacts Apple M1 machines labels Jun 20, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Jun 20, 2023

/cc @EricWittmann (openapi), @MikeEdgar (openapi), @phillip-kruger (openapi)

@MikeEdgar
Copy link
Contributor

Looks like a duplicate of #34030

@gastaldi
Copy link
Contributor Author

gastaldi commented Jun 20, 2023

Ah crap, I should have searched it better. Thanks @MikeEdgar

@gastaldi
Copy link
Contributor Author

Duplicate of #34030

@gastaldi gastaldi marked this as a duplicate of #34030 Jun 20, 2023
@gastaldi gastaldi closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/openapi area/smallrye env/m1 Impacts Apple M1 machines kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants