Skip to content

Commit e9dc186

Browse files
authored
Merge pull request #4137 from ralfhandl/schemas-yaml-to-json-test-check-in
Run tests with YAML metaschemas
2 parents 37e4ef0 + 7f19e32 commit e9dc186

File tree

12 files changed

+100
-3243
lines changed

12 files changed

+100
-3243
lines changed

.github/workflows/schema-tests.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: schema-test
55

66
#
77
# This workflow runs the npm test script to validate passing and failing
8-
# testcases for the metaschema.
8+
# testcases for the metaschemas
99
#
1010

1111
# run this on push to any branch and creation of pull-requests
@@ -23,13 +23,15 @@ jobs:
2323
- uses: actions/checkout@v4 # checkout repo content
2424
with:
2525
fetch-depth: 0
26+
2627
- uses: actions/setup-node@v4 # setup Node.js
2728
with:
2829
node-version: '20.x'
30+
2931
- name: Install dependencies from main
3032
run: |
3133
git checkout remotes/origin/main -- package.json package-lock.json
3234
npm ci
35+
3336
- name: Run tests
3437
run: npm run test
35-

schemas/v3.0/README.md

+21-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
1-
OpenAPI 3.0.X JSON Schema
2-
---
1+
# OpenAPI 3.0.X JSON Schema
32

4-
Here you can find the JSON Schema for validating OpenAPI definitions of versions 3.0.X.
3+
Here you can find the JSON Schema for validating OpenAPI definitions of versions 3.0.x.
54

6-
As a reminder, the JSON Schema is not the source of truth for the Specification. In cases of conflicts between the Specification itself and the JSON Schema, the Specification wins. Also, some Specification constraints cannot be represented with the JSON Schema so it's highly recommended to employ other methods to ensure compliance.
5+
As a reminder, the JSON Schema is not the source of truth for the Specification.
6+
In cases of conflicts between the Specification itself and the JSON Schema, the
7+
Specification wins. Also, some Specification constraints cannot be represented
8+
with the JSON Schema so it's highly recommended to employ other methods to
9+
ensure compliance.
710

8-
The iteration version of the JSON Schema can be found in the `id` field. For example, the value of `id: https://spec.openapis.org/oas/3.0/schema/2019-04-02` means this iteration was created on April 2nd, 2019.
11+
The iteration version of the JSON Schema can be found in the `id` field.
12+
For example, the value of `id: https://spec.openapis.org/oas/3.0/schema/2019-04-02` means this iteration was created on April 2nd, 2019.
913

10-
To submit improvements to the schema, modify the schema.yaml file only.
14+
## Contributing
15+
16+
To submit improvements to the schema, modify the `schema.yaml` and add test cases for your changes.
1117

1218
The TSC will then:
1319
- Run tests on the updated schema
1420
- Update the iteration version
15-
- Convert the schema.yaml to schema.json
1621
- Publish the new version
22+
23+
## Tests
24+
25+
The [test suite](../../tests/v3.0) is part of this package.
26+
27+
```bash
28+
npm install
29+
npm test
30+
```

0 commit comments

Comments
 (0)