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