summaryrefslogtreecommitdiffstats
path: root/generate-uml-snapshot.sh
diff options
context:
space:
mode:
authorKeong Lim <keong.lim@huawei.com>2019-07-19 18:43:10 +1000
committerKeong Lim <keong.lim@huawei.com>2019-08-08 14:52:43 +1000
commitc44bcf608dc25c2047af65fbfdecba7dbce11e88 (patch)
tree6120423b356919b93b979e04a2c3ff6adbf4f5a3 /generate-uml-snapshot.sh
parent8d4ca0d78d2b34a07473d8a9293173c798d0a1f8 (diff)
AAI-2441 update swagger-format YAML generation
update swagger-format YAML generation so that conversion to JSON is cleaner, i.e. use n/a instead of null string in empty fields update tests to match new output with n/a values update generate-uml-snapshot.sh to also convert yaml to json add the generated json files Change-Id: Idd87ddae3c2d7490eb954ef69582edd8200f4df4 Issue-ID: AAI-2441 Signed-off-by: Keong Lim <keong.lim@huawei.com>
Diffstat (limited to 'generate-uml-snapshot.sh')
-rw-r--r--generate-uml-snapshot.sh25
1 files changed, 24 insertions, 1 deletions
diff --git a/generate-uml-snapshot.sh b/generate-uml-snapshot.sh
index 235f5a1..13c6562 100644
--- a/generate-uml-snapshot.sh
+++ b/generate-uml-snapshot.sh
@@ -134,7 +134,30 @@ git status
if [ -f ${STARTDIR}/aai-schema-gen/src/main/resources/swagger.html.ftl -a -f ${STARTDIR}/aai-schema-gen/src/main/resources/swagger.plantuml.ftl ] ; then
git checkout ${STARTDIR}/aai-schema-gen/src/main/resources/swagger.plantuml.ftl ${STARTDIR}/aai-schema-gen/src/main/resources/swagger.html.ftl
- # mvn --offline -DskipTests process-classes
+ mvn --offline -DskipTests process-classes
+
+ # $ find aai-schema/src/main -name "aai_swagger_*.yaml"
+ # aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_v10.nodes.yaml
+ # aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_v10.yaml
+ # aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_v11.nodes.yaml
+ # aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_v11.yaml
+ # aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_v12.nodes.yaml
+ # aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_v12.yaml
+ # aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_v13.nodes.yaml
+ # aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_v13.yaml
+ # aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_v14.nodes.yaml
+ # aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_v14.yaml
+ # aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_v15.nodes.yaml
+ # aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_v15.yaml
+ # aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_v16.nodes.yaml
+ # aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_v16.yaml
+
+ # convert yaml to json
+ for g in v16 v15 v14 v13 v12 v11 ; do
+ ${STARTDIR}/yaml2json.py < ${STARTDIR}/aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_${g}.yaml > ${STARTDIR}/plantuml/aai_swagger_${g}.json
+ ${STARTDIR}/yaml2json.py < ${STARTDIR}/aai-schema/src/main/resources/onap/aai_swagger_yaml/aai_swagger_${g}.nodes.yaml > ${STARTDIR}/plantuml/aai_swagger_${g}.nodes.json
+ done
+
git status
fi