Skip to content

Commit 56d4d23

Browse files
mikekistlerralfhandl
authored andcommitted
Apply suggestions from PR review
Co-authored-by: Ralf Handl <[email protected]>
1 parent 2ce3cfe commit 56d4d23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

versions/3.1.1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ In order to preserve the ability to round-trip between YAML and JSON formats, YA
117117
* Tags MUST be limited to those allowed by [YAML's JSON schema ruleset](https://yaml.org/spec/1.2/spec.html#id2803231), which defines a subset of the YAML syntax and is unrelated to [[JSON-Schema-2020-12|JSON Schema]].
118118
* Keys used in YAML maps MUST be limited to a scalar string, as defined by the [YAML Failsafe schema ruleset](https://yaml.org/spec/1.2/spec.html#id2802346).
119119

120-
**Note:** While APIs may be described by OpenAPI Description in either YAML or JSON format, the API request and response bodies and other content are not required to be JSON or YAML.
120+
**Note:** While APIs may be described by OpenAPI Descriptions in either YAML or JSON format, the API request and response bodies and other content are not required to be JSON or YAML.
121121

122122
### OpenAPI Description Structure
123123

@@ -157,7 +157,7 @@ It is the responsibility of an embedding format to define how to parse embedded
157157
JSON or YAML objects within an OAD are interpreted as specific Objects (such as [Operation Objects](#operation-object), [Response Objects](#response-object), [Reference Objects](#reference-object), etc.) based on their context. Depending on how references are arranged, a given JSON or YAML object can be interpreted in multiple different contexts:
158158

159159
* The root object of the entry document is interpreted as an OpenAPI Object
160-
* As the Object type implied by its parent Object within the description
160+
* As the Object type implied by its parent Object within the OpenAPI Description
161161
* As a reference target, with the Object type matching the reference source's context
162162

163163
If the same JSON/YAML object is parsed multiple times and the respective contexts require it to be parsed as _different_ Object types, the resulting behavior is _implementation defined_, and MAY be treated as an error if detected. An example would be referencing an empty Schema Object under `#/components/schemas` where a Path Item Object is expected, as an empty object is valid for both types. For maximum interoperability, it is RECOMMENDED that OpenAPI Description authors avoid such scenarios.

0 commit comments

Comments
 (0)