-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 extension creates bad oapi export with @RolesAllowed #27373
Comments
- Handle method-level `@RolesAllowed` that override class-level `@RolesAllowed` values, fixes quarkusio#30997 - Render `BaseStream<T, S>` as array of `T` in OpenAPI document, fixes quarkusio#30248 (via smallrye-open-api 3.3.0) - Do not place scopes in OpenAPI security requirements unless the security scheme is OAuth2 or OIDC, fixes quarkusio#27373 - Include only OIDC discovery URL in OpenAPI when auto-security is active, fixes quarkusio#21126 Signed-off-by: Michael Edgar <[email protected]>
- Handle method-level `@RolesAllowed` that override class-level `@RolesAllowed` values, fixes quarkusio#30997 - Render `BaseStream<T, S>` as array of `T` in OpenAPI document, fixes quarkusio#30248 (via smallrye-open-api 3.3.0) - Do not place scopes in OpenAPI security requirements unless the security scheme is OAuth2 or OIDC, fixes quarkusio#27373 - Include only OIDC discovery URL in OpenAPI when auto-security is active, fixes quarkusio#21126 Signed-off-by: Michael Edgar <[email protected]>
Hi, in the newest OpenApi spec: https://github.com/OAI/OpenAPI-Specification/blob/3.1.0/versions/3.1.0.md
But with the changes from this issue, it is no longer possible to add scopes with RolesAllowed. The generated json ends up like: Would it be possible to allow back scopes to be found with the RolesAllowed annotation when the openapi version used is 3.1.0 or more? |
Describe the bug
Adding a
@RolesAllowed
annotation to a method that is to be documented with OpenAPI results in the following verification warning:The generated JSON looks like
This does not match the expectation from OpenAPI https://github.com/OAI/OpenAPI-Specification/blob/3.0.1/versions/3.0.1.md#securityRequirementObject
Expected behavior
Create correct openapi
Actual behavior
No response
How to Reproduce?
Use the openapi-swagger-quickstart with the following class
Then export the openapi.json and inspect it
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.11.2 Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: