Skip to content

Commit 95cf4d8

Browse files
authored
Merge pull request OAI#1150 from krishahn/edit-3.0-format
plain language edits
2 parents f59a7a9 + 82be76e commit 95cf4d8

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

versions/3.0.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ The available status codes are defined by [RFC7231](http://tools.ietf.org/html/r
9696

9797
### Format
9898

99-
The files describing the RESTful API in accordance with this specification are represented as JSON objects and conform to the JSON standards.
100-
YAML, being a superset of JSON, can be used as well to represent an OAS file.
99+
An API description that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format.
101100

102101
For example, if a field has an array value, the JSON array representation will be used:
103102

@@ -106,19 +105,18 @@ For example, if a field has an array value, the JSON array representation will b
106105
"field": [...]
107106
}
108107
```
109-
110-
While the API is described using JSON, it does not impose a JSON input/output to the API itself.
111-
112108
All field names in the specification are **case sensitive**.
113109

114110
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.
115111

116-
Patterned fields can have multiple occurrences as long as each has a unique name.
112+
Patterned fields MUST have unique names within the containing object.
117113

118114
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:
119115

120-
- Tags MUST be limited to those allowed by the [JSON Schema ruleset](http://www.yaml.org/spec/1.2/spec.html#id2803231)
121-
- Keys used in YAML maps MUST be limited to a scalar string, as defined by the [YAML Failsafe schema ruleset](http://yaml.org/spec/1.2/spec.html#id2802346)
116+
- Tags MUST be limited to those allowed by the [JSON Schema ruleset](http://www.yaml.org/spec/1.2/spec.html#id2803231).
117+
- Keys used in YAML maps MUST be limited to a scalar string, as defined by the [YAML Failsafe schema ruleset](http://yaml.org/spec/1.2/spec.html#id2802346).
118+
119+
**Note:** While APIs are described by OpenAPI documents in YAML or JSON format, the API request and response bodies and other content are not required to be JSON or YAML.
122120

123121
### <a name="fileStructure"></a>File Structure
124122

0 commit comments

Comments
 (0)