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
<h4id="where-can-i-find-documentation-and-examples">Where can I find documentation and examples?</h4>
87
87
<p>While the <ahref="../usage/resources/index.html">documentation</a> covers basic features and a few runnable example projects are available <ahref="https://github.com/json-api-dotnet/JsonApiDotNetCore/tree/master/src/Examples">here</a>,
88
88
many more advanced use cases are available as integration tests <ahref="https://github.com/json-api-dotnet/JsonApiDotNetCore/tree/master/test/JsonApiDotNetCoreTests/IntegrationTests">here</a>, so be sure to check them out!</p>
89
-
<h4id="why-cant-i-use-openapi">Why can't I use OpenAPI?</h4>
90
-
<p>Due to the mismatch between the JSON:API structure and the shape of ASP.NET controller methods, this does not work out of the box.
91
-
This is high on our agenda and we're steadily making progress, but it's quite complex and far from complete.
92
-
See <ahref="https://github.com/json-api-dotnet/JsonApiDotNetCore/issues/1046">here</a> for the current status, which includes instructions on trying out the latest build.</p>
89
+
<h4id="why-dont-you-use-the-built-in-openapi-support-in-aspnet-core">Why don't you use the built-in OpenAPI support in ASP.NET Core?</h4>
90
+
<p>The structure of JSON:API request and response bodies differs significantly from the signature of JsonApiDotNetCore controllers.
91
+
JsonApiDotNetCore provides OpenAPI support using <ahref="https://github.com/domaindrivendev/Swashbuckle.AspNetCore">Swashbuckle</a>, a mature and feature-rich library that is highly extensible.
92
+
The <ahref="https://learn.microsoft.com/en-us/aspnet/core/fundamentals/openapi/overview">OpenAPI support in ASP.NET Core</a> is still very young
93
+
and doesn't provide the level of extensibility needed for JsonApiDotNetCore.</p>
93
94
<h4id="whats-available-to-implement-a-jsonapi-client">What's available to implement a JSON:API client?</h4>
94
95
<p>It depends on the programming language used. There's an overwhelming list of client libraries at <ahref="https://jsonapi.org/implementations/#client-libraries">https://jsonapi.org/implementations/#client-libraries</a>.</p>
95
96
<p>The JSON object model inside JsonApiDotNetCore is tweaked for server-side handling (be tolerant at inputs and strict at outputs).
<p>If you need such side effects, it's easiest to inject your <code>DbContext</code> in the controller, directly apply the changes on it and save.
208
208
A better way is to inject your <code>DbContext</code> in a <ahref="extensibility/resource-definitions.html">Resource Definition</a> and apply the changes there.</p>
<p>While we'd love to support such <ahref="https://learn.microsoft.com/ef/core/saving/concurrency?tabs=data-annotations">tokens for optimistic concurrency</a>,
210
+
<p>While we'd love to support such <ahref="https://learn.microsoft.com/ef/core/saving/concurrency">tokens for optimistic concurrency</a>,
211
211
it turns out that the implementation is far from trivial. We've come a long way, but aren't sure how it should work when relationship endpoints and atomic operations are involved.
212
212
If you're interested, we welcome your feedback at <ahref="https://github.com/json-api-dotnet/JsonApiDotNetCore/pull/1119">https://github.com/json-api-dotnet/JsonApiDotNetCore/pull/1119</a>.</p>
0 commit comments