Skip to content

Commit 5295a19

Browse files
committed
Use spectral instead of swagger-cli
1 parent 498c38c commit 5295a19

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM mhart/alpine-node:12
22

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

55
COPY entrypoint.sh /usr/local/bin/
66

action.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: 'Swagger cli action'
22
description: 'Run Swagger validation on your OAS JSON or YAML file. Supports Swagger 2.0 or OpenAPI 3.0 format'
33
inputs:
4-
file_path:
5-
description: 'Path to OAS file for validation'
4+
args:
5+
description: 'Arguments. Use --help to see the complete list of supported args'
66
required: true
77
runs:
88
using: 'docker'
99
image: 'Dockerfile'
1010
args:
11-
- ${{ inputs.file_path }}
11+
- ${{ inputs.args }}

entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ echo "======================"
44
echo "= Linting OAS file ="
55
echo "======================"
66

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

0 commit comments

Comments
 (0)