Skip to content

Commit b00c10f

Browse files
Merge pull request #402 from openai/spec-2025-01-17
Spec changes 2025-01-17
2 parents d2eaa35 + 1eb82f5 commit b00c10f

File tree

3 files changed

+312
-343
lines changed

3 files changed

+312
-343
lines changed
Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
1-
name: Validate OpenAPI definition
1+
name: Run Spectral on Pull Requests
2+
23
on:
3-
pull_request:
4-
types: [opened, reopened, synchronize]
4+
- pull_request
55

66
jobs:
7-
validate_openapi:
7+
build:
8+
name: Run Spectral
89
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-
2110
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
2516
with:
26-
swagger-editor-url: http://localhost/
27-
definition-file: openapi.yaml
17+
file_glob: 'openapi.yaml'

.spectral.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
extends: ["spectral:oas"]
2+
rules:
3+
no-$ref-siblings: off
4+
oas3-valid-schema-example: off

0 commit comments

Comments
 (0)