Skip to content

Commit df7f5f9

Browse files
philsturgeonPhil SturgeonkarenetheridgeRelequestual
authored
$schema Guidance (#2266)
* chore: explain how $schema might work * reordered and made it specifically only schema resources * Update versions/3.1.0.md Co-authored-by: Karen Etheridge <[email protected]> * Update versions/3.1.0.md Co-authored-by: Ben Hutton <[email protected]> * new approach Co-authored-by: Phil Sturgeon <[email protected]> Co-authored-by: Karen Etheridge <[email protected]> Co-authored-by: Ben Hutton <[email protected]>
1 parent 3a96dfe commit df7f5f9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

versions/3.1.0.md

+8
Original file line numberDiff line numberDiff line change
@@ -2336,6 +2336,14 @@ As such, inline schema definitions, which do not have a given id, *cannot* be us
23362336
The [xml](#schemaXml) property allows extra definitions when translating the JSON definition to XML.
23372337
The [XML Object](#xmlObject) contains additional information about the available options.
23382338

2339+
###### Picking Schema Vocabularies
2340+
2341+
It is important for tooling to be able to detect what meta-schema any given resource wishes to be processed with: JSON Schema Core, JSON Schema Validation, OpenAPI Schema Object, or some custom meta schema.
2342+
2343+
`$schema` MAY be present in any Schema Object, and if present MUST be used to determine which dialect should be used when processing the schema.
2344+
2345+
When `$schema` is not present, the default the following dialect MUST be assumed: `$schema: "https://spec.openapis.org/oas/3.1/schema-object"`.
2346+
23392347
##### Schema Object Examples
23402348

23412349
###### Primitive Sample

0 commit comments

Comments
 (0)