swagger-codegen-generators
swagger-codegen-generators copied to clipboard
JavaJAXRSSpecServerCodegen never add security scopes to @Operation annotations
Hi,
the generator JavaJAXRSSpecServerCodegen uses a template apiInterface.mustache when interfaceOnly is set to true. Unluckily, if I set oauth2 security scheme and security tag I obtain a beautiful Java interface annotated with @Operation but no scope refered because processed as a list whereas it is a Map.
@Operation(summary = "blabla.....", description = "", security = { @SecurityRequirement(name = "my_auth", scopes = { "", }) }, tags={ "atag" })
I can fix this by override apiInterface.mustache and replace
scopes = { {{#scopes}}"{{scope}}"{{#hasMore}}, {{/hasMore}}{{/scopes}} ....
by
scopes = { {{#each scopes}}"{{@key}}"{{^@last}},{{/@last}}{{/each}}
How can I provide A Pull Request ?
Hi,
Is there any progress on this?
Thank you!