Skip to content

Commit bae48fd

Browse files
committed
Update Media Type Regisry for reorg, review feedback
This updates for various moved and re-titled sections to which we were linking. It also replaces the immediate-parent link with a link to the Object section in which the subsection appears, since after the section reorg almost everything is under an Object. This is more robust to minor changes in subsection organization, but also helps users find the relevant part of the OAS.
1 parent 36fea1a commit bae48fd

File tree

9 files changed

+31
-34
lines changed

9 files changed

+31
-34
lines changed

_includes/media-type-entry.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# <a href=".">Media Type Registry</a>
1+
{% assign registry = site.collections | where:"label", page.collection | first %}
2+
# <a href=".">{{ registry.name }}</a>
3+
24

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

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

16-
{% 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 %}
18+
{% 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 %}
1719
{% endif %}
1820

1921
## Summary

registries/_media-type/binary.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ default_for: binary
3535
references:
3636
- section: Working with Binary Data
3737
anchor: working-with-binary-data
38-
parent: Working with Data
39-
parentAnchor: Working with Data
38+
parentObject: Schema Object
39+
parentAnchor: schema-object
4040
- section: Binary Streams
4141
anchor: binary-streams
42-
parent: Media Type Object
42+
parentObject: Media Type Object
4343
parentAnchor: media-type-object
4444
- section: "`Content-Transfer-Encoding` and `contentEncoding`"
4545
anchor: content-transfer-encoding-and-contentencoding
46-
parent: Encoding Object
46+
parentObject: Encoding Object
4747
parentAnchor: encoding-object
4848
layout: default
4949
---

registries/_media-type/linksets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ media_types:
1818
references:
1919
- section: Modeling Link Headers
2020
anchor: modeling-link-headers
21-
parent: Header Object
21+
parentObject: Header Object
2222
parentAnchor: header-object
2323
layout: default
2424
---

registries/_media-type/sequential_json.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,35 @@ name: Sequential JSON
44
description: Multiple concatenated JSON documents suitable for streaming
55
media_types:
66
- name: application/jsonl
7-
registered: false
7+
iana: false
88
specifications:
99
- name: JSON Lines
1010
url: https://jsonlines.org/
1111
- name: application/json-seq
12-
registered: https://www.iana.org/assignments/media-types/application/json-seq
12+
iana: https://www.iana.org/assignments/media-types/application/json-seq
1313
specifications:
1414
- name: RFC7464
1515
url: https://www.rfc-editor.org/rfc/rfc7464
1616
- name: RFC8091
1717
url: https://www.rfc-editor.org/rfc/rfc8091
1818
- name: application/x-ndjson
19-
registered: false
19+
iana: false
2020
specifications:
2121
- name: Newline Delimited JSON
2222
url: https://github.com/ndjson/ndjson-spec
2323
references:
2424
- section: Sequential Media Types
2525
anchor: sequential-media-types
26-
parent: Media Types
27-
parentAnchor: media-types
26+
parentObject: Media Type Object
27+
parentAnchor: media-type-object
2828
- section: Streaming Sequential Media Types
2929
anchor: streaming-sequential-media-types
30-
parent: Media Type Object
30+
parentObject: Media Type Object
3131
parentAnchor: media-type-object
3232
- section: Sequential JSON
3333
anchor: sequential-json
34-
parent: Media Type Examples
35-
parentAnchor: media-type-examples
34+
parentObject: Media Type Object
35+
parentAnchor: media-type-object
3636
layout: default
3737
---
3838

registries/_media-type/sequential_multipart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ media_types:
3939
references:
4040
- section: Encoding By Position
4141
anchor: encoding-by-position
42-
parent: Encoding Usage and Restrictions
43-
parentAnchor: encoding-usage-and-restrictions
42+
parentObject: Media Type Object
43+
parentAnchor: media-type-object
4444
- section: Encoding `multipart` Media Types
4545
anchor: encoding-multipart-media-types
46-
parent: Encoding Object
46+
parentObject: Encoding Object
4747
parentAnchor: encoding-object
4848
layout: default
4949
---

registries/_media-type/sse.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ media_types:
1313
references:
1414
- section: Sequential Media Types
1515
anchor: sequential-media-types
16-
parent: Media Types
17-
parentAnchor: media-types
18-
- section: Special Considerations for `text/event-stream` Content
19-
anchor: special-considerations-for-text-event-stream-conten
20-
parent: Media Type Object
16+
parentObject: Media Type Object
2117
parentAnchor: media-type-object
22-
- section: Server-Sent Event Stream
18+
- section: Special Considerations for Server-Sent Events
19+
anchor: special-considerations-for-server-sent-events
20+
parentObject: Media Type Object
21+
parentAnchor: media-type-object
22+
- section: Server-Sent Event Stream (Examples)
2323
anchor: server-sent-event-streams
24-
parent: Media Type Examples
25-
parentAnchor: media-type-examples
24+
parentObject: Media Type Object
25+
parentAnchor: media-type-object
2626
layout: default
2727
---
2828

registries/_media-type/text.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ references:
2525
anchor: header-object
2626
- section: Encoding Object
2727
anchor: encoding-object
28-
- section: "Appendix D: Serializing Headers and Cookies"
29-
anchor: appendix-d-serializing-headers-and-cookies
3028
layout: default
3129
---
3230

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

3735
{% capture remarks %}
38-
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.
39-
In particular, cookies with multiple values are not well-served by `style: form` and are better modeled as text.
40-
41-
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.
36+
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.
4237
{% endcapture %}
4338

4439
{% include media-type-entry.md summary=summary remarks=remarks %}

registries/_media-type/xml.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ references:
2121
anchor: xml-object
2222
- section: XML Modeling
2323
anchor: xml-modeling
24-
parent: Schema Object
24+
parentObject: Schema Object
2525
parentAnchor: schema-object
2626
layout: default
2727
---

registry/media-type.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ parent: Registry
88
# Media Type Registry
99

1010
This registry lists the non-JSON media types addressed by the OpenAPI Specification (OAS), and links to the appropriate OAS sections and external specifications.
11-
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.
11+
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.
1212

1313
## Specification Versions
1414

0 commit comments

Comments
 (0)