diff options
author | Geora Barsky <georab@amdocs.com> | 2018-10-26 12:53:09 -0400 |
---|---|---|
committer | Geora Barsky <georab@amdocs.com> | 2018-11-01 12:36:15 -0400 |
commit | 28d58cedeba041e536d71f82325cb1d32eeba730 (patch) | |
tree | 1b3cc54c3c3d609c7dcbd469ea422d15ec022b94 /src/main/resources/operation.hbs | |
parent | 49cc90f205535596dfdad0cf81a5bbf6ad93f5f8 (diff) |
Enhance model to support L2 Fabric
Adding JUnit tests and swagger specs
Issue-ID: LOG-780
Change-Id: Iaf7cb19a6310ebdeef085a94f00623041aa4f89b
Signed-off-by: Geora Barsky <georab@amdocs.com>
Diffstat (limited to 'src/main/resources/operation.hbs')
-rw-r--r-- | src/main/resources/operation.hbs | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/src/main/resources/operation.hbs b/src/main/resources/operation.hbs new file mode 100644 index 0000000..3d7d88e --- /dev/null +++ b/src/main/resources/operation.hbs @@ -0,0 +1,80 @@ +{{#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}} + {{#if enum}} + <p> + <b>Allowable values</b>: {{#join enum ", "}} {{this}}{{/join}} + </p> + {{/if}} + </td> + <td>{{#if defaultValue}}{{defaultValue}}{{else}} - {{/if}}</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}} |