You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/oas.md
+11-32Lines changed: 11 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -990,7 +990,7 @@ As these are not standards, and often contradict each other, the OAS does not at
990
990
Two avenues are available for supporting such formats with `in: "querystring"`:
991
991
992
992
* 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
993
-
* 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).
993
+
* 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](#openapi-media-type-registry).
994
994
995
995
#### Parameter Object Examples
996
996
@@ -1241,7 +1241,7 @@ examples:
1241
1241
serializedValue: "%24.a.b%5B1%3A1%5D"
1242
1242
```
1243
1243
1244
-
As there is not, as of this writing, a [registered](#media-type-registry) mapping between the JSON Schema data model and JSONPath, the details of the string's allowed structure would need to be conveyed either in a human-readable `description` field, or through a mechanism outside of the OpenAPI Description, such as a JSON Schema for the data structure to be queried.
1244
+
As there is not, as of this writing, a [registered](#openapi-media-type-registry) mapping between the JSON Schema data model and JSONPath, the details of the string's allowed structure would need to be conveyed either in a human-readable `description` field, or through a mechanism outside of the OpenAPI Description, such as a JSON Schema for the data structure to be queried.
1245
1245
1246
1246
Assuming a path of `/foo` and a server of `https://example.com`, the full URL incorporating the value from `serializedValue` would be:
1247
1247
@@ -1319,40 +1319,19 @@ See [Working With Examples](#working-with-examples) for further guidance regardi
1319
1319
1320
1320
This object MAY be extended with [Specification Extensions](#specification-extensions).
1321
1321
1322
-
See also the [Media Type Registry](#media-type-registry).
1323
-
1324
1322
#### Media Types
1325
1323
1326
-
Media type definitions are spread across several resources.
1327
-
The media type definitions SHOULD be in compliance with [RFC6838](https://tools.ietf.org/html/rfc6838).
1324
+
Media types are publicly registered with the [IANA media types registry](https://www.iana.org/assignments/media-types/media-types.xhtml), through process documented in [[?RFC6838]].
1328
1325
1329
-
Some examples of possible media type definitions:
1326
+
APIs also sometimes define private media types such as GitHub's `application/vnd.github.v3+json`, which are not registered, and other media types such as `application/schema+json` become widely used before an intended registration.
1330
1327
1331
-
```text
1332
-
text/plain; charset=utf-8
1333
-
application/json
1334
-
application/vnd.github+json
1335
-
application/vnd.github.v3+json
1336
-
application/vnd.github.v3.raw+json
1337
-
application/vnd.github.v3.text+json
1338
-
application/vnd.github.v3.html+json
1339
-
application/vnd.github.v3.full+json
1340
-
application/vnd.github.v3.diff
1341
-
application/vnd.github.v3.patch
1342
-
```
1343
-
1344
-
JSON-based and JSON-compatible YAML-based media types can make direct use of the [Schema Object](#schema-object) as the Object uses JSON Schema.
1345
-
The use of the Schema Object with other media types is handled by mapping them into the JSON Schema [instance data model](https://www.ietf.org/archive/id/draft-bhutton-json-schema-01.html#name-instance-data-model).
1346
-
These mappings may be implicit based on the media type, or explicit based on the values of particular fields.
1347
-
Each mapping is addressed where the relevant media type is discussed in this section or under the [Media Type Object](#media-type-object) or [Encoding Object](#encoding-object)
1348
-
1349
-
##### Media Type Registry
1350
-
1351
-
While the [Schema Object](#schema-object) is designed to describe and validate JSON, several other media types are commonly used in APIs.
1352
-
Requirements regarding support for other media types are documented in this Media Types section and in several Object sections later in this specification.
1353
-
For convenience and future extensibility, these are cataloged in the OpenAPI Initiative's [Media Type Registry](https://spec.openapis.org/registry/media-type/), which indicates where in this specification the relevant requirements can be found.
1354
-
1355
-
See also the [Media Type Object](#media-type-object) for further information on working with specific media types.
1328
+
See [Parsing and Serializing](#parsing-and-serializing) under the [Schema Object](#schema-object) for guidance on using schemas with a variety of media types.
1329
+
1330
+
##### OpenAPI Media Type Registry
1331
+
1332
+
The OpenAPI Initiative maintains a [Media Type Registry](https://spec.openapis.org/registry/media-type/) summarizing media type support expected by this specification and providing an index to which sections address which media types.
1333
+
It also links to IANA registrations (where they exist) and to the most notable specification document(s) related to each media type.
1334
+
Any additional media types added to this registry as extensions or for later versions of this or other OpenAPI specifications MAY be supported by implementations of this version of the OAS.
0 commit comments