Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions oas/v3.0.4.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@
"generatedSubtitle": "24 October 2024"
}</script>
<link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/base.css">
<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="https://www.w3.org/StyleSheets/TR/2021/dark.css"></head>
<body class="h-entry"><div class="head">
<link rel="stylesheet" media="" href="https://www.w3.org/StyleSheets/TR/2021/dark.css" disabled=""></head>
<body class="h-entry toc-inline"><div class="head">
<p class="logos"><a class="logo" href="https://openapis.org/"><img crossorigin="" alt="OpenAPI Initiative" height="48" src="https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/master/graphics/bitmap/OpenAPI_Logo_Pantone.png">
</a></p>
<h1 id="title" class="title">OpenAPI Specification v3.0.4 </h1> <h2 id="subtitle" class="subtitle">Version 3.0.4</h2>
Expand Down
4 changes: 2 additions & 2 deletions oas/v3.1.2.html
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@
"generatedSubtitle": "19 September 2025"
}</script>
<link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/base.css">
<link rel="stylesheet" media="" href="https://www.w3.org/StyleSheets/TR/2021/dark.css" disabled=""></head>
<body class="h-entry toc-inline"><div class="head">
<link rel="stylesheet" media="(prefers-color-scheme: dark)" href="https://www.w3.org/StyleSheets/TR/2021/dark.css"></head>
<body class="h-entry"><div class="head">
<p class="logos"><a class="logo" href="https://openapis.org/"><img crossorigin="" alt="OpenAPI Initiative" height="48" src="https://raw.githubusercontent.com/OAI/OpenAPI-Style-Guide/master/graphics/bitmap/OpenAPI_Logo_Pantone.png">
</a></p>
<h1 id="title" class="title">OpenAPI Specification v3.1.2 </h1> <h2 id="subtitle" class="subtitle">Version 3.1.2</h2>
Expand Down
12 changes: 6 additions & 6 deletions oas/v3.2.0.html
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ <h1 id="title" class="title">OpenAPI Specification v3.2.0 </h1> <h2 id="subtitle
<tr>
<td><span id="oas-self"></span>$self</td>
<td style="text-align:center"><code>string</code></td>
<td>This string <em class="rfc2119">MUST</em> be in the form of a URI reference as defined by [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc3986" title="Uniform Resource Identifier (URI): Generic Syntax">RFC3986</a></cite>] <a href="https://tools.ietf.org/html/rfc3986#section-4.1">Section 4.1</a>. The <code>$self</code> field provides the self-assigned URI of this document, which also serves as its base URI in accordance with [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc3986" title="Uniform Resource Identifier (URI): Generic Syntax">RFC3986</a></cite>] <a href="https://tools.ietf.org/html/rfc3986#section-5.1.1">Section 5.1.1</a>. Implementations <em class="rfc2119">MUST</em> support identifying the targets of <a href="#relative-references-in-api-description-uris">API description URIs</a> using the URI defined by this field when it is present. See <a href="#establishing-the-base-uri">Establishing the Base URI</a> for the base URI behavior when <code>$self</code> is absent or relative, and see <a href="(#appendix-f-examples-of-base-uri-determination-and-reference-resolution)">Appendix F</a> for examples of using <code>$self</code> to resolve references.</td>
<td>This string <em class="rfc2119">MUST</em> be in the form of a URI reference as defined by [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc3986" title="Uniform Resource Identifier (URI): Generic Syntax">RFC3986</a></cite>] <a href="https://tools.ietf.org/html/rfc3986#section-4.1">Section 4.1</a>. The <code>$self</code> field provides the self-assigned URI of this document, which also serves as its base URI in accordance with [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc3986" title="Uniform Resource Identifier (URI): Generic Syntax">RFC3986</a></cite>] <a href="https://tools.ietf.org/html/rfc3986#section-5.1.1">Section 5.1.1</a>. Implementations <em class="rfc2119">MUST</em> support identifying the targets of <a href="#relative-references-in-api-description-uris">API description URIs</a> using the URI defined by this field when it is present. See <a href="#establishing-the-base-uri">Establishing the Base URI</a> for the base URI behavior when <code>$self</code> is absent or relative, and see <a href="#appendix-f-examples-of-base-uri-determination-and-reference-resolution">Appendix F</a> for examples of using <code>$self</code> to resolve references.</td>
</tr>
<tr>
<td><span id="oas-info"></span>info</td>
Expand Down Expand Up @@ -1804,7 +1804,7 @@ <h1 id="title" class="title">OpenAPI Specification v3.2.0 </h1> <h2 id="subtitle
<span class="hljs-attr">serializedValue:</span> <span class="hljs-string">coordinates=%7B%22lat%22%3A10%2C%22long%22%3A60%7D</span>
</code></pre>
<p>A querystring parameter using regular form encoding, but managed with a Media Type Object.
This shows spaces being handled per the <code>application/x-www-form-urlencoded</code> media type rules (encode as <code>+</code>) rather than the RFC6570 process (encode as <code>%20</code>); see <a href="appendix-e-percent-encoding-and-form-media-types">Appendix E</a> for further guidance on this distinction.
This shows spaces being handled per the <code>application/x-www-form-urlencoded</code> media type rules (encode as <code>+</code>) rather than the RFC6570 process (encode as <code>%20</code>); see <a href="#appendix-e-percent-encoding-and-form-media-types">Appendix E</a> for further guidance on this distinction.
Examples are shown at both the media type and parameter level to emphasize that, since <code>application/x-www-form-urlencoded</code> is suitable for use in query strings by definition, no further encoding or escaping is applied to the serialized media type value:</p>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-attr">in:</span> <span class="hljs-string">querystring</span>
<span class="hljs-attr">content:</span>
Expand Down Expand Up @@ -2333,7 +2333,7 @@ <h1 id="title" class="title">OpenAPI Specification v3.2.0 </h1> <h2 id="subtitle
</code></pre>
<p>To upload multiple files, a <code>multipart</code> media type <em class="rfc2119">MUST</em> be used as shown under <a href="#example-multipart-form-with-multiple-files">Example: Multipart Form with Multiple Files</a>.</p>
</section></section><section id="encoding-object"><div class="header-wrapper"><h3 id="x4-15-encoding-object"><bdi class="secno">4.15 </bdi>Encoding Object</h3><a class="self-link" href="#encoding-object" aria-label="Permalink for Section 4.15"></a></div>
<p>A single encoding definition applied to a single value, with the mapping of Encoding Objects to values determined by the <a href="@media-type-object">Media Type Object</a> as described under <a href="#encoding-usage-and-restrictions">Encoding Usage and Restrictions</a>.</p>
<p>A single encoding definition applied to a single value, with the mapping of Encoding Objects to values determined by the <a href="#media-type-object">Media Type Object</a> as described under <a href="#encoding-usage-and-restrictions">Encoding Usage and Restrictions</a>.</p>
<p>See <a href="#appendix-b-data-type-conversion">Appendix B</a> for a discussion of converting values of various types to string representations.</p>
<p>See <a href="#appendix-e-percent-encoding-and-form-media-types">Appendix E</a> for a detailed examination of percent-encoding concerns for form media types.</p>
<section id="fixed-fields-12"><div class="header-wrapper"><h4 id="x4-15-1-fixed-fields"><bdi class="secno">4.15.1 </bdi>Fixed Fields</h4><a class="self-link" href="#fixed-fields-12" aria-label="Permalink for Section 4.15.1"></a></div>
Expand Down Expand Up @@ -2643,7 +2643,7 @@ <h1 id="title" class="title">OpenAPI Specification v3.2.0 </h1> <h2 id="subtitle
</section><section id="example-ordered-multipart-with-required-header"><div class="header-wrapper"><h5 id="x4-15-4-7-example-ordered-multipart-with-required-header"><bdi class="secno">4.15.4.7 </bdi>Example: Ordered Multipart With Required Header</h5><a class="self-link" href="#example-ordered-multipart-with-required-header" aria-label="Permalink for Section 4.15.4.7"></a></div>
<p>As described in [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc2557" title="MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)">RFC2557</a></cite>], a set of resources making up a web page can be sent in a <code>multipart/related</code> payload, preserving links from the <code>text/html</code> document to subsidiary resources such as scripts, style sheets, and images by defining a <code>Content-Location</code> header for each page.
The first part is used as the root resource (unless using <code>Content-ID</code>, which RFC2557 advises against and is forbidden in this example), so we use <code>prefixItems</code> and <code>prefixEncoding</code> to define that it must be an HTML resource, and then allow any of several different types of resources in any order to follow.</p>
<p>The <code>Content-Location</code> header is defined using <code>content: {text/plain: {...}}</code> to avoid percent-encoding its URI value; see <a href="appendix-d-serializing-headers-and-cookies">Appendix D</a> for further details.</p>
<p>The <code>Content-Location</code> header is defined using <code>content: {text/plain: {...}}</code> to avoid percent-encoding its URI value; see <a href="#appendix-d-serializing-headers-and-cookies">Appendix D</a> for further details.</p>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-attr">components:</span>
<span class="hljs-attr">headers:</span>
<span class="hljs-attr">RFC2557NoContentId:</span>
Expand Down Expand Up @@ -2694,7 +2694,7 @@ <h1 id="title" class="title">OpenAPI Specification v3.2.0 </h1> <h2 id="subtitle
</code></pre>
</section><section id="example-streaming-byte-ranges"><div class="header-wrapper"><h5 id="x4-15-4-9-example-streaming-byte-ranges"><bdi class="secno">4.15.4.9 </bdi>Example: Streaming Byte Ranges</h5><a class="self-link" href="#example-streaming-byte-ranges" aria-label="Permalink for Section 4.15.4.9"></a></div>
<p>For <code>multipart/byteranges</code> [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc9110" title="HTTP Semantics">RFC9110</a></cite>] <a href="https://tools.ietf.org/html/rfc9110#section-14.6">Section 14.6</a>, a <code>Content-Range</code> header is required:</p>
<p>See <a href="appendix-d-serializing-headers-and-cookies">Appendix D</a> for an explanation of why <code>content: {text/plain: {...}}</code> is used to describe the header value.</p>
<p>See <a href="#appendix-d-serializing-headers-and-cookies">Appendix D</a> for an explanation of why <code>content: {text/plain: {...}}</code> is used to describe the header value.</p>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-attr">multipart/byteranges:</span>
<span class="hljs-attr">itemSchema:</span>
<span class="hljs-string">$comment:</span> <span class="hljs-string">A</span> <span class="hljs-string">single</span> <span class="hljs-string">range</span> <span class="hljs-string">of</span> <span class="hljs-string">bytes</span> <span class="hljs-string">from</span> <span class="hljs-string">a</span> <span class="hljs-string">video</span>
Expand Down Expand Up @@ -3538,7 +3538,7 @@ <h1 id="title" class="title">OpenAPI Specification v3.2.0 </h1> <h2 id="subtitle
<p>As also noted in the RFC, <code>Set-Cookie</code> is an exception as it allows unquoted, non-escaped commas in its values, and can only use the one-value-per-line form.
For HTTP messages, this is purely a serialization concern, and no more of a problem than a message that uses the multi-line form of any other header.</p>
<p>However, because examples and values modeled with <code>content</code> do not incorporate the header name, for these fields <code>Set-Cookie</code> <em class="rfc2119">MUST</em> be handled by placing each value on a separate line, without the header name or the <code>:</code> delimiter.</p>
<p>Note also that any URI percent-encoding, base64 encoding, or other escaping <em class="rfc2119">MUST</em> be performed prior to supplying the data to OAS tooling; see <a href="appendix-d-serializing-headers-and-cookies">Appendix D</a> for details.</p>
<p>Note also that any URI percent-encoding, base64 encoding, or other escaping <em class="rfc2119">MUST</em> be performed prior to supplying the data to OAS tooling; see <a href="#appendix-d-serializing-headers-and-cookies">Appendix D</a> for details.</p>
<p>The following example shows two different ways to describe <code>Set-Cookie</code> headers that require cookies named <code>"lang"</code> and <code>"foo"</code>, as well as a <code>"urlSafeData"</code> cookie that is expected to be percent-encoded. The first uses <code>content</code> in order to show exactly how such examples are formatted, but also notes the limitations of schema constraints with multi-line text. The second shows the use of <code>style: "simple"</code>, which produces the same serialized example text (with each line corresponding to one <code>Set-Cookie:</code> line in the HTTP response), but allows schema constraints on each cookie; note that the percent-encoding is already applied in the <code>dataValue</code> field of the example:</p>
<pre class="nohighlight" tabindex="0"><code><span class="hljs-attr">components:</span>
<span class="hljs-attr">headers:</span>
Expand Down