From dcd17666b5860eba85219f2ff31b6515c3dc227e Mon Sep 17 00:00:00 2001 From: "aravind.est" Date: Thu, 12 Oct 2023 15:23:09 +0100 Subject: [PATCH] Move openapi files to a common directory Move openapi files to common directory. Ignore SME openapi files from source. Issue-ID: NONRTRIC-952 Signed-off-by: aravind.est Change-Id: Ic269de937cad634c7487b7563cb5f075b345b532 --- .gitignore | 3 +++ .../main/resources/openapi => openapi/acm}/acm-spec.yaml | 0 .../main/resources/openapi => openapi/dme}/ics-api.yaml | 0 rapp-manager-acm/pom.xml | 2 +- rapp-manager-dme/pom.xml | 2 +- rapp-manager-sme/pom.xml | 6 +++--- scripts/init/init-sme-spec.bat | 15 ++++++++------- scripts/init/init-sme-spec.sh | 15 ++++++++------- 8 files changed, 24 insertions(+), 19 deletions(-) rename {rapp-manager-acm/src/main/resources/openapi => openapi/acm}/acm-spec.yaml (100%) rename {rapp-manager-dme/src/main/resources/openapi => openapi/dme}/ics-api.yaml (100%) diff --git a/.gitignore b/.gitignore index 549e00a..2cdd29e 100755 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,6 @@ build/ ### VS Code ### .vscode/ + + +openapi/sme/ diff --git a/rapp-manager-acm/src/main/resources/openapi/acm-spec.yaml b/openapi/acm/acm-spec.yaml similarity index 100% rename from rapp-manager-acm/src/main/resources/openapi/acm-spec.yaml rename to openapi/acm/acm-spec.yaml diff --git a/rapp-manager-dme/src/main/resources/openapi/ics-api.yaml b/openapi/dme/ics-api.yaml similarity index 100% rename from rapp-manager-dme/src/main/resources/openapi/ics-api.yaml rename to openapi/dme/ics-api.yaml diff --git a/rapp-manager-acm/pom.xml b/rapp-manager-acm/pom.xml index 9cbf7ab..4e81c36 100755 --- a/rapp-manager-acm/pom.xml +++ b/rapp-manager-acm/pom.xml @@ -101,7 +101,7 @@ generate - ${project.basedir}/src/main/resources/openapi/acm-spec.yaml + ${project.parent.basedir}/openapi/acm/acm-spec.yaml java resttemplate false diff --git a/rapp-manager-dme/pom.xml b/rapp-manager-dme/pom.xml index 6b8e83f..097b21f 100755 --- a/rapp-manager-dme/pom.xml +++ b/rapp-manager-dme/pom.xml @@ -77,7 +77,7 @@ generate - ${project.basedir}/src/main/resources/openapi/ics-api.yaml + ${project.parent.basedir}/openapi/dme/ics-api.yaml java resttemplate false diff --git a/rapp-manager-sme/pom.xml b/rapp-manager-sme/pom.xml index 5e0e21c..7106857 100755 --- a/rapp-manager-sme/pom.xml +++ b/rapp-manager-sme/pom.xml @@ -147,7 +147,7 @@ - ${project.basedir}/src/main/resources/openapi/TS29222_CAPIF_API_Provider_Management_API.yaml + ${project.parent.basedir}/openapi/sme/TS29222_CAPIF_API_Provider_Management_API.yaml java resttemplate @@ -176,7 +176,7 @@ - ${project.basedir}/src/main/resources/openapi/TS29222_CAPIF_Publish_Service_API.yaml + ${project.parent.basedir}/openapi/sme/TS29222_CAPIF_Publish_Service_API.yaml java resttemplate @@ -205,7 +205,7 @@ - ${project.basedir}/src/main/resources/openapi/TS29222_CAPIF_API_Invoker_Management_API.yaml + ${project.parent.basedir}/openapi/sme/TS29222_CAPIF_API_Invoker_Management_API.yaml java resttemplate diff --git a/scripts/init/init-sme-spec.bat b/scripts/init/init-sme-spec.bat index afc946a..e9ee0b6 100755 --- a/scripts/init/init-sme-spec.bat +++ b/scripts/init/init-sme-spec.bat @@ -17,6 +17,7 @@ @echo off set SME_LOCATION="..\sme\capifcore" +set SME_OPENAPI_LOCATION="..\..\openapi\sme" cp ..\scripts\init\getsmeswagger.go %SME_LOCATION% cd %SME_LOCATION% @@ -27,19 +28,19 @@ IF EXIST getsmeswagger.go ( go run getsmeswagger.go echo Copying generated specs... - mkdir ..\..\rapp-manager-sme\src\main\resources\openapi + mkdir %SME_OPENAPI_LOCATION% echo Copying CommonData.yaml - mv CommonData.yaml ..\..\rapp-manager-sme\src\main\resources\openapi + mv CommonData.yaml %SME_OPENAPI_LOCATION% echo Copying TS29122_CommonData.yaml - mv TS29122_CommonData.yaml ..\..\rapp-manager-sme\src\main\resources\openapi + mv TS29122_CommonData.yaml %SME_OPENAPI_LOCATION% echo Copying TS29571_CommonData.yaml - mv TS29571_CommonData.yaml ..\..\rapp-manager-sme\src\main\resources\openapi + mv TS29571_CommonData.yaml %SME_OPENAPI_LOCATION% echo Copying TS29222_CAPIF_API_Invoker_Management_API.yaml - mv TS29222_CAPIF_API_Invoker_Management_API.yaml ..\..\rapp-manager-sme\src\main\resources\openapi + mv TS29222_CAPIF_API_Invoker_Management_API.yaml %SME_OPENAPI_LOCATION% echo Copying TS29222_CAPIF_API_Provider_Management_API.yaml - mv TS29222_CAPIF_API_Provider_Management_API.yaml ..\..\rapp-manager-sme\src\main\resources\openapi + mv TS29222_CAPIF_API_Provider_Management_API.yaml %SME_OPENAPI_LOCATION% echo Copying TS29222_CAPIF_Publish_Service_API.yaml - mv TS29222_CAPIF_Publish_Service_API.yaml ..\..\rapp-manager-sme\src\main\resources\openapi + mv TS29222_CAPIF_Publish_Service_API.yaml %SME_OPENAPI_LOCATION% ) ELSE ( echo Unable to find the openapi spec generator. ) diff --git a/scripts/init/init-sme-spec.sh b/scripts/init/init-sme-spec.sh index da4a3cd..ee3e108 100755 --- a/scripts/init/init-sme-spec.sh +++ b/scripts/init/init-sme-spec.sh @@ -18,6 +18,7 @@ # SME_LOCATION="../sme/capifcore" +SME_OPENAPI_LOCATION="../../openapi/sme" cp ../scripts/init/getsmeswagger.go $SME_LOCATION cd $SME_LOCATION @@ -28,19 +29,19 @@ if [ -f "getsmeswagger.go" ]; then go run getsmeswagger.go echo "Copying generated specs..." - mkdir -p ../../rapp-manager-sme/src/main/resources/openapi + mkdir -p $SME_OPENAPI_LOCATION echo "Copying CommonData.yaml" - mv CommonData.yaml ../../rapp-manager-sme/src/main/resources/openapi + mv CommonData.yaml $SME_OPENAPI_LOCATION echo "Copying TS29122_CommonData.yaml" - mv TS29122_CommonData.yaml ../../rapp-manager-sme/src/main/resources/openapi + mv TS29122_CommonData.yaml $SME_OPENAPI_LOCATION echo "Copying TS29571_CommonData.yaml" - mv TS29571_CommonData.yaml ../../rapp-manager-sme/src/main/resources/openapi + mv TS29571_CommonData.yaml $SME_OPENAPI_LOCATION echo "Copying TS29222_CAPIF_API_Invoker_Management_API.yaml" - mv TS29222_CAPIF_API_Invoker_Management_API.yaml ../../rapp-manager-sme/src/main/resources/openapi + mv TS29222_CAPIF_API_Invoker_Management_API.yaml $SME_OPENAPI_LOCATION echo "Copying TS29222_CAPIF_API_Provider_Management_API.yaml" - mv TS29222_CAPIF_API_Provider_Management_API.yaml ../../rapp-manager-sme/src/main/resources/openapi + mv TS29222_CAPIF_API_Provider_Management_API.yaml $SME_OPENAPI_LOCATION echo "Copying TS29222_CAPIF_Publish_Service_API.yaml" - mv TS29222_CAPIF_Publish_Service_API.yaml ../../rapp-manager-sme/src/main/resources/openapi + mv TS29222_CAPIF_Publish_Service_API.yaml $SME_OPENAPI_LOCATION else echo "Unable to find the openapi spec generator." fi -- 2.16.6