Skip to content

Commit cc1995d

Browse files
committed
Merge remote-tracking branch 'upstream/main' into pr/4146
2 parents c0f07c9 + e9dc186 commit cc1995d

File tree

12 files changed

+107
-3233
lines changed

12 files changed

+107
-3233
lines changed

.github/workflows/schema-tests.yaml

Lines changed: 4 additions & 2 deletions
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

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
OpenAPI 3.0.X JSON Schema
2-
---
1+
# OpenAPI 3.0.X JSON Schema
32

43
This directory contains the YAML source for generating the JSON Schema for validating OpenAPI definitions of versions 3.0.X, which is published on [https://spec.openapis.org](https://spec.openapis.org).
54

@@ -12,16 +11,33 @@ The source in this directory, which has `WORK-IN-PROGRESS` in its `id`, is _not
1211
The published schemas on the spec site have an _iteration date_ in their `id`s.
1312
This allows the schemas for a release line (in this case 3.0) to be updated independent of the spec patch release cycle.
1413

15-
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.
14+
The iteration version of the JSON Schema can be found in the `id` field.
15+
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.
1616

1717
The special URL with `latest` in place of the date is intended to provide an HTTP redirect to the most recent dated schema.
1818

1919
## Improving the schema
2020

21-
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.
21+
As a reminder, the JSON Schema is not the source of truth for the Specification.
22+
In cases of conflicts between the Specification itself and the JSON Schema, the Specification wins.
23+
Also, some Specification constraints cannot be represented with the JSON Schema so it's highly recommended to employ other methods to ensure compliance.
2224

2325
The schema only validates the mandatory aspects of the OAS.
2426
Validating requirements that are optional, or field usage that has undefined or ignored behavior are not within the scope of this schema.
2527
Schemas to perform additional optional validation are [under consideration](https://github.com/OAI/OpenAPI-Specification/issues/4141).
2628

2729
Improvements can be submitted by opening a PR against the `main` branch.
30+
31+
Modify the `schema.yaml` file and add test cases for your changes.
32+
33+
The TSC will then:
34+
- Run tests on the updated schema
35+
- Update the iteration version
36+
- Publish the new version
37+
38+
The [test suite](../../tests/v3.0) is part of this package.
39+
40+
```bash
41+
npm install
42+
npm test
43+
```

0 commit comments

Comments
 (0)