From ac93ec514da91f8918d1fc93e334aa939af767f3 Mon Sep 17 00:00:00 2001 From: Keong Lim Date: Fri, 10 Aug 2018 15:02:30 +1000 Subject: AAI-1452 Update Swagger HTML template Issue-ID: AAI-1452 - Re-indent list bodies to optimise size of generated output, reduces final output size by half in new v14 schema. - Add table of contents links under Summary heading for navigating long document - Added company name to copyright notice Change-Id: I74e98a097728fb93939e8a3b2fe27906d0b83ff7 Signed-off-by: Keong Lim --- aai-core/src/main/resources/swagger.html.ftl | 425 ++++++++++++--------------- 1 file changed, 185 insertions(+), 240 deletions(-) (limited to 'aai-core/src/main') diff --git a/aai-core/src/main/resources/swagger.html.ftl b/aai-core/src/main/resources/swagger.html.ftl index 24c2cdfa..1a2827f8 100644 --- a/aai-core/src/main/resources/swagger.html.ftl +++ b/aai-core/src/main/resources/swagger.html.ftl @@ -4,6 +4,7 @@ org.onap.aai ================================================================================ Copyright © 2017-18 AT&T Intellectual Property. All rights reserved. + Copyright © 2018 Huawei Technologies (Australia) Pty Ltd. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -45,252 +46,196 @@ Schemes: https - - -

Summary

- <#list aaiApis?keys as key> - -

Tag: ${key}

- - - - - - - - - - <#list aaiApis[key] as api> - <#list api.getHttpMethods() as httpVerb> - - - - - - - -
OperationDescription
${httpVerb.getType()?upper_case} ${api.getPath()}

${httpVerb.getSummary()}

-
- - - - -

Paths

- - <#list sortedAaiApis?keys as key> - <#list sortedAaiApis[key] as api> - <#list api.getHttpMethods() as httpVerb> - - -
-
-
${httpVerb.getSummary()}
-

${httpVerb.getType()?upper_case} ${api.getPath()}

- Tags: - ${api.getTag()} -
-
-
-

${httpVerb.getSummary()}

- -
- <#if httpVerb.isConsumerEnabled()> -
- -

application/json <#if httpVerb.isOpNotPatch()>application/xml -

- <#if httpVerb.isBodyParametersEnabled()> -
-
-

${httpVerb.getBodyParameters()["description"]}

-

-
- -
- -
- - <#if httpVerb.isParametersEnabled()> -
- - - - - - - - - - - - <#list httpVerb.getParameters() as param> - - - - - - - - - -
- ${param["name"]} - - <#if param['description']??> -

${param["description"]}

- -
${param["in"]} - <#if param['type']??> - ${param["type"]} - - - - <#if param['required']> - - -
-
- +

Summary

+
    + <#list aaiApis?keys as key> +
  1. Tag: ${key} + +
  2. Paths +
  3. Schema definitions +
-
-

application/json <#if httpVerb.isOpNotPatch()>application/xml -

- -
- <#list httpVerb.getResponses() as response> -
- ${response.getResponseCode()} OK - -
-
-
-
-

successful operation

- -
-
-
+ <#list aaiApis?keys as key> +

Tag: ${key}

+ + + + + + <#list aaiApis[key] as api> + <#list api.getHttpMethods() as httpVerb> + + + + + + +
OperationDescription
+ ${httpVerb.getType()?upper_case} ${api.getPath()}

${httpVerb.getSummary()}

+ - <#if httpVerb.isHasReturnSchema()> -
-
+

Paths

+ <#list sortedAaiApis?keys as key> + <#list sortedAaiApis[key] as api> + <#list api.getHttpMethods() as httpVerb> + +
+
+
${httpVerb.getSummary()}
+

${httpVerb.getType()?upper_case} + ${api.getPath()}

+ Tags: ${api.getTag()} +
+
+
+

${httpVerb.getSummary()}

+
+ <#if httpVerb.isConsumerEnabled()> +
+

application/json application/xml

+ <#if httpVerb.isBodyParametersEnabled()> +
+
+

${httpVerb.getBodyParameters()["description"]}

+
+
+ +
+ + <#if httpVerb.isParametersEnabled()> +
+ + + + + + + + + + <#list httpVerb.getParameters() as param> + + + + + + + + +
${param["name"]} + <#if param['description']??> +

${param["description"]}

+ +
${param["in"]} + <#if param['type']??> + ${param["type"]} + + + + <#if param['required']> + + +
+ - -
-
- +
+

application/json application/xml

+
+ <#list httpVerb.getResponses() as response> +
+ ${response.getResponseCode()} OK +
+
+
+

successful operation

+
+
+ <#if httpVerb.isHasReturnSchema()> + + +
+
+ +
default
+
+
+

Response codes found in response codes.

+
+
+
+
+
+
+
-
- -
- default - -
-
-
-
-

Response codes found in response codes.

- -
-
-
- -
-
- -
-
-
-
-
- - - - - -

Schema definitions

- - <#list definitions as definition> -
-
-

${definition.getDefinitionName()}: - object - - - -

-
-
- <#if definition.isHasDescription()> -
- ${definition.getDefinitionDescription()} - -
- + + + + +

Schema definitions

+ <#list definitions as definition> +
+

+ ${definition.getDefinitionName()}: + object + +

+
+ <#if definition.isHasDescription()> +
+ ${definition.getDefinitionDescription()} +
+ +
+ <#list definition.getRegularPropertyList() as definitionProperty> +
+ ${definitionProperty.getPropertyName()}: + <#if definitionProperty.isHasType()> + ${definitionProperty.getPropertyType()} + + + <#if definitionProperty.isRequired()> + + +
+
+ <#if definitionProperty.isHasPropertyDescription()> +

${definitionProperty.getPropertyDescription()}

+ +
+
+ + <#list definition.getSchemaPropertyList() as definitionProperty> +
+ ${definitionProperty.getPropertyName()}: + <#if definitionProperty.isHasType()> + ${definitionProperty.getPropertyType()} + + + <#if definitionProperty.isRequired()> + + +
+
+ +
+
-
-
- <#list definition.getRegularPropertyList() as definitionProperty> -
- ${definitionProperty.getPropertyName()}: - <#if definitionProperty.isHasType()> - ${definitionProperty.getPropertyType()} - - - - <#if definitionProperty.isRequired()> - - -
-
- <#if definitionProperty.isHasPropertyDescription()> -

${definitionProperty.getPropertyDescription()}

- -
- -
-
- - <#list definition.getSchemaPropertyList() as definitionProperty> -
- ${definitionProperty.getPropertyName()}: - <#if definitionProperty.isHasType()> - ${definitionProperty.getPropertyType()} - - - - <#if definitionProperty.isRequired()> - - -
-
- - -
- -
-
-
-
- + -- cgit 1.2.3-korg