Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
325 commits
Select commit Hold shift + click to select a range
b54b525
No loop, just work on src/schemas/validation
ralfhandl Feb 13, 2025
9d4f648
Update schema-publish.yaml
ralfhandl Feb 13, 2025
c43615c
npm script for building schemas locally
ralfhandl Feb 14, 2025
183ac8b
Run only on changes to inputs and scripts
ralfhandl Feb 14, 2025
bd302e3
Update schema-publish.yaml
ralfhandl Feb 14, 2025
494222b
Use branch name
ralfhandl Feb 14, 2025
94700fd
Prefer Discriminator Object terminology
mikekistler Feb 14, 2025
d36a8ff
More updates for PR review comments
mikekistler Feb 15, 2025
27216de
Add back polymorphic example using allOf
mikekistler Feb 15, 2025
4600360
Merge pull request #4336 from ralfhandl/dev-format-src-oas.md
ralfhandl Feb 17, 2025
3f82212
Apply suggestions from code review
ralfhandl Feb 17, 2025
4018f80
Update src/oas.md
ralfhandl Feb 17, 2025
00d4de1
Bump spec version to 3.2
ralfhandl Feb 17, 2025
92e11ec
Bump spec version in schema files
ralfhandl Feb 17, 2025
3c30838
Align terminology
ralfhandl Feb 17, 2025
1919c0b
build-src uses build.sh, remove build-src.sh
ralfhandl Feb 18, 2025
aaa779b
Update src/schemas/validation/README.md
ralfhandl Feb 18, 2025
0a41814
Update schema-publish.sh
ralfhandl Feb 18, 2025
3e2604f
Merge branch 'dev-schemas-live-in-src' of https://github.com/ralfhand…
ralfhandl Feb 18, 2025
6f75109
Update package.json
ralfhandl Feb 18, 2025
35b2333
Merge pull request #4369 from ralfhandl/dev-one-spec-build-script
lornajane Feb 20, 2025
afa9511
Update schema-publish.yaml
ralfhandl Feb 20, 2025
90f9f2f
Update README.md
ralfhandl Feb 20, 2025
92e5fc9
Merge pull request #4361 from ralfhandl/dev-schemas-live-in-src
lornajane Feb 20, 2025
5dc0d94
Use correct pattern
ralfhandl Feb 21, 2025
4056207
Merge pull request #4378 from ralfhandl/dev-fix-schema-publish.yaml
lornajane Feb 22, 2025
df69933
Reference RFC 9110 instead of RFCs 7230, 7231, and 7235
ralfhandl Feb 24, 2025
c11fda7
Use defaultMapping for unmapped discriminating values
mikekistler Feb 24, 2025
20117c7
Update schema-publish.sh
duncanbeevers Feb 15, 2025
5c8ce0e
Merge pull request #4376 from duncanbeevers/dev-schemas-live-in-src
ralfhandl Feb 25, 2025
da3c386
Apply suggestions from PR review
mikekistler Feb 27, 2025
8a2e070
Remove yaml2json
duncanbeevers Feb 27, 2025
9f113bd
Merge pull request #4386 from duncanbeevers/remove-yaml2json
ralfhandl Feb 28, 2025
6da8d26
New fixed fields in Security Scheme Object
ralfhandl Feb 28, 2025
f981427
Update schema-publish.sh
ralfhandl Mar 1, 2025
2e745dc
refreshUrl is a uri-reference
ralfhandl Mar 1, 2025
143c641
Merge pull request #4392 from OAI/main
ralfhandl Mar 6, 2025
35422e1
Merge pull request #4397 from OAI/dev
ralfhandl Mar 6, 2025
9f2a02b
Merge remote-tracking branch 'upstream/v3.2-dev' into 3.2-version-in-…
ralfhandl Mar 6, 2025
d1a2f0a
Change schema test fixtures openapi field to 3.2.0
ralfhandl Mar 6, 2025
70dbe5e
Merge pull request #4394 from ralfhandl/3.2-new-security-scheme-objec…
lornajane Mar 6, 2025
bfc3f8a
Merge pull request #4411 from OAI/main
lornajane Mar 6, 2025
f3c6b32
Merge pull request #4415 from OAI/dev
lornajane Mar 6, 2025
9c59e42
Merge remote-tracking branch 'upstream/v3.2-dev' into 3.2-reference-R…
ralfhandl Mar 7, 2025
d83602d
Fix typo
ralfhandl Mar 7, 2025
ff43df4
Update oas.md
ralfhandl Mar 7, 2025
311c1f7
Fix misspelled anchor tags
ralfhandl Mar 7, 2025
11b2b44
Merge pull request #4422 from OAI/ralfhandl-patch-1
ralfhandl Mar 7, 2025
9755f94
Revert "Fix typo"
ralfhandl Mar 7, 2025
d217c12
Merge remote-tracking branch 'upstream/v3.2-dev' into 3.2-reference-R…
ralfhandl Mar 7, 2025
d7bbe0e
Merge pull request #4421 from OAI/main
ralfhandl Mar 10, 2025
bf4a5ee
Merge pull request #4424 from OAI/dev
ralfhandl Mar 10, 2025
5e1aebe
Merge pull request #4399 from ralfhandl/dev-schema-publish-fix-error-…
handrews Mar 13, 2025
e801855
Merge pull request #4432 from OAI/dev
ralfhandl Mar 13, 2025
3e72c1c
Merge pull request #4438 from OAI/main
ralfhandl Mar 14, 2025
8acb75c
Merge pull request #4441 from OAI/dev
ralfhandl Mar 14, 2025
2ae9e1e
Merge pull request #4443 from OAI/main
ralfhandl Mar 17, 2025
c24d89d
Merge pull request #4446 from OAI/dev
ralfhandl Mar 17, 2025
3bc53b8
Merge pull request #4449 from OAI/main
ralfhandl Mar 18, 2025
c321b1e
Merge pull request #4451 from OAI/dev
ralfhandl Mar 18, 2025
521a391
schema tests: output reason if "pass" test fixture fails
ralfhandl Mar 18, 2025
7ff212b
Schema coverage: 100%
ralfhandl Mar 18, 2025
50f65f5
Allow URIs for Security Schemes
handrews Feb 24, 2025
33aef07
Review feedback
handrews Mar 13, 2025
fcc25e5
Merge pull request #4457 from OAI/main
ralfhandl Mar 19, 2025
ac2fde4
Merge pull request #4461 from OAI/dev
ralfhandl Mar 19, 2025
5599cd3
Update JSON Schema references to latest 2020-12 draft
ralfhandl Mar 19, 2025
9e1ff6b
feat: adds a name field to the server object
baywet Mar 19, 2025
f142681
chore: updates schema for server name field
baywet Mar 19, 2025
49f43d4
Update src/schemas/validation/schema.yaml
baywet Mar 19, 2025
5ed147c
ci: adds a test value
baywet Mar 19, 2025
cc1be37
Merge branch 'feat/server-name' of https://github.com/baywet/OpenAPI-…
baywet Mar 19, 2025
c4dfef1
Merge pull request #4339 from OAI/mdk/optional-discriminator
handrews Mar 20, 2025
ee236ee
Merge pull request #4367 from ralfhandl/3.2-version-in-schema
handrews Mar 20, 2025
c555c94
Merge pull request #4455 from ralfhandl/dev-schema-tests.-with-diagno…
handrews Mar 20, 2025
4ed2493
Merge pull request #4476 from OAI/dev
ralfhandl Mar 20, 2025
ee38f90
Merge pull request #4474 from OAI/main
ralfhandl Mar 20, 2025
0da8496
Merge pull request #4478 from OAI/dev
ralfhandl Mar 20, 2025
e54843b
Merge remote-tracking branch 'upstream/v3.2-dev' into 3.2-schema-test…
ralfhandl Mar 20, 2025
bb79c48
Merge pull request #4483 from OAI/main
ralfhandl Mar 21, 2025
f05be64
Merge pull request #4485 from OAI/dev
ralfhandl Mar 21, 2025
41c0ba7
Merge pull request #4380 from ralfhandl/3.2-reference-RFC9110
miqui Mar 22, 2025
90a3d7f
Merge pull request #4456 from ralfhandl/3.2-schema-test-coverage
miqui Mar 22, 2025
bcf3c58
Merge pull request #4467 from ralfhandl/3.2-reference-latest-json-sch…
miqui Mar 22, 2025
55d0c62
Merge pull request #4388 from handrews/sec-req-uri
miqui Mar 22, 2025
73f2e64
Merge pull request #4490 from OAI/main
ralfhandl Mar 24, 2025
bab4f12
Merge pull request #4497 from OAI/dev
ralfhandl Mar 24, 2025
2b0b342
Fixes #4487
ralfhandl Mar 26, 2025
b7a2d9f
fixes #3538
ralfhandl Mar 26, 2025
5929a54
Schema test case for device authorization
ralfhandl Mar 26, 2025
3a763a4
Remove promise of URIs for tags, not alternatives
handrews Mar 27, 2025
1a3ddd1
Merge pull request #4469 from baywet/feat/server-name
miqui Mar 27, 2025
a794bc6
Merge pull request #4499 from ralfhandl/3.2-reference-rfc8259
lornajane Mar 27, 2025
d2c3bdb
Merge pull request #4500 from ralfhandl/3.2-response-object-descripti…
lornajane Mar 27, 2025
af5986a
Merge pull request #4501 from ralfhandl/3.2-schema-coverage
lornajane Mar 27, 2025
1c4214a
Merge pull request #4498 from OAI/main
ralfhandl Mar 28, 2025
04cf0a5
Merge pull request #4511 from OAI/dev
ralfhandl Mar 28, 2025
701d460
feat: adds additional operations for path item object
baywet Mar 28, 2025
524cc6f
chore: adds test data for additional operations
baywet Mar 28, 2025
b12f34b
fix: schema definition for outlawed properties
baywet Mar 28, 2025
692b413
fix: schema indentation and adds required keyword
baywet Mar 28, 2025
62dbf31
fix: 🤦 vincent needs a coffee
baywet Mar 28, 2025
15e99ca
Apply suggestions from code review
baywet Mar 28, 2025
72a29d7
Update tests/schema/pass/path-item-object-example.yaml
baywet Mar 28, 2025
2452ad1
chore: moves additional operations after the defined operations
baywet Mar 28, 2025
4cf5168
ci: adds a failing test for methods that should be defined on the par…
baywet Mar 28, 2025
cfdc4bc
Update tests/schema/fail/path-item-object-example.yaml
baywet Mar 28, 2025
9c0c7cb
Use human-friendly rendering of JSON Schema I-D
handrews Mar 26, 2025
03e47f5
Spell out "section"
handrews Mar 29, 2025
c548d75
Merge pull request #4519 from OAI/main
handrews Mar 30, 2025
95aa5ac
Merge pull request #4521 from OAI/dev
handrews Mar 30, 2025
2aee7ee
Fix a duplicated anchor link that makes other links incorrect
lornajane Mar 30, 2025
d5141ec
chore: renames fail file to have more explicit definition of the case
baywet Mar 31, 2025
6ed7fe8
feat: adds query as "principal" operation type in path item
baywet Mar 31, 2025
61fee04
fix: excluded operations filter for additional operations
baywet Mar 31, 2025
d3c477c
docs: updates wording for additional operations exclusions
baywet Mar 31, 2025
2dc3e06
docs: updates additional operation samples to match hoisting of query
baywet Mar 31, 2025
e465abc
Merge branch 'feat/additional-operations' of https://github.com/baywe…
baywet Mar 31, 2025
3fb4d91
ci: fixes pass example test
baywet Mar 31, 2025
dd0cf16
docs: adds a query example to pass tests
baywet Mar 31, 2025
fc29d3a
docs: precisions around capitalization
baywet Mar 31, 2025
c9cb607
Merge pull request #4524 from OAI/main
handrews Mar 31, 2025
419f6f8
Merge pull request #4526 from OAI/dev
handrews Mar 31, 2025
9a53a9d
ci: restricts to RFC9110 methods syntax
baywet Mar 31, 2025
621d1c3
docs: adds the query method to the spec
baywet Mar 31, 2025
ed5cfe4
fix: tchar definition
baywet Mar 31, 2025
480dc75
Fix regex character class
handrews Mar 31, 2025
1826161
Fix character class in regular expression
handrews Mar 31, 2025
3ee2d24
Undo my incorrect additional "fix"
handrews Mar 31, 2025
85aad27
Merge pull request #4522 from lornajane/security-schemes-anchor
ralfhandl Apr 1, 2025
0c4f6be
docs: typo fix in html attribute name
baywet Apr 1, 2025
238aaca
docs: schema regex fix
baywet Apr 1, 2025
7b29ee4
Merge pull request #4514 from baywet/feat/additional-operations
ralfhandl Apr 1, 2025
c32668a
Merge pull request #4503 from handrews/js-urls
lornajane Apr 3, 2025
c4ce7ec
Merge pull request #4505 from handrews/no-tag-urif
lornajane Apr 3, 2025
bfcd4a1
Merge pull request #4528 from OAI/main
handrews Apr 10, 2025
e889471
Merge pull request #4537 from OAI/dev
handrews Apr 10, 2025
8b3d66e
Run format-markdown
handrews Apr 27, 2025
5aa2c1c
Merge pull request #4550 from OAI/main
ralfhandl Apr 29, 2025
1fccd24
Merge pull request #4558 from OAI/dev
ralfhandl Apr 29, 2025
4ad28b5
Allow the Encoding Object in all locations
handrews Apr 29, 2025
2029e0f
Better wording for broad Encoding Object use
handrews Apr 29, 2025
398d048
Merge pull request #4552 from handrews/formatting
lornajane May 1, 2025
e511664
Merge pull request #4559 from handrews/enc-everywhere
handrews May 1, 2025
f2879df
Arrange encoding information more clearly
handrews May 1, 2025
98229e0
Improved wording
handrews May 4, 2025
4fa8b7d
Fix wording error from copy-paste
handrews May 5, 2025
bb0a4ca
Fix grammar.
handrews May 5, 2025
35dc935
Clarify the rationale for the encoding field
handrews May 6, 2025
ed60733
Remove media type registry mentions for encoding.
handrews May 7, 2025
1164f03
Merge pull request #4562 from handrews/enc-refactor
handrews May 7, 2025
86e8b14
Merge pull request #4568 from OAI/main
handrews May 8, 2025
713fd79
Merge pull request #4572 from OAI/dev
handrews May 8, 2025
2ba61aa
Sequential media type support.
handrews Apr 27, 2025
4d8ea02
Schema for itemSchema Media Type Object field
handrews Apr 27, 2025
1950075
Remove stray markup character
handrews Apr 28, 2025
c583253
text/event-stream improvements
handrews Apr 29, 2025
d5916fd
Better text/event-stream reference
handrews Apr 29, 2025
bd20d6d
Clarify streaming binary/string usage.
handrews Apr 29, 2025
e83d8ed
Use the same text/event-stream spec everywhere
handrews Apr 29, 2025
4093055
Better wording: content vs media
handrews Apr 30, 2025
ef309c2
Clarified wording
handrews May 1, 2025
8c4869c
Fix plural
handrews May 1, 2025
98647df
Review feedback from hudlow
handrews May 1, 2025
eb66cba
Remove caveat leftover from previous approach
handrews May 1, 2025
5ab5b05
Fix wording
handrews May 2, 2025
072c562
Fix event-stream event schema
handrews May 4, 2025
58f67f7
int64 instead of double for numeric string example
handrews May 8, 2025
d198ac3
Merge pull request #4554 from handrews/seq-json2
handrews May 11, 2025
7bd8a15
Add `$self` for self-identifying documents
handrews Feb 28, 2025
71ec162
Fix missing multipart boundary
handrews Apr 30, 2025
db9f643
Move base URI examples to appendix
handrews Apr 30, 2025
2832652
Improved examples
handrews Apr 30, 2025
4435fd3
Fix more example bugs
handrews May 4, 2025
182ca17
All example URI paths start with /api/...
handrews May 8, 2025
7be51a4
Allow relative `$self`, include examples
handrews May 8, 2025
4068c09
Fix another base URI example bug
handrews May 11, 2025
c817eb7
Editorial change: Link Object points to Operation Object
char0n Dec 17, 2024
1b11296
Editorial change: fix typo in Link Object description
char0n Dec 18, 2024
dc94d95
Editorial change: add Header Object to Generating and Validating URIs…
char0n Dec 18, 2024
393ab02
Editorial change: Include Header Object into 'Working With Examples' …
char0n Dec 18, 2024
840d5ac
Update src/oas.md
char0n Dec 18, 2024
b25ecf1
Update src/oas.md
char0n Dec 18, 2024
6df11eb
Update src/oas.md
char0n Dec 18, 2024
4c3d5e0
Update src/oas.md
char0n Dec 18, 2024
dce4f8a
Update src/oas.md
char0n Dec 18, 2024
8085064
Introduce constraints for Server Object url fixed field
char0n Dec 19, 2024
a681d3e
Update src/oas.md
char0n Dec 20, 2024
1a65883
Update src/oas.md
char0n Dec 20, 2024
40c3d5f
Editorial change: fix anchor to Components.securitySchemes
char0n Dec 27, 2024
4e74e52
Fix copy-paste "format: binary" error
handrews Jan 9, 2025
1dd8c5b
Typo
ralfhandl Jan 10, 2025
00b5f8f
Feedback from mkistler about contentEncoding
handrews Jan 15, 2025
9a1a7c0
Apply suggestions from code review
ralfhandl Jan 16, 2025
0f6db5f
Update src schema with changes from #4328
ralfhandl Feb 13, 2025
10fc7c8
Discrimator -> Discriminator
handrews Mar 27, 2025
966c0c6
Apply suggestions from code review
handrews May 12, 2025
eace593
Better wording
handrews May 12, 2025
8709e12
Review feedback
handrews May 12, 2025
fc66d13
Remove link to metaschema...
handrews May 12, 2025
2c4d5ed
Only use YAML for examples
handrews May 13, 2025
5fdd275
Allow IRIs for XML namespaces
handrews May 14, 2025
84de36b
Merge pull request #4579 from handrews/xml-iri
lornajane May 15, 2025
d0e996e
Merge pull request #4573 from handrews/312-port
lornajane May 15, 2025
fee957b
Merge pull request #4583 from OAI/main
handrews May 15, 2025
0273b21
Merge pull request #4587 from OAI/dev
handrews May 15, 2025
f855d47
Merge pull request #4577 from handrews/nojson
handrews May 15, 2025
e077fce
Add in: "querystring" parameter location
handrews Apr 29, 2025
bbb20ca
Define a policy for deprecation markings.
handrews May 16, 2025
721d714
Allow allowReserved everywhere
handrews May 16, 2025
9a7d8ca
Better formatting
handrews May 16, 2025
6571fb3
Fix Deprecation heading level
handrews May 16, 2025
6e85994
Fixed spelling
handrews May 16, 2025
8fafda0
Merge pull request #4602 from OAI/main
handrews May 16, 2025
8431914
Merge pull request #4604 from OAI/dev
handrews May 16, 2025
9fb0bbd
Align anchor with defaultMapping field name
handrews May 18, 2025
3657b5a
Merge pull request #4615 from handrews/dm-anchor
lornajane May 19, 2025
4657cf5
Merge pull request #4591 from handrews/deprecation
ralfhandl May 19, 2025
f65b747
Merge pull request #4618 from OAI/main
handrews May 20, 2025
a49365c
Merge pull request #4620 from OAI/dev
handrews May 20, 2025
f35f66d
Improved wording
handrews May 21, 2025
0b7c42d
Improve querystring examples, link to registry
handrews May 22, 2025
e2a39a5
Merge pull request #4593 from handrews/allow-reserved
lornajane May 24, 2025
651269e
chore: remove duplicate PR reviewers within GH actions
frankkilcommins May 27, 2025
ebf9a44
Apply suggestions from code review
handrews May 27, 2025
634855e
Fix example, optional registry usage
handrews May 27, 2025
57d4415
Merge pull request #4626 from frankkilcommins/remove-duplicate-reviewers
handrews May 27, 2025
5cd7bc1
Merge pull request #4629 from OAI/dev
handrews May 27, 2025
f87e139
Add "summary" field to Response Object
handrews May 28, 2025
6a4949a
Merge pull request #4630 from handrews/resp-sum
handrews May 28, 2025
50bb009
Merge pull request #4635 from OAI/main
handrews May 28, 2025
3715fc4
Merge pull request #4637 from OAI/dev
handrews May 28, 2025
96af720
Merge pull request #4556 from handrews/self3
handrews May 28, 2025
6370475
Change example back
handrews May 28, 2025
4335224
Merge pull request #4639 from OAI/main
handrews May 29, 2025
68eee22
Merge pull request #4641 from OAI/dev
handrews May 29, 2025
bb32b97
Don't call the JSONPath example parameter "sql"
handrews May 29, 2025
a43f132
Merge pull request #4590 from handrews/querystring
handrews May 29, 2025
a97eb1f
Tiny copyedit fix
lornajane Jun 1, 2025
ec0271b
Merge pull request #4646 from lornajane/number-of-in-values
handrews Jun 2, 2025
26ab6e5
Merge pull request #4652 from OAI/main
handrews Jun 4, 2025
c82e017
Merge pull request #4654 from OAI/dev
handrews Jun 4, 2025
7e7cb1d
Merge pull request #4668 from OAI/main
handrews Jun 9, 2025
6e51fbc
Merge pull request #4670 from OAI/dev
handrews Jun 9, 2025
bda91e7
Merge pull request #4677 from OAI/main
handrews Jun 10, 2025
3f42eeb
Merge pull request #4679 from OAI/dev
handrews Jun 10, 2025
ec901cf
Merge pull request #4683 from OAI/main
ralfhandl Jun 11, 2025
6ecd50e
Merge pull request #4685 from OAI/dev
ralfhandl Jun 11, 2025
f7deb02
Fail if schema test coverage is below 100%
ralfhandl Jun 11, 2025
0b8e0ef
Merge branch 'main-fail-if-schema-test-coverage-falls-below-100-perce…
ralfhandl Jun 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/respec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
delete-branch: true
path: deploy
labels: Housekeeping
reviewers: darrelmiller,webron,earth2marsh,webron,lornajane,mikekistler,miqui,ralfhandl,handrews,karenetheridge
reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,ralfhandl,handrews,karenetheridge
title: Update ReSpec-rendered specification versions
commit-message: Update ReSpec-rendered specification versions
signoff: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/schema-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
delete-branch: true
path: deploy
labels: Housekeeping,Schema
reviewers: darrelmiller,webron,earth2marsh,webron,lornajane,mikekistler,miqui,ralfhandl,handrews,karenetheridge
reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,ralfhandl,handrews,karenetheridge
title: '${{ github.ref_name }}: publish OpenAPI schema iterations'
commit-message: New OpenAPI schema iterations
signoff: true
Expand Down
4 changes: 4 additions & 0 deletions scripts/schema-test-coverage.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,7 @@ console.log(
allLocations.length,
"(" + Math.floor((visitedLocations.size / allLocations.length) * 100) + "%)",
);

if (visitedLocations.size != allLocations.length) {
process.exitCode = 1;
}
5 changes: 5 additions & 0 deletions scripts/schema-test-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@

[[ ! -e src/schemas ]] && exit 0

branch=$(git branch --show-current)

echo
echo "Schema Test Coverage"
echo

node scripts/schema-test-coverage.mjs src/schemas/validation/schema.yaml tests/schema/pass
rc=$?

[[ "$branch" == "dev" ]] || exit $rc
4,361 changes: 4,361 additions & 0 deletions src/oas.md

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions src/schemas/validation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# OpenAPI 3.X.Y JSON Schema

This directory contains the YAML sources for generating the JSON Schemas for validating OpenAPI definitions of versions 3.X.Y, which are published on [https://spec.openapis.org](https://spec.openapis.org).

Due to limitations of GitHub pages, the schemas on the spec site are served with `Content-Type: application/octet-stream`, but should be interpreted as `application/schema+json`.

The sources in this directory, which have `WORK-IN-PROGRESS` in their `$id`s, are _not intended for direct use_.

## Schema `$id` dates

The published schemas on the spec site have an _iteration date_ in their `id`s.
This allows the schemas for a release line to be updated independent of the spec patch release cycle.

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.1/schema/2021-03-02` means this iteration was created on March 2nd, 2021.

We are [working on](https://github.com/OAI/OpenAPI-Specification/issues/4152) how to best provide programmatic access for determining the latest date for each schema.

## Choosing which schema to use

There are two schemas to choose from for versions 3.1 and greater, both of which have an `$id` that starts with `https://spec.openapis.org/oas/3.X/` and ends with the iteration date:

* `https://spec.openapis.org/oas/3.X/schema/{date}`, source: `schema.yaml` — A self-contained schema that _does not_ validate Schema Objects beyond `type: [object, boolean]`
* `https://spec.openapis.org/oas/3.X/meta/{date}`, source: `meta.yaml` — The vocabulary metaschema for OAS 3.X's extensions to draft 2020-12
* `https://spec.openapis.org/oas/3.X/dialect/base/{date}`, source: `base.yaml` — The dialect metaschema that extends the standard `draft/2020-12` metaschema by adding the OAS "base" vocabulary
* `https://spec.openapis.org/oas/3.1/schema-base/{date}`, source: `schema-base.yaml` — A schema that combines the self-contained schema and the "base" dialect schema to validate Schema Objects with the dialect; this schema does not allow changing `$schema` or `jsonSchemaDialect` to other dialects

The name "base" for the dialect was intended to indicate that the OAS dialect could be further extended.

An additional schema that validates the Schema Object with the OAS 3.X dialect but does not restrict changing `$schema` is [under consideration](https://github.com/OAI/OpenAPI-Specification/issues/4147).

## Improving the schemas

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.

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

Improvements can be submitted by opening a PR against the `vX.Y-dev` branch of the respective specification version.

Modify the `schema.yaml` file and add test cases for your changes.

The TSC will then:
- Run tests on the updated schema
- Update the iteration version
- Publish the new version

The [test suite](../../../tests/schema) is part of this package.

```bash
npm install
npm test
```
21 changes: 21 additions & 0 deletions src/schemas/validation/dialect.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$id: https://spec.openapis.org/oas/3.2/dialect/WORK-IN-PROGRESS
$schema: https://json-schema.org/draft/2020-12/schema

title: OpenAPI 3.2 Schema Object Dialect
description: A JSON Schema dialect describing schemas found in OpenAPI v3.2.x Descriptions

$dynamicAnchor: meta

$vocabulary:
https://json-schema.org/draft/2020-12/vocab/applicator: true
https://json-schema.org/draft/2020-12/vocab/content: true
https://json-schema.org/draft/2020-12/vocab/core: true
https://json-schema.org/draft/2020-12/vocab/format-annotation: true
https://json-schema.org/draft/2020-12/vocab/meta-data: true
https://json-schema.org/draft/2020-12/vocab/unevaluated: true
https://json-schema.org/draft/2020-12/vocab/validation: true
https://spec.openapis.org/oas/3.2/vocab/base: false

allOf:
- $ref: https://json-schema.org/draft/2020-12/schema
- $ref: https://spec.openapis.org/oas/3.2/meta/WORK-IN-PROGRESS
70 changes: 70 additions & 0 deletions src/schemas/validation/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
$id: https://spec.openapis.org/oas/3.2/meta/WORK-IN-PROGRESS
$schema: https://json-schema.org/draft/2020-12/schema

title: OAS Base Vocabulary
description: A JSON Schema Vocabulary used in the OpenAPI JSON Schema Dialect

$dynamicAnchor: meta

$vocabulary:
https://spec.openapis.org/oas/3.2/vocab/base: true

type:
- object
- boolean
properties:
discriminator:
$ref: '#/$defs/discriminator'
example: true
externalDocs:
$ref: '#/$defs/external-docs'
xml:
$ref: '#/$defs/xml'

$defs:
discriminator:
$ref: '#/$defs/extensible'
properties:
mapping:
additionalProperties:
type: string
type: object
propertyName:
type: string
required:
- propertyName
type: object
unevaluatedProperties: false

extensible:
patternProperties:
^x-: true
external-docs:
$ref: '#/$defs/extensible'
properties:
description:
type: string
url:
format: uri-reference
type: string
required:
- url
type: object
unevaluatedProperties: false

xml:
$ref: '#/$defs/extensible'
properties:
attribute:
type: boolean
name:
type: string
namespace:
format: iri
type: string
prefix:
type: string
wrapped:
type: boolean
type: object
unevaluatedProperties: false
20 changes: 20 additions & 0 deletions src/schemas/validation/schema-base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
$id: 'https://spec.openapis.org/oas/3.2/schema-base/WORK-IN-PROGRESS'
$schema: 'https://json-schema.org/draft/2020-12/schema'

description: The description of OpenAPI v3.2.x Documents using the OpenAPI JSON Schema dialect

$ref: 'https://spec.openapis.org/oas/3.2/schema/WORK-IN-PROGRESS'
properties:
jsonSchemaDialect:
$ref: '#/$defs/dialect'

$defs:
dialect:
const: 'https://spec.openapis.org/oas/3.2/dialect/WORK-IN-PROGRESS'

schema:
$dynamicAnchor: meta
$ref: 'https://spec.openapis.org/oas/3.2/dialect/WORK-IN-PROGRESS'
properties:
$schema:
$ref: '#/$defs/dialect'
Loading
Loading