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

OASFilter is called twice #13683

Closed
Postremus opened this issue Dec 3, 2020 · 3 comments · Fixed by #13715
Closed

OASFilter is called twice #13683

Postremus opened this issue Dec 3, 2020 · 3 comments · Fixed by #13715
Assignees
Labels
area/openapi kind/bug Something isn't working
Milestone

Comments

@Postremus
Copy link
Member

Describe the bug
I have a custom OASFilter. It gets executed twice, which can be easily seen in the ui.

Expected behavior
Each filter should only be executed once for a openapi document.

Actual behavior
Filter is executed twice.

To Reproduce

Steps to reproduce the behavior:

  1. Download the reproducer:
    duplicate-oas-filter.zip

  2. mvn quarkus:dev

  3. go to localhost:8080/swagger-ui

  4. "First Filter!" is output twice on the "/hello-resteasy" operation.

Environment (please complete the following information):

  • Output of uname -a or ver:
    Linux martin 5.4.0-54-generic Allow bytecode transformers to run in parallel when using shamrock:run #60-Ubuntu SMP Fri Nov 6 10:37:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Output of java -version:
    openjdk 11.0.7 2020-04-14 LTS
    OpenJDK Runtime Environment Zulu11.39+15-CA (build 11.0.7+10-LTS)
    OpenJDK 64-Bit Server VM Zulu11.39+15-CA (build 11.0.7+10-LTS, mixed mode)
  • Quarkus version or git rev: 1.10.2.Final
  • Build tool (ie. output of mvnw --version or gradlew --version):
    Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
    Maven home: /home/martin/.sdkman/candidates/maven/current
    Java version: 11.0.7, vendor: Azul Systems, Inc., runtime: /home/martin/.sdkman/candidates/java/11.0.7-zulu
    Default locale: en_US, platform encoding: UTF-8
    OS name: "linux", version: "5.4.0-54-generic", arch: "amd64", family: "unix"
@Postremus Postremus added the kind/bug Something isn't working label Dec 3, 2020
@ghost ghost added the triage/needs-triage label Dec 3, 2020
@gsmet
Copy link
Member

gsmet commented Dec 3, 2020

/cc @phillip-kruger

@phillip-kruger
Copy link
Member

Thanks @Postremus - I am looking at this now.

@phillip-kruger
Copy link
Member

What happend here is that we moved the filter to runtime, to allow people to do dynamic filtering based on runtime config, but never removed the compile time filter, so the filter now gets called twice. #13715 fixes that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/openapi kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants