Open jfiala opened 7 years ago
The @ApiOperation authorizations attribute is currently not included in the generated code.
For details on authorizations/scopes: https://swagger.io/docs/specification/authentication/
For details on Java @ApiOperation annotation: https://github.com/swagger-api/swagger-core/wiki/Annotations-1.5.X#authorization-authorizationscope
master
"/hello": { "get": { "tags": [ "hello" ], "summary": "", "description": "", "operationId": "sayHello", ... "security": [ { "HelloWorldAuth": [ "read:hello_world" ] } ] .... "securityDefinitions": { "HelloWorldAuth": { "type": "basic", "scopes": { "read:hello_world": "read hello world greetings" } },
Java-code:
@GET @Path("/hello") @ApiOperation(value = "", tags={ "hello", }) ... public String sayHello(@QueryParam("name") String name);
Add support for security attribute / authorizations
OpenAPI 2.0 Specification allows scopes only for OAuth 2. Basic authentication does not use scopes.
scopes
Description
The @ApiOperation authorizations attribute is currently not included in the generated code.
For details on authorizations/scopes: https://swagger.io/docs/specification/authentication/
For details on Java @ApiOperation annotation: https://github.com/swagger-api/swagger-core/wiki/Annotations-1.5.X#authorization-authorizationscope
Swagger-codegen version
master
Swagger declaration file content or url
Java-code:
Suggest a fix/enhancement
Add support for security attribute / authorizations