|
174 | 174 | "publishISODate": "2017-12-06T00:00:00.000Z",
|
175 | 175 | "generatedSubtitle": "06 December 2017"
|
176 | 176 | }</script>
|
177 |
| -<link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/base.css"></head><body class="h-entry toc-inline"><div class="head"> |
| 177 | +<link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/base.css"></head><body class="h-entry"><div class="head"> |
178 | 178 | <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">
|
179 | 179 | </a></p>
|
180 | 180 | <h1 id="title" class="title">OpenAPI Specification v3.0.1 </h1> <h2 id="subtitle" class="subtitle">Version 3.0.1</h2>
|
@@ -1567,7 +1567,7 @@ <h1 id="title" class="title">OpenAPI Specification v3.0.1 </h1> <h2 id="subtitle
|
1567 | 1567 | <p>Assume a parameter named <code>color</code> has one of the following values:</p>
|
1568 | 1568 | <pre class="highlight " tabindex="0"><code aria-busy="false" class="hljs css"> string -> "blue"
|
1569 | 1569 | array -> <span class="hljs-selector-attr">[<span class="hljs-string">"blue"</span>,<span class="hljs-string">"black"</span>,<span class="hljs-string">"brown"</span>]</span>
|
1570 |
| - <span class="hljs-selector-tag">object</span> -> { "R": <span class="hljs-number">100</span>, <span class="hljs-string">"G"</span>: <span class="hljs-number">200</span>, <span class="hljs-string">"B"</span>: <span class="hljs-number">150</span> } |
| 1570 | + <span class="hljs-selector-tag">object</span> -> { "<span class="hljs-attribute">R</span>": <span class="hljs-number">100</span>, <span class="hljs-string">"G"</span>: <span class="hljs-number">200</span>, <span class="hljs-string">"B"</span>: <span class="hljs-number">150</span> } |
1571 | 1571 | </code></pre>
|
1572 | 1572 | <p>The following table shows examples of rendering differences for each value.</p>
|
1573 | 1573 | <table>
|
@@ -2770,10 +2770,10 @@ <h1 id="title" class="title">OpenAPI Specification v3.0.1 </h1> <h2 id="subtitle
|
2770 | 2770 | query-reference = <span class="hljs-string">"query."</span> name
|
2771 | 2771 | path-reference = <span class="hljs-string">"path."</span> name
|
2772 | 2772 | body-reference = <span class="hljs-string">"body"</span> [<span class="hljs-string">"#"</span> fragment]
|
2773 |
| - fragment = a <span class="hljs-built_in">JSON</span> Pointer [RFC <span class="hljs-number">6901</span>](https:<span class="hljs-comment">//tools.ietf.org/html/rfc6901) </span> |
| 2773 | + fragment = a <span class="hljs-title class_">JSON</span> <span class="hljs-title class_">Pointer</span> [<span class="hljs-variable constant_">RFC</span> <span class="hljs-number">6901</span>](<span class="hljs-attr">https</span>:<span class="hljs-comment">//tools.ietf.org/html/rfc6901) </span> |
2774 | 2774 | name = *( char )
|
2775 |
| - char = <span class="hljs-keyword">as</span> per RFC [<span class="hljs-number">7159</span>](https:<span class="hljs-comment">//tools.ietf.org/html/rfc7159#section-7)</span> |
2776 |
| - token = <span class="hljs-keyword">as</span> per RFC [<span class="hljs-number">7230</span>](https:<span class="hljs-comment">//tools.ietf.org/html/rfc7230#section-3.2.6)</span> |
| 2775 | + char = <span class="hljs-keyword">as</span> per <span class="hljs-variable constant_">RFC</span> [<span class="hljs-number">7159</span>](<span class="hljs-attr">https</span>:<span class="hljs-comment">//tools.ietf.org/html/rfc7159#section-7)</span> |
| 2776 | + token = <span class="hljs-keyword">as</span> per <span class="hljs-variable constant_">RFC</span> [<span class="hljs-number">7230</span>](<span class="hljs-attr">https</span>:<span class="hljs-comment">//tools.ietf.org/html/rfc7230#section-3.2.6)</span> |
2777 | 2777 | </code></pre>
|
2778 | 2778 | <p>The <code>name</code> identifier is case-sensitive, whereas <code>token</code> is not.</p>
|
2779 | 2779 | <p>The table below provides examples of runtime expressions and examples of their use in a value:</p>
|
@@ -3375,10 +3375,10 @@ <h1 id="title" class="title">OpenAPI Specification v3.0.1 </h1> <h2 id="subtitle
|
3375 | 3375 | propertyName: pet_type
|
3376 | 3376 | </code></pre>
|
3377 | 3377 | <p>The expectation now is that a property with name <code>pet_type</code> <em><em class="rfc2119">MUST</em></em> be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload:</p>
|
3378 |
| -<pre class="highlight " tabindex="0"><code aria-busy="false" class="hljs json">{ |
3379 |
| - <span class="hljs-attr">"id"</span>: <span class="hljs-number">12345</span>, |
3380 |
| - <span class="hljs-attr">"pet_type"</span>: <span class="hljs-string">"Cat"</span> |
3381 |
| -} |
| 3378 | +<pre class="highlight " tabindex="0"><code aria-busy="false" class="hljs json"><span class="hljs-punctuation">{</span> |
| 3379 | + <span class="hljs-attr">"id"</span><span class="hljs-punctuation">:</span> <span class="hljs-number">12345</span><span class="hljs-punctuation">,</span> |
| 3380 | + <span class="hljs-attr">"pet_type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Cat"</span> |
| 3381 | +<span class="hljs-punctuation">}</span> |
3382 | 3382 | </code></pre>
|
3383 | 3383 | <p>Will indicate that the <code>Cat</code> schema be used in conjunction with this payload.</p>
|
3384 | 3384 | <p>In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional <code>mapping</code> definition <em class="rfc2119">MAY</em> be used:</p>
|
@@ -3437,16 +3437,16 @@ <h1 id="title" class="title">OpenAPI Specification v3.0.1 </h1> <h2 id="subtitle
|
3437 | 3437 | type: boolean
|
3438 | 3438 | </code></pre>
|
3439 | 3439 | <p>a payload like this:</p>
|
3440 |
| -<pre class="highlight " tabindex="0"><code aria-busy="false" class="hljs json">{ |
3441 |
| - <span class="hljs-attr">"pet_type"</span>: <span class="hljs-string">"Cat"</span>, |
3442 |
| - <span class="hljs-attr">"name"</span>: <span class="hljs-string">"misty"</span> |
3443 |
| -} |
| 3440 | +<pre class="highlight " tabindex="0"><code aria-busy="false" class="hljs json"><span class="hljs-punctuation">{</span> |
| 3441 | + <span class="hljs-attr">"pet_type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Cat"</span><span class="hljs-punctuation">,</span> |
| 3442 | + <span class="hljs-attr">"name"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"misty"</span> |
| 3443 | +<span class="hljs-punctuation">}</span> |
3444 | 3444 | </code></pre>
|
3445 | 3445 | <p>will indicate that the <code>Cat</code> schema be used. Likewise this schema:</p>
|
3446 |
| -<pre class="highlight " tabindex="0"><code aria-busy="false" class="hljs json">{ |
3447 |
| - <span class="hljs-attr">"pet_type"</span>: <span class="hljs-string">"cachorro"</span>, |
3448 |
| - <span class="hljs-attr">"bark"</span>: <span class="hljs-string">"soft"</span> |
3449 |
| -} |
| 3446 | +<pre class="highlight " tabindex="0"><code aria-busy="false" class="hljs json"><span class="hljs-punctuation">{</span> |
| 3447 | + <span class="hljs-attr">"pet_type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"cachorro"</span><span class="hljs-punctuation">,</span> |
| 3448 | + <span class="hljs-attr">"bark"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"soft"</span> |
| 3449 | +<span class="hljs-punctuation">}</span> |
3450 | 3450 | </code></pre>
|
3451 | 3451 | <p>will map to <code>Dog</code> because of the definition in the <code>mappings</code> element.</p>
|
3452 | 3452 | </section></section><section id="xml-object"><div class="header-wrapper"><h4 id="x4-7-26-xml-object"><bdi class="secno">4.7.26 </bdi>XML Object</h4><a class="self-link" href="#xml-object" aria-label="Permalink for Section 4.7.26"></a></div>
|
|
0 commit comments