aboutsummaryrefslogtreecommitdiffstats
path: root/doc/swagger/templates/operation.hbs
diff options
context:
space:
mode:
authorLasse Kaihlavirta <l.kaihlavirt@partner.samsung.com>2021-03-24 08:56:10 +0000
committerGerrit Code Review <gerrit@onap.org>2021-03-24 08:56:10 +0000
commit29e0ba3179409458b96089dd37452d4a11cc32d3 (patch)
tree615dfa2bb37b0cc6a1c5605b15b5253a2404d224 /doc/swagger/templates/operation.hbs
parent14433f2704a39d737e79543fe66db53d6d288697 (diff)
parent5ea372baed3b743dbf3ddeffb8fe1a0acdf376d6 (diff)
Merge changes Idbdec7b3,I643dadac,I2f54e1d5,I2ead5203
* changes: Provide initial a1-pe-sim docs Initial code check-in for A1 Policy Enforcement Simulator Add basic .gitignore Add linters setup
Diffstat (limited to 'doc/swagger/templates/operation.hbs')
-rw-r--r--doc/swagger/templates/operation.hbs73
1 files changed, 73 insertions, 0 deletions
diff --git a/doc/swagger/templates/operation.hbs b/doc/swagger/templates/operation.hbs
new file mode 100644
index 0000000..a581961
--- /dev/null
+++ b/doc/swagger/templates/operation.hbs
@@ -0,0 +1,73 @@
+{{#deprecated}}-deprecated-{{/deprecated}}
+<a id="{{operationId}}">{{summary}}</a>
+
+{{description}}
+
+{{#if externalDocs.url}}{{externalDocs.description}}. [See external documents for more details]({{externalDocs.url}})
+{{/if}}
+
+{{#if security}}
+#### Security
+{{/if}}
+
+{{#security}}
+{{#each this}}
+* {{@key}}
+{{#this}} * {{this}}
+{{/this}}
+{{/each}}
+{{/security}}
+
+#### Request
+
+{{#if consumes}}
+**Content-Type: ** {{join consumes ", "}}{{/if}}
+
+##### Parameters
+{{#if parameters}}
+<table border="1">
+ <tr>
+ <th>Name</th>
+ <th>Located in</th>
+ <th>Required</th>
+ <th>Description</th>
+ <th>Default</th>
+ <th>Schema</th>
+ </tr>
+{{/if}}
+
+{{#parameters}}
+<tr>
+ <th>{{name}}</th>
+ <td>{{in}}</td>
+ <td>{{#if required}}yes{{else}}no{{/if}}</td>
+ <td>{{description}}{{#if pattern}} (**Pattern**: `{{pattern}}`){{/if}}</td>
+ <td> - </td>
+{{#ifeq in "body"}}
+ <td>
+ {{#ifeq schema.type "array"}}Array[<a href="{{schema.items.$ref}}">{{basename schema.items.$ref}}</a>]{{/ifeq}}
+ {{#schema.$ref}}<a href="{{schema.$ref}}">{{basename schema.$ref}}</a> {{/schema.$ref}}
+ </td>
+{{else}}
+ {{#ifeq type "array"}}
+ <td>Array[{{items.type}}] ({{collectionFormat}})</td>
+ {{else}}
+ <td>{{type}} {{#format}}({{format}}){{/format}}</td>
+ {{/ifeq}}
+{{/ifeq}}
+</tr>
+{{/parameters}}
+{{#if parameters}}
+</table>
+{{/if}}
+
+
+#### Response
+
+{{#if produces}}**Content-Type: ** {{join produces ", "}}{{/if}}
+
+
+| Status Code | Reason | Response Model |
+|-------------|-------------|----------------|
+{{#each responses}}| {{@key}} | {{description}} | {{#schema.$ref}}<a href="{{schema.$ref}}">{{basename schema.$ref}}</a>{{/schema.$ref}}{{#ifeq schema.type "array"}}Array[<a href="{{schema.items.$ref}}">{{basename schema.items.$ref}}</a>]{{/ifeq}}{{^schema}} - {{/schema}}|
+{{/each}}