Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #755 from raml-org/751-JSON-schema-without-schemas
Browse files Browse the repository at this point in the history
Clarify how to process JSON-formatted data structures without a $schema key
  • Loading branch information
jstoiko authored Apr 9, 2021
2 parents a495d57 + 709d5d7 commit 3ba244a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions versions/raml-10/raml-10.md
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,8 @@ types:

A RAML processor MUST be able to interpret and apply JSON and XML schemas.

Because JSON is also a valid YAML 1.2 syntax, a RAML processor SHOULD interpret JSON-formatted data structures that do not contain a `$schema` key as RAML type declarations.

An XML schema, or JSON schema, MUST NOT be used where the media type does not allow XML-formatted data, or JSON-formatted data, respectively. XML and JSON schemas are also forbidden in any declaration of query parameters, query string, URI parameters, and headers.

The nodes "schemas" and "types", as well as "schema" and "type", are mutually exclusive and synonymous for compatibility with RAML 0.8. API definitions SHOULD use "types" and "type", as "schemas" and "schema" are deprecated and might be removed in a future RAML version.
Expand Down

0 comments on commit 3ba244a

Please sign in to comment.