Add Swagger static document generation
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
88
http-service/src/main/templates/security.hbs
Normal file
88
http-service/src/main/templates/security.hbs
Normal file
@@ -0,0 +1,88 @@
|
||||
{{#each securityDefinitions}}
|
||||
### {{@key}}
|
||||
{{#this}}
|
||||
{{#ifeq type "oauth2"}}
|
||||
<table>
|
||||
<tr>
|
||||
<th>type</th>
|
||||
<th colspan="2">{{type}}</th>
|
||||
</tr>
|
||||
{{#if description}}
|
||||
<tr>
|
||||
<th>description</th>
|
||||
<th colspan="2">{{description}}</th>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{#if authorizationUrl}}
|
||||
<tr>
|
||||
<th>authorizationUrl</th>
|
||||
<th colspan="2">{{authorizationUrl}}</th>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{#if flow}}
|
||||
<tr>
|
||||
<th>flow</th>
|
||||
<th colspan="2">{{flow}}</th>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{#if tokenUrl}}
|
||||
<tr>
|
||||
<th>tokenUrl</th>
|
||||
<th colspan="2">{{tokenUrl}}</th>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{#if scopes}}
|
||||
<tr>
|
||||
<td rowspan="3">scopes</td>
|
||||
{{#each scopes}}
|
||||
<td>{{@key}}</td>
|
||||
<td>{{this}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
{{/each}}
|
||||
</tr>
|
||||
{{/if}}
|
||||
</table>
|
||||
{{/ifeq}}
|
||||
{{#ifeq type "apiKey"}}
|
||||
<table>
|
||||
<tr>
|
||||
<th>type</th>
|
||||
<th colspan="2">{{type}}</th>
|
||||
</tr>
|
||||
{{#if description}}
|
||||
<tr>
|
||||
<th>description</th>
|
||||
<th colspan="2">{{description}}</th>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{#if name}}
|
||||
<tr>
|
||||
<th>name</th>
|
||||
<th colspan="2">{{name}}</th>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{#if in}}
|
||||
<tr>
|
||||
<th>in</th>
|
||||
<th colspan="2">{{in}}</th>
|
||||
</tr>
|
||||
{{/if}}
|
||||
</table>
|
||||
{{/ifeq}}
|
||||
{{#ifeq type "basic"}}
|
||||
<table>
|
||||
<tr>
|
||||
<th>type</th>
|
||||
<th colspan="2">{{type}}</th>
|
||||
</tr>
|
||||
{{#if description}}
|
||||
<tr>
|
||||
<th>description</th>
|
||||
<th colspan="2">{{description}}</th>
|
||||
</tr>
|
||||
{{/if}}
|
||||
</table>
|
||||
{{/ifeq}}
|
||||
{{/this}}
|
||||
{{/each}}
|
||||
Reference in New Issue
Block a user