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 SME_OPENAPI_LOCATION="../../openapi/sme"
22 cp ../scripts/init/getsmeswagger.go $SME_LOCATION
25 echo "Generating SME openapi spec..."
27 if [ -f "getsmeswagger.go" ]; then
29 go run getsmeswagger.go
31 echo "Copying generated specs..."
32 mkdir -p $SME_OPENAPI_LOCATION
33 echo "Copying CommonData.yaml"
34 mv CommonData.yaml $SME_OPENAPI_LOCATION
35 echo "Copying TS29122_CommonData.yaml"
36 mv TS29122_CommonData.yaml $SME_OPENAPI_LOCATION
37 echo "Copying TS29571_CommonData.yaml"
38 mv TS29571_CommonData.yaml $SME_OPENAPI_LOCATION
39 echo "Copying TS29222_CAPIF_API_Invoker_Management_API.yaml"
40 mv TS29222_CAPIF_API_Invoker_Management_API.yaml $SME_OPENAPI_LOCATION
41 echo "Copying TS29222_CAPIF_API_Provider_Management_API.yaml"
42 mv TS29222_CAPIF_API_Provider_Management_API.yaml $SME_OPENAPI_LOCATION
43 echo "Copying TS29222_CAPIF_Publish_Service_API.yaml"
44 mv TS29222_CAPIF_Publish_Service_API.yaml $SME_OPENAPI_LOCATION
46 echo "Unable to find the openapi spec generator."