blob: da4a3cdb7accb1379faaa00e2d17bc3638787a15 [file] [log] [blame]
aravind.est347f1782023-07-14 09:53:41 +01001#!/bin/bash
2
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
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
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=================================================
18#
19
20SME_LOCATION="../sme/capifcore"
21cp ../scripts/init/getsmeswagger.go $SME_LOCATION
22cd $SME_LOCATION
23
24echo "Generating SME openapi spec..."
25
26if [ -f "getsmeswagger.go" ]; then
27 echo "Generating..."
28 go run getsmeswagger.go
29
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
44else
45 echo "Unable to find the openapi spec generator."
46fi