Move openapi files to a common directory 10/11910/1
authoraravind.est <aravindhan.a@est.tech>
Thu, 12 Oct 2023 14:23:09 +0000 (15:23 +0100)
committeraravind.est <aravindhan.a@est.tech>
Thu, 12 Oct 2023 14:23:09 +0000 (15:23 +0100)
Move openapi files to common directory.
Ignore SME openapi files from source.

Issue-ID: NONRTRIC-952
Signed-off-by: aravind.est <aravindhan.a@est.tech>
Change-Id: Ic269de937cad634c7487b7563cb5f075b345b532

.gitignore
openapi/acm/acm-spec.yaml [moved from rapp-manager-acm/src/main/resources/openapi/acm-spec.yaml with 100% similarity]
openapi/dme/ics-api.yaml [moved from rapp-manager-dme/src/main/resources/openapi/ics-api.yaml with 100% similarity]
rapp-manager-acm/pom.xml
rapp-manager-dme/pom.xml
rapp-manager-sme/pom.xml
scripts/init/init-sme-spec.bat
scripts/init/init-sme-spec.sh

index 549e00a..2cdd29e 100755 (executable)
@@ -31,3 +31,6 @@ build/
 
 ### VS Code ###
 .vscode/
+
+
+openapi/sme/
index 9cbf7ab..4e81c36 100755 (executable)
                             <goal>generate</goal>
                         </goals>
                         <configuration>
-                            <inputSpec>${project.basedir}/src/main/resources/openapi/acm-spec.yaml</inputSpec>
+                            <inputSpec>${project.parent.basedir}/openapi/acm/acm-spec.yaml</inputSpec>
                             <generatorName>java</generatorName>
                             <library>resttemplate</library>
                             <generateApiTests>false</generateApiTests>
index 6b8e83f..097b21f 100755 (executable)
@@ -77,7 +77,7 @@
                             <goal>generate</goal>
                         </goals>
                         <configuration>
-                            <inputSpec>${project.basedir}/src/main/resources/openapi/ics-api.yaml</inputSpec>
+                            <inputSpec>${project.parent.basedir}/openapi/dme/ics-api.yaml</inputSpec>
                             <generatorName>java</generatorName>
                             <library>resttemplate</library>
                             <generateApiTests>false</generateApiTests>
index 5e0e21c..7106857 100755 (executable)
                         </goals>
                         <configuration>
                             <inputSpec>
-                                ${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
                             </inputSpec>
                             <generatorName>java</generatorName>
                             <library>resttemplate</library>
                         </goals>
                         <configuration>
                             <inputSpec>
-                                ${project.basedir}/src/main/resources/openapi/TS29222_CAPIF_Publish_Service_API.yaml
+                                ${project.parent.basedir}/openapi/sme/TS29222_CAPIF_Publish_Service_API.yaml
                             </inputSpec>
                             <generatorName>java</generatorName>
                             <library>resttemplate</library>
                         </goals>
                         <configuration>
                             <inputSpec>
-                                ${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
                             </inputSpec>
                             <generatorName>java</generatorName>
                             <library>resttemplate</library>
index afc946a..e9ee0b6 100755 (executable)
@@ -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.
 )
index da4a3cd..ee3e108 100755 (executable)
@@ -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