Skip to content

Commit

Permalink
Use spectral instead of swagger-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhav-jain committed Mar 31, 2020
1 parent 498c38c commit 5295a19
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM mhart/alpine-node:12

RUN npm install -g @apidevtools/swagger-cli
RUN npm install -g @stoplight/spectral

COPY entrypoint.sh /usr/local/bin/

Expand Down
6 changes: 3 additions & 3 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: 'Swagger cli action'
description: 'Run Swagger validation on your OAS JSON or YAML file. Supports Swagger 2.0 or OpenAPI 3.0 format'
inputs:
file_path:
description: 'Path to OAS file for validation'
args:
description: 'Arguments. Use --help to see the complete list of supported args'
required: true
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.file_path }}
- ${{ inputs.args }}
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ echo "======================"
echo "= Linting OAS file ="
echo "======================"

cd /github/workspace/ && swagger-cli validate "$INPUT_FILE_PATH"
cd /github/workspace/ && spectral lint "$INPUT_ARGS"

0 comments on commit 5295a19

Please sign in to comment.