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
<pre><codeclass="lang-csharp hljs">[Obsolete("This media type is no longer needed and will be removed in a future version. Use JsonApiMediaType.AtomicOperations.ToString() instead.")]
232
232
public const string RelaxedAtomicOperationsMediaType = "application/vnd.api+json; ext=atomic"</code></pre>
<pre><codeclass="lang-csharp hljs">[Obsolete("This media type is no longer needed and will be removed in a future version. Use AtomicOperations instead.")]
294
+
public static readonly JsonApiMediaType RelaxedAtomicOperations</code></pre>
<pre><codeclass="lang-csharp hljs">[Obsolete("This media type is no longer needed and will be removed in a future version. Use AtomicOperations instead.")]
230
+
public static readonly JsonApiMediaTypeExtension RelaxedAtomicOperations</code></pre>
Copy file name to clipboardExpand all lines: ext/openapi/index.html
+8-19Lines changed: 8 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -76,28 +76,17 @@
76
76
<articledata-uid="">
77
77
<h1id="jsonapi-extension-for-openapi">JSON:API Extension for OpenAPI</h1>
78
78
79
-
<p>This extension facilitates using OpenAPI client generators targeting JSON:API documents.</p>
79
+
<p>This extension facilitates the use of OpenAPI client generators targeting JSON:API documents.</p>
80
80
<p>In JSON:API, a resource object contains the <code>type</code> member, which defines the structure of nested <ahref="https://jsonapi.org/format/#document-resource-object-attributes">attributes</a> and <ahref="https://jsonapi.org/format/#document-resource-object-relationships">relationships</a> objects.
81
81
While OpenAPI supports such constraints using <code>allOf</code> inheritance with a discriminator property for the <code>data</code> member,
82
82
it provides no way to express that the discriminator recursively applies to nested objects.</p>
83
83
<p>This extension addresses that limitation by defining additional discriminator properties to guide code generation tools.</p>
84
84
<h2id="uri">URI</h2>
85
-
<p>This extension has the URI <code>https://www.jsonapi.net/ext/openapi</code>.
86
-
Because code generators often choke on the double quotes in <code>Accept</code> and <code>Content-Type</code> HTTP header values, a relaxed form is also permitted: <code>openapi</code>.</p>
87
-
<p>For example, the following <code>Content-Type</code> header:</p>
<p>The <ahref="https://jsonapi.org/format/#media-type-parameter-rules">base specification</a><em>forbids</em> the use of multiple <code>ext</code> parameters
99
-
and <em>requires</em> that each extension name must be a URI.
100
-
This extension relaxes both constraints for practical reasons, to workaround bugs in client generators that produce broken code otherwise.</p>
85
+
<p>This extension has the URI <code>https://www.jsonapi.net/ext/openapi</code>.</p>
86
+
<divclass="CAUTION">
87
+
<h5>Caution</h5>
88
+
<p>Early preview versions of this specification also permitted using <code>openapi</code> instead of the URI to work around bugs in client generators.
89
+
This is no longer supported and is not part of the final version.</p>
101
90
</div>
102
91
<h2id="namespace">Namespace</h2>
103
92
<p>This extension uses the namespace <code>openapi</code>.</p>
<li><code>openapi:discriminator</code> - A string that MUST be identical to the <code>type</code> member in the containing <ahref="https://jsonapi.org/format/#document-resource-objects">resource object</a>.</li>
116
105
</ul>
117
-
<p>Here's how an article (i.e. a resource of type "articles") might appear in a document:</p>
106
+
<p>Here's how an article (a resource of type "articles") might appear in a document:</p>
0 commit comments