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

Commit 3ba244a

Browse files
authored
Merge pull request #755 from raml-org/751-JSON-schema-without-schemas
Clarify how to process JSON-formatted data structures without a $schema key
2 parents a495d57 + 709d5d7 commit 3ba244a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

versions/raml-10/raml-10.md

+2
Original file line numberDiff line numberDiff line change
@@ -1311,6 +1311,8 @@ types:
13111311

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

1314+
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.
1315+
13141316
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.
13151317

13161318
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.

0 commit comments

Comments
 (0)