@@ -10,6 +10,8 @@ import io.swagger.annotations.ApiOperation;
10
10
import io.swagger.annotations.ApiParam;
11
11
import io.swagger.annotations.ApiResponse;
12
12
import io.swagger.annotations.ApiResponses;
13
+ import io.swagger.annotations.Authorization;
14
+ import io.swagger.annotations.AuthorizationScope;
13
15
14
16
import org.springframework.http.HttpStatus;
15
17
import org.springframework.http.ResponseEntity;
@@ -35,7 +37,13 @@ import static org.springframework.http.MediaType.*;
35
37
public class { {classname} } {
36
38
{{#operation} }
37
39
38
- @ApiOperation(value = "{ {{summary} }}", notes = "{ {{notes} }}", response = { {{returnType} }}.class{ {#returnContainer} }, responseContainer = "{ {{returnContainer} }}"{ {/returnContainer} })
40
+ @ApiOperation(value = "{ {{summary} }}", notes = "{ {{notes} }}", response = { {{returnType} }}.class{ {#returnContainer} }, responseContainer = "{ {{returnContainer} }}"{ {/returnContainer} }{ {#hasAuthMethods} }, authorizations = {
41
+ {{#authMethods} }@Authorization(value = "{ {name} }"{ {#isOAuth} }, scopes = {
42
+ {{#scopes} }@AuthorizationScope(scope = "{ {scope} }", description = "{ {description} }"){ {#hasMore} },
43
+ { {/hasMore} }{ {/scopes} }
44
+ }{ {/isOAuth} }){ {#hasMore} },
45
+ { {/hasMore} }{ {/authMethods} }
46
+ }{ {/hasAuthMethods} })
39
47
@ApiResponses(value = { {{#responses} }
40
48
@ApiResponse(code = { {{code} }}, message = "{ {{message} }}"){ {#hasMore} },{ {/hasMore} }{ {/responses} } })
41
49
@RequestMapping(value = "{ {path} }",
0 commit comments