aboutsummaryrefslogtreecommitdiffstats
path: root/appc-client/code-generator/src/main/resources
diff options
context:
space:
mode:
authorJoey Sullivan <joey.sullivan@amdocs.com>2017-12-22 15:32:48 +0000
committerSkip Wonnell <skip@att.com>2017-12-22 17:35:43 +0000
commitf2614e766147fd345058f137852eeaf892181fc1 (patch)
treec67278f382f95332dcf509d07e3c69976952ef59 /appc-client/code-generator/src/main/resources
parent9475355553b59df58d6f516e2c9109babae9ffd0 (diff)
Automate Updates to the API Client Library
Removed client-kit generated code from git repo. This code is now generated under the target folder. client-kit now uses latest appc-provider-lcm.yang on the branch. Change-Id: I7a20774b60bb447343886997c32ca3b3c5dcbafa Issue-ID: APPC-360 Signed-off-by: Joey Sullivan <joey.sullivan@amdocs.com>
Diffstat (limited to 'appc-client/code-generator/src/main/resources')
-rw-r--r--appc-client/code-generator/src/main/resources/configuration/client-kit.properties2
-rw-r--r--appc-client/code-generator/src/main/resources/templates/open-api/yang-to-open-api.ftl9
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",