Skip to content

Commit

Permalink
fix: use version of spectral from version file
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrocki committed Aug 3, 2022
1 parent 86742bc commit f839435
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions spectral/scripts/rules.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## This script tests and validates rules APIs

spectral_version=`cat "../spectral.version"`
spectral --version || npm install -g --force @stoplight/spectral-cli@$spectral_version

## Fetch current managed services APIS from sdk repository
## This apis can be used for testing
## Script needs to run in the test working directory
Expand All @@ -11,17 +14,17 @@ file='kas-fleet-manager.yaml'

wget -P $folder ${baseUrl}${file}
echo "linting $file OAS file"
yarn spectral lint $folder/$file -v -r $spectralConfig
spectral lint $folder/$file -v -r $spectralConfig

file='srs-fleet-manager.json'
wget -P $folder ${baseUrl}${file}
echo "linting $file OAS file"
yarn spectral lint $folder/$file -v -r $spectralConfig
spectral lint $folder/$file -v -r $spectralConfig

file='connector_mgmt.yaml'
wget -P $folder ${baseUrl}${file}
echo "linting $file OAS file"
yarn spectral lint $folder/$file -v -r $spectralConfig
spectral lint $folder/$file -v -r $spectralConfig

## Updates made to the following need to be refected in their respective .openapi OAS files before the linting can pass and added to CI

Expand Down

0 comments on commit f839435

Please sign in to comment.