OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.3k stars 6.44k forks source link

[BUG] [java-micronaut-server] security annotation always @Secured({SecurityRule.IS_AUTHENTICATED}) #16537

Open menesty opened 1 year ago

menesty commented 1 year ago
Description

Have configures security for endpoint but code always generate with annotation @Secured({SecurityRule.IS_AUTHENTICATED})

expected with annotation @Secured({"client")

Micronaut version 4.1.0

openapi-generator version

7.0.0

OpenAPI declaration file content or url

openapi: 3.0.0 info: title: Client Service API description: Business response for management companies, places, menus API. contact: name: test url: test email: test version: 1.0.0 security:

altro3 commented 2 weeks ago

@menesty Fixed it here: https://github.com/micronaut-projects/micronaut-openapi/pull/1733

Just use official micronaut generator for java and kotlin by micronaut-opeanpi gradle or maven plugin from this repo: https://github.com/micronaut-projects/micronaut-openapi

Look to this guide: https://guides.micronaut.io/latest/micronaut-openapi-generator-server.html

Also, please describe problems and suggestions here: https://github.com/micronaut-projects/micronaut-openapi/issues