From c44bcf608dc25c2047af65fbfdecba7dbce11e88 Mon Sep 17 00:00:00 2001 From: Keong Lim Date: Fri, 19 Jul 2019 18:43:10 +1000 Subject: 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 --- generate-uml-snapshot.sh | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'generate-uml-snapshot.sh') 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 -- cgit 1.2.3-korg