-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
quarkus-smallrye-openapi doesn't take in account ServerExceptionMapper annotations #31828
Comments
/cc @EricWittmann (openapi), @Ladicek (smallrye), @MikeEdgar (openapi), @jmartisk (smallrye), @phillip-kruger (openapi,smallrye), @radcortez (smallrye) |
OpenAPI can not figure out the response code from the annotation, so you will have to add OpenAPI annotations to your method. Try adding something like this:
|
Thank you! It works for me. |
Yes, you can store the schema generated by Quarkus during build by using Example: Adding this to your config Note: This exclude anything added during runtime, example custom filters. |
@SMakhrov , @phillip-kruger - is there anything else for this issue or can it be closed? |
Describe the bug
I've added swagger ui according this doc https://quarkus.io/guides/openapi-swaggerui
Also I have mapped exception annotated by @ServerExceptionMapper
Is there any way to make swagger take in account response codes from ExceptionMappers?
Expected behavior
Generated UI I take in account error responses which are generated by mappers annotated by @ServerExceptionMapper
Actual behavior
Generated UI I does't see error responses which are generated by mappers annotated by @ServerExceptionMapper
How to Reproduce?
Just create class as in but description and add swagger ui according to https://quarkus.io/guides/openapi-swaggerui
Output of
uname -a
orver
Darwin mypc 21.4.0 Darwin Kernel Version 21.4.0: Mon Feb 21 20:35:58 PST 2022; root:xnu-8020.101.4~2/RELEASE_ARM64_T6000 arm64
Output of
java -version
11.0.11 (x86_64) "AdoptOpenJDK"
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.16.4.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /Users/smakhrov/.m2/wrapper/dists/apache-maven-3.8.6-bin/67568434/apache-maven-3.8.6
Java version: 17.0.4, vendor: GraalVM Community, runtime: /Library/Java/JavaVirtualMachines/graalvm-ce-java17-22.2.0/Contents/Home
Default locale: en_DE, platform encoding: US-ASCII
OS name: "mac os x", version: "12.3", arch: "aarch64", family: "mac"
Additional information
No response
The text was updated successfully, but these errors were encountered: