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
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
I try to create RBAC authentication based on micronaut controller.
The micronaut controller was generated from openapi spec. The generator ignores the scope of the securitySchemes. I expected the security scopes in @Secured annotation. The generated file contains: @Secured({SecurityRule.IS_AUTHENTICATED}), but expected annotations like: @Secured({"write", "read"})
The generated code is in build/generate-resources/main/src/main/java/com/example/api/AbstractDefaultController.java
Related issues/PRs
Suggest a fix
I suggest that openapi generator load scopes information from /security or /components/securitySchemes I expect to see in generated controllers the scopes of the security, like @Secured("write", "admin")
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
I try to create RBAC authentication based on micronaut controller.
The micronaut controller was generated from openapi spec. The generator ignores the scope of the
securitySchemes
. I expected the security scopes in@Secured
annotation. The generated file contains:@Secured({SecurityRule.IS_AUTHENTICATED})
, but expected annotations like:@Secured({"write", "read"})
openapi-generator version
OpenAPI declaration file content or url
Here is a link: https://github.com/rost5000/micronaut-server-openapi/blob/master/src/main/resources/openapi.yaml
Generation Details
Steps to reproduce
./gradlew clean build
Related issues/PRs
Suggest a fix
I suggest that openapi generator load scopes information from
/security
or/components/securitySchemes
I expect to see in generated controllers the scopes of the security, like@Secured("write", "admin")
The text was updated successfully, but these errors were encountered: