diff options
Diffstat (limited to 'appc-client/code-generator/src/main/resources')
-rw-r--r-- | appc-client/code-generator/src/main/resources/configuration/client-kit.properties | 2 | ||||
-rw-r--r-- | appc-client/code-generator/src/main/resources/templates/open-api/yang-to-open-api.ftl | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/appc-client/code-generator/src/main/resources/configuration/client-kit.properties b/appc-client/code-generator/src/main/resources/configuration/client-kit.properties index a0097c9fa..a2f73508a 100644 --- a/appc-client/code-generator/src/main/resources/configuration/client-kit.properties +++ b/appc-client/code-generator/src/main/resources/configuration/client-kit.properties @@ -28,7 +28,7 @@ #-------------------------------------------------------------------------------------------- ctx.model.package=org.onap.appc.client.lcm.model ctx.api.package=org.onap.appc.client.lcm.api -ctx.utils.package=org.onap.appc.client.lcm.utils +ctx.utils.package=org.onap.appc ctx.exceptions.package=org.onap.appc.client.lcm.exceptions ctx.interface.classname=LifeCycleManagerStateful diff --git a/appc-client/code-generator/src/main/resources/templates/open-api/yang-to-open-api.ftl b/appc-client/code-generator/src/main/resources/templates/open-api/yang-to-open-api.ftl index 685efcb02..e92ee3b05 100644 --- a/appc-client/code-generator/src/main/resources/templates/open-api/yang-to-open-api.ftl +++ b/appc-client/code-generator/src/main/resources/templates/open-api/yang-to-open-api.ftl @@ -21,7 +21,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. ============LICENSE_END========================================================= --> - +<#setting number_format="computer"> <#global _ = " "> <#global __ = _ + _> <#global ___ = __ + _> @@ -162,11 +162,11 @@ ${indent}] statement or locally (in-line withing a leaf node definition). --> <#macro constraints yangType indent = ""> -<#if yangType.patternConstraints?size != 0> +<#if yangType.patternConstraints?has_content> ${indent}, ${indent}"pattern" : "${yangType.patternConstraints?first.regularExpression?replace('\\\\', '\\\\\\\\', 'r')}" </#if> -<#if yangType.lengthConstraints?size != 0> +<#if yangType.lengthConstraints?has_content> ${indent}, ${indent}"minLength" : ${yangType.lengthConstraints?first.min}, ${indent}"maxLength" : ${yangType.lengthConstraints?first.max} @@ -234,9 +234,12 @@ ${_}"swagger": "2.0", ${_}"info": { ${__}"version": "${module.QNameModule.formattedRevision}" <@description obj = module indent = __ />, +<#if module.contact??> ${__}"contact": { ${_____}"name" : "${module.contact}" ${__}}, +</#if> + ${__}"title": "${moduleName}" ${_}}, ${_}"basePath": "/restconf", |