Skip to content

Commit

Permalink
$schema Guidance (#2266)
Browse files Browse the repository at this point in the history
* 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 <ether@cpan.org>

* Update versions/3.1.0.md

Co-authored-by: Ben Hutton <relequestual@gmail.com>

* new approach

Co-authored-by: Phil Sturgeon <me@philsturgeon.uk>
Co-authored-by: Karen Etheridge <ether@cpan.org>
Co-authored-by: Ben Hutton <relequestual@gmail.com>
  • Loading branch information
4 people authored Jul 23, 2020
1 parent 3a96dfe commit df7f5f9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions versions/3.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2336,6 +2336,14 @@ As such, inline schema definitions, which do not have a given id, *cannot* be us
The [xml](#schemaXml) property allows extra definitions when translating the JSON definition to XML.
The [XML Object](#xmlObject) contains additional information about the available options.

###### Picking Schema Vocabularies

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.

`$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.

When `$schema` is not present, the default the following dialect MUST be assumed: `$schema: "https://spec.openapis.org/oas/3.1/schema-object"`.

##### Schema Object Examples

###### Primitive Sample
Expand Down

0 comments on commit df7f5f9

Please sign in to comment.