Skip to content

Commit 634855e

Browse files
committed
Fix example, optional registry usage
It is not necessary to register a media type to use it with the `content` field.
1 parent ebf9a44 commit 634855e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/oas.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ As these are not standards, and often contradict each other, the OAS does not at
10251025
Two avenues are available for supporting such formats with `in: "querystring"`:
10261026
10271027
* Use `content` and `text/plain` with a schema of `type: "string"` and define the format outside of OpenAPI. While this requires more work to document and construct or parse the format, which is seen as a plain string from the OpenAPI perspective, it provides the easiest flexible option
1028-
* Define a media type (which need not necessarily be [IANA-registered](https://www.rfc-editor.org/rfc/rfc6838.html)) and submit a registration for how it can be supported (using `in: "querystring"` and the `content` field) to the OpenAPI Initiative's [Media Type Registry](#media-type-registry).
1028+
* Define a media type (which need not necessarily be [IANA-registered](https://www.rfc-editor.org/rfc/rfc6838.html)) and a process for mapping in-memory data to the serialized media type. To increase the likelihood of support across multiple tools, submit a registration for the media type and process to the OpenAPI Initiative's [Media Type Registry](#media-type-registry).
10291029

10301030
##### Parameter Object Examples
10311031

@@ -1112,10 +1112,9 @@ content:
11121112
# Allow an arbitrary JSON object to keep
11131113
# the example simple
11141114
type: object
1115-
example: {
1116-
"numbers": [1, 2],
1117-
"flag": null
1118-
}
1115+
example:
1116+
# Shown with whitespace minimized
1117+
'{"numbers":[1,2],"flag":null}'
11191118
```
11201119

11211120
Assuming a path of `/foo`, a server of `https://example.com`, the full URL incorporating the value from the `example` field (with whitespace minimized) would be:

0 commit comments

Comments
 (0)