Skip to content

Commit 8554792

Browse files
describe stringified response codes without referencing a specific format
In JSON, property keys are always strings; in YAML they may or not be depending on the parser, but other formats may also be in use (TOML, TOON etc). What matters is the resulting type(s) of the decoded data, not the specific formatting used for the serialized form.
1 parent 67b82e2 commit 8554792

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/oas.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2129,7 +2129,7 @@ call.
21292129

21302130
| Field Pattern | Type | Description |
21312131
| ---- | :----: | ---- |
2132-
| <a name="responses-code"></a>[HTTP Status Code](#http-status-codes) | [Response Object](#response-object) \| [Reference Object](#reference-object) | Any [HTTP status code](#http-status-codes) can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. This field MUST be enclosed in quotation marks (for example, `"200"`) for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character `X`. For example, `2XX` represents all response codes between `200` and `299`. Only the following range definitions are allowed: `1XX`, `2XX`, `3XX`, `4XX`, and `5XX`. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code. |
2132+
| <a name="responses-code"></a>[HTTP Status Code](#http-status-codes) | [Response Object](#response-object) \| [Reference Object](#reference-object) | Any [HTTP status code](#http-status-codes) can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. This field MUST be represented by a string (for example, `"200"`) for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character `X`. For example, `2XX` represents all response codes between `200` and `299`. Only the following range definitions are allowed: `1XX`, `2XX`, `3XX`, `4XX`, and `5XX`. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code. |
21332133

21342134
This object MAY be extended with [Specification Extensions](#specification-extensions).
21352135

0 commit comments

Comments
 (0)