File tree Expand file tree Collapse file tree 3 files changed +312
-343
lines changed Expand file tree Collapse file tree 3 files changed +312
-343
lines changed Original file line number Diff line number Diff line change 1
- name : Validate OpenAPI definition
1
+ name : Run Spectral on Pull Requests
2
+
2
3
on :
3
- pull_request :
4
- types : [opened, reopened, synchronize]
4
+ - pull_request
5
5
6
6
jobs :
7
- validate_openapi :
7
+ build :
8
+ name : Run Spectral
8
9
runs-on : ubuntu-latest
9
- name : Swagger Editor Validator Service
10
-
11
- # Service containers to run with `runner-job`
12
- services :
13
- # Label used to access the service container
14
- swagger-editor :
15
- # Docker Hub image
16
- image : swaggerapi/swagger-editor
17
- ports :
18
- # Maps port 8080 on service container to the host 80
19
- - 80:8080
20
-
21
10
steps :
22
- - uses : actions/checkout@v2
23
- - name : Validate OpenAPI definition
24
- uses : char0n/swagger-editor-validate@v1
11
+ # Check out the repository
12
+ - uses : actions/checkout@v3
13
+
14
+ # Run Spectral
15
+ - uses : stoplightio/spectral-action@latest
25
16
with :
26
- swagger-editor-url : http://localhost/
27
- definition-file : openapi.yaml
17
+ file_glob : ' openapi.yaml'
Original file line number Diff line number Diff line change
1
+ extends : ["spectral:oas"]
2
+ rules :
3
+ no-$ref-siblings : off
4
+ oas3-valid-schema-example : off
You can’t perform that action at this time.
0 commit comments