4
4
# # This apis can be used for testing
5
5
# # Script needs to run in the test working directory
6
6
7
+ spectralConfig=" ./examples/.spectral-local.yaml"
8
+ baseUrl=' https://raw.githubusercontent.com/redhat-developer/app-services-sdk-js/main/.openapi/'
9
+ folder=" .openapi"
10
+ file=' kas-fleet-manager.yaml'
7
11
8
- echo " fetching kas-fleet-manager from main"
9
- wget -P .openapi https://raw.githubusercontent.com/redhat-developer/app-services-sdk-js/main/.openapi/kas-fleet-manager.yaml
10
- echo " fetching srs from main"
11
- wget -P .openapi https://raw.githubusercontent/redhat-developer/app-services-sdk-js/main/.openapi/srs-fleet-manager.json
12
-
13
- # updates made to the following need to be refected in their respective .openapi files before the linting can pass
14
- # echo "fetching connector_mgmgt from main"
15
- # wget -P .openapi https://raw.githubusercontent.com/redhat-developer/app-services-sdk-js/main/.openapi/connector_mgmt.yaml
16
- # echo "fetching smartevents from main"
17
- # wget -P .openapi https://raw.githubusercontent.com/redhat-developer/app-services-sdk-js/main/.openapi/smartevents-mgmt.yaml
18
- # echo "fetching kafka-admin from main"
19
- # wget -P .openapi https://raw.githubusercontent.com/redhat-developer/app-services-sdk-js/main/.openapi/kafka-admin-rest.yaml
20
- # # TODO add more apis as they are onboarded
12
+ wget -P $folder ${baseUrl}${file}
13
+ echo " linting $file OAS file"
14
+ yarn spectral lint $folder /$file -v -r $spectralConfig
15
+
16
+ file=' srs-fleet-manager.json'
17
+ wget -P $folder ${baseUrl}${file}
18
+ echo " linting $file OAS file"
19
+ yarn spectral lint $folder /$file -v -r $spectralConfig
20
+
21
+ # # Updates made to the following need to be refected in their respective .openapi OAS files before the linting can pass and added to CI
21
22
22
- # # linting the fetched apis
23
- yarn spectral lint .openapi/kas-fleet-manager.yaml -v -r ./examples/.spectral-local.yaml
24
- yarn spectral lint .openapi/srs-fleet-manager.json -v -r ./examples/.spectral-local.yaml
23
+ # file='connector_mgmt.yaml'
24
+ # wget -P $folder ${baseUrl}${file}
25
+ # echo "linting $file OAS file"
26
+ # yarn spectral lint $folder/$file -v -r $spectralConfig
25
27
26
- # updates made to the following need to be refected in their respective .openapi files before the linting can pass
27
- # yarn spectral lint .openapi/connector_mgmt.yaml -v -r ./examples/.spectral-local.yaml
28
- # yarn spectral lint .openapi/smartevents-mgmt.yaml -v -r ./examples/.spectral-local.yaml
29
- # yarn spectral lint .openapi/kafka-admin-rest.yaml -v -r ./examples/.spectral-local.yaml
28
+ # file='smartevents.yaml'
29
+ # wget -P $folder ${baseUrl}${file}
30
+ # echo "linting $file OAS file"
31
+ # yarn spectral lint $folder/$file -v -r $spectralConfig
32
+
33
+ # file='kafka-admin.yaml'
34
+ # wget -P $folder ${baseUrl}${file}
35
+ # echo "linting $file OAS file"
36
+ # yarn spectral lint $folder/$file -v -r $spectralConfig
37
+
38
+ # # TODO add more apis as they are onboarded
0 commit comments