You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@turing85 the bug/issue here is that the @Parameter(ref = HttpHeaders.ACCEPT_ENCODING) is (incorrectly) being linked to the request body method parameter, generating the schema in the process. Before a fix is available, you should be able to modify the method arguments, adding @Parameter(ref = HttpHeaders.ACCEPT_ENCODING) String acceptEncoding as a work-around.
Alternatively, you can use mp.openapi.extensions.smallrye.remove-unused-schemas.enable=true to drop the unused schema.
Describe the bug
In some cases,
quarkus-smallrye-openapi
generates schemas that are unused.Expected behavior
Pre-defined schemas should be used.
Actual behavior
A schema is automagically created, but not used anywhere.
How to Reproduce?
Reproducer:
OpenApiDefinition.java
, line 36 ff. (github.com
)http://localhost:8080/q/openapi.yml
and inspect it:<1>
is the expicitly defined request<2>
is the automagically created request that is not used anywhere@Parameter
-annotation fromUserEndpoint.java
, line 18 (github.com
)http://localhost:8080/q/openapi.yml
and inspect it:Output of
uname -a
orver
Linux xxx 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
Quarkus version or git rev
3.17.5
Build tool (ie. output of
mvnw --version
orgradlew --version
)Additional information
No response
The text was updated successfully, but these errors were encountered: