Skip to content

Commit 5e74e77

Browse files
committed
Updated YAML constraints
1 parent bc59244 commit 5e74e77

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

versions/3.0.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,7 @@ The HTTP Status Codes are used to indicate the status of the executed operation.
5151
### Format
5252

5353
The files describing the RESTful API in accordance with the OpenAPI Specification are represented as JSON objects and conform to the JSON standards. YAML, being a superset of JSON, can be used as well to
54-
represent a OAS (OpenAPI Specification) file. For YAML, version `1.1` is supported for OAS documents.
55-
56-
As YAML has a superset of features, the following YAML features are NOT supported by the OAS:
57-
58-
* YAML Merge. Consider using JSON Pointers instead
59-
* Numeric keys. All numeric keys should be quoted
54+
represent a OAS (OpenAPI Specification) file.
6055

6156
For example, if a field is said to have an array value, the JSON array representation will be used:
6257

@@ -72,6 +67,11 @@ All field names in the specification are **case sensitive**.
7267

7368
The schema exposes two types of fields. Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name. Patterned fields can have multiple occurrences as long as each has a unique name.
7469

70+
In order to preserve the ability to round-trip between YAML and JSON formats, YAML version [1.2](http://www.yaml.org/spec/1.2/spec.html) is recommended along with some additional constraints:
71+
72+
- Tags MUST be limited to those allowed by the [JSON Schema ruleset](http://www.yaml.org/spec/1.2/spec.html#id2803231)
73+
- Keys used in YAML maps MUST be limited to scalars defined by the JSON schema ruleset
74+
7575
### File Structure
7676

7777
The OAS representation of the API is made of a single file. However, parts of the definitions can be split into separate files, at the discretion of the user. This is applicable for `$ref` fields in the specification as follows from the [JSON Schema](http://json-schema.org) definitions.

0 commit comments

Comments
 (0)