quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.58k stars 2.63k forks source link

Quarkus 3.11: why do the quarkus-smallrye-openapi extension expose a "fail" endpoint ? #42675

Open nicolasduminil opened 4 weeks ago

nicolasduminil commented 4 weeks ago

Describe the bug

Using the quarkus-smallrye-openapi extension in Quarkus 3.11 exposes a fail endpoint. Not sure where does it come from but I need to get rid of it. How ?

Expected behavior

I expect that only the endpoints defined in the associated REST controller be exposed.

Actual behavior

In addition to the endpoints defined in the associated REST controller, a fail endpoint is exposed as well:

---
openapi: 3.0.3
info:
  title: quarkus-simple API
  version: 1.0-SNAPSHOT
paths:
  /fail:
    get:
      responses:
        "204":
          description: No Content
    put:
      responses:
        "204":
          description: No Content
    post:
      responses:
        "204":
          description: No Content
    delete:
      responses:
        "204":
          description: No Content
    options:
      responses:
        "204":
          description: No Content
    head:
      responses:
        "204":
        description: No Content
    patch:
      responses:
        "204":
          description: No Content
    trace:
      responses:
        "204":
          description: No Content
...

How to Reproduce?

Don't have a reproducer.

Output of uname -a or ver

Linux nicolas-XPS-13-9360 6.8.0-40-generic #40~22.04.3-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 30 17:30:19 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

java version "21.0.4" 2024-07-16 LTS Java(TM) SE Runtime Environment (build 21.0.4+8-LTS-274) Java HotSpot(TM) 64-Bit Server VM (build 21.0.4+8-LTS-274, mixed mode, sharing)

Quarkus version or git rev

3.11.0

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

Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9) Maven home: /opt/apache-maven-3.9.4 Java version: 21.0.4, vendor: Oracle Corporation, runtime: /usr/lib/jvm/jdk-21.0.4-oracle-x64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "6.8.0-40-generic", arch: "amd64", family: "unix"

Additional information

N/A

quarkus-bot[bot] commented 4 weeks ago

/cc @EricWittmann (openapi), @Ladicek (smallrye), @MikeEdgar (openapi), @jmartisk (smallrye), @phillip-kruger (openapi,smallrye), @radcortez (smallrye)

MikeEdgar commented 4 weeks ago

Hi @nicolasduminil a reproducer here would be helpful. It sounds as though there is a REST endpoint somewhere on your application's classpath with annotations that are being scanned. Apparently it's not enabled at runtime if you are unable to use those endpoints.

geoand commented 5 days ago

Hey @nicolasduminil, were you able to come up with the reproducer @MikeEdgar mentioned above?

Thanks