afc946a725878c180bab0115bf0b5ca742ca21be
[nonrtric/plt/rappmanager.git] / scripts / init / init-sme-spec.bat
1 :: ============LICENSE_START===============================================
2 ::  Copyright (C) 2023 Nordix Foundation. All rights reserved.
3 ::  ========================================================================
4 ::  Licensed under the Apache License, Version 2.0 (the "License");
5 ::  you may not use this file except in compliance with the License.
6 ::  You may obtain a copy of the License at
7 ::
8 ::       http:\\www.apache.org\licenses\LICENSE-2.0
9 ::
10 ::  Unless required by applicable law or agreed to in writing, software
11 ::  distributed under the License is distributed on an "AS IS" BASIS,
12 ::  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ::  See the License for the specific language governing permissions and
14 ::  limitations under the License.
15 ::  ============LICENSE_END=================================================
16 ::
17
18 @echo off
19 set SME_LOCATION="..\sme\capifcore"
20 cp ..\scripts\init\getsmeswagger.go %SME_LOCATION%
21 cd %SME_LOCATION%
22
23 echo Generating SME openapi spec...
24
25 IF EXIST getsmeswagger.go (
26   echo Generating...
27   go run getsmeswagger.go
28
29   echo Copying generated specs...
30   mkdir ..\..\rapp-manager-sme\src\main\resources\openapi
31   echo Copying CommonData.yaml
32   mv CommonData.yaml ..\..\rapp-manager-sme\src\main\resources\openapi
33   echo Copying TS29122_CommonData.yaml
34   mv TS29122_CommonData.yaml ..\..\rapp-manager-sme\src\main\resources\openapi
35   echo Copying TS29571_CommonData.yaml
36   mv TS29571_CommonData.yaml ..\..\rapp-manager-sme\src\main\resources\openapi
37   echo Copying TS29222_CAPIF_API_Invoker_Management_API.yaml
38   mv TS29222_CAPIF_API_Invoker_Management_API.yaml ..\..\rapp-manager-sme\src\main\resources\openapi
39   echo Copying TS29222_CAPIF_API_Provider_Management_API.yaml
40   mv TS29222_CAPIF_API_Provider_Management_API.yaml ..\..\rapp-manager-sme\src\main\resources\openapi
41   echo Copying TS29222_CAPIF_Publish_Service_API.yaml
42   mv TS29222_CAPIF_Publish_Service_API.yaml ..\..\rapp-manager-sme\src\main\resources\openapi
43 ) ELSE (
44   echo Unable to find the openapi spec generator.
45 )