Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions _includes/media-type-entry.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# <a href=".">Media Type Registry</a>
{% assign registry = site.collections | where:"label", page.collection | first %}
# <a href=".">{{ registry.name }}</a>


## {{ page.name }}: {{ page.description }}

Expand All @@ -13,7 +15,7 @@ This page also applies to any unrecognized {{ page.default_for }} media type.
{% if page.references %}
**OAS References:**

{% for ref in page.references %}• [{{ ref.section }}](https://spec.openapis.org/oas/latest.html#{{ ref.anchor }}){% if ref.parent %} ([{{ ref.parent }}](https://spec.openapis.org/oas/latest.html#{{ ref.parentAnchor }})){% endif %}{% unless forloop.last %}<br />{% endunless %}{% endfor %}
{% for ref in page.references %}• [{{ ref.section }}](https://spec.openapis.org/oas/latest.html#{{ ref.anchor }}){% if ref.parentObject %} ([{{ ref.parentObject }}](https://spec.openapis.org/oas/latest.html#{{ ref.parentAnchor }})){% endif %}{% unless forloop.last %}<br />{% endunless %}{% endfor %}
{% endif %}

## Summary
Expand Down
8 changes: 4 additions & 4 deletions registries/_media-type/binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ default_for: binary
references:
- section: Working with Binary Data
anchor: working-with-binary-data
parent: Working with Data
parentAnchor: Working with Data
parentObject: Schema Object
parentAnchor: schema-object
- section: Binary Streams
anchor: binary-streams
parent: Media Type Object
parentObject: Media Type Object
parentAnchor: media-type-object
- section: "`Content-Transfer-Encoding` and `contentEncoding`"
anchor: content-transfer-encoding-and-contentencoding
parent: Encoding Object
parentObject: Encoding Object
parentAnchor: encoding-object
layout: default
---
Expand Down
2 changes: 1 addition & 1 deletion registries/_media-type/linksets.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ media_types:
references:
- section: Modeling Link Headers
anchor: modeling-link-headers
parent: Header Object
parentObject: Header Object
parentAnchor: header-object
layout: default
---
Expand Down
16 changes: 8 additions & 8 deletions registries/_media-type/sequential_json.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@ name: Sequential JSON
description: Multiple concatenated JSON documents suitable for streaming
media_types:
- name: application/jsonl
registered: false
iana: false
specifications:
- name: JSON Lines
url: https://jsonlines.org/
- name: application/json-seq
registered: https://www.iana.org/assignments/media-types/application/json-seq
iana: https://www.iana.org/assignments/media-types/application/json-seq
specifications:
- name: RFC7464
url: https://www.rfc-editor.org/rfc/rfc7464
- name: RFC8091
url: https://www.rfc-editor.org/rfc/rfc8091
- name: application/x-ndjson
registered: false
iana: false
specifications:
- name: Newline Delimited JSON
url: https://github.com/ndjson/ndjson-spec
references:
- section: Sequential Media Types
anchor: sequential-media-types
parent: Media Types
parentAnchor: media-types
parentObject: Media Type Object
parentAnchor: media-type-object
- section: Streaming Sequential Media Types
anchor: streaming-sequential-media-types
parent: Media Type Object
parentObject: Media Type Object
parentAnchor: media-type-object
- section: Sequential JSON
anchor: sequential-json
parent: Media Type Examples
parentAnchor: media-type-examples
parentObject: Media Type Object
parentAnchor: media-type-object
layout: default
---

Expand Down
6 changes: 3 additions & 3 deletions registries/_media-type/sequential_multipart.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ media_types:
references:
- section: Encoding By Position
anchor: encoding-by-position
parent: Encoding Usage and Restrictions
parentAnchor: encoding-usage-and-restrictions
parentObject: Media Type Object
parentAnchor: media-type-object
- section: Encoding `multipart` Media Types
anchor: encoding-multipart-media-types
parent: Encoding Object
parentObject: Encoding Object
parentAnchor: encoding-object
layout: default
---
Expand Down
16 changes: 8 additions & 8 deletions registries/_media-type/sse.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ media_types:
references:
- section: Sequential Media Types
anchor: sequential-media-types
parent: Media Types
parentAnchor: media-types
- section: Special Considerations for `text/event-stream` Content
anchor: special-considerations-for-text-event-stream-conten
parent: Media Type Object
parentObject: Media Type Object
parentAnchor: media-type-object
- section: Server-Sent Event Stream
- section: Special Considerations for Server-Sent Events
anchor: special-considerations-for-server-sent-events
parentObject: Media Type Object
parentAnchor: media-type-object
- section: Server-Sent Event Stream (Examples)
anchor: server-sent-event-streams
parent: Media Type Examples
parentAnchor: media-type-examples
parentObject: Media Type Object
parentAnchor: media-type-object
layout: default
---

Expand Down
7 changes: 1 addition & 6 deletions registries/_media-type/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ references:
anchor: header-object
- section: Encoding Object
anchor: encoding-object
- section: "Appendix D: Serializing Headers and Cookies"
anchor: appendix-d-serializing-headers-and-cookies
layout: default
---

Expand All @@ -35,10 +33,7 @@ A plain text document is modeled as a single string.
{% endcapture %}

{% capture remarks %}
In addition to normal use as HTTP message contents or `multipart` parts, `text/plain` is useful with the `content` field of the Parameter Object or Header Object to work around the automatic percent-encoding triggered by the use of the `schema` field.
In particular, cookies with multiple values are not well-served by `style: form` and are better modeled as text.

Note also that unlike JSON strings, the contents of the string representing the plain text are not quoted when serializing to a document. While a Schema Object of `{type: string, const: foo}` for JSON validates the JSON value `"foo"`, for plain text it validates `foo`, without quotes.
Note that unlike JSON strings, the contents of the string representing the plain text are not quoted when serializing to a document. While a Schema Object of `{type: string, const: foo}` for JSON validates the JSON value `"foo"`, for plain text it validates `foo`, without quotes.
{% endcapture %}

{% include media-type-entry.md summary=summary remarks=remarks %}
2 changes: 1 addition & 1 deletion registries/_media-type/xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ references:
anchor: xml-object
- section: XML Modeling
anchor: xml-modeling
parent: Schema Object
parentObject: Schema Object
parentAnchor: schema-object
layout: default
---
Expand Down
2 changes: 1 addition & 1 deletion registry/media-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parent: Registry
# Media Type Registry

This registry lists the non-JSON media types addressed by the OpenAPI Specification (OAS), and links to the appropriate OAS sections and external specifications.
See [Working With Data](https://spec.openapis.org/oas/latest.html#working-with-data) and [Parsing and Serializing](https://spec.openapis.org/oas/latest.html#parsing-and-serializing) for a discussion of serialized, schema-ready, and application forms of data, and how to convert among the forms.
See [Parsing and Serializing](https://spec.openapis.org/oas/latest.html#parsing-and-serializing) for a discussion of serialized, schema-ready, and application forms of data, and how to convert among the forms.

## Specification Versions

Expand Down