Skip to content

v5.7.0

Latest
Compare
Choose a tag to compare
@bkoelman bkoelman released this 21 Apr 14:15
· 5 commits to master since this release
a7b8a3e

New features and enhancements

After years of work, we're finally ready to ship the first preview release of OpenAPI support for JSON:API!

Now you can generate a documentation website from your models. And generate typed client libraries using NSwag and Microsoft Kiota. See the documentation to get started. In this preview, all JsonApiDotNetCore features work with OpenAPI, except for the following:

  • Custom controllers and custom action methods are ignored.
  • Controllers that use ID obfuscation don't work.
  • The usage of [DisableQueryString] on controllers is ignored.

As part of the OpenAPI work, basic support for third-party JSON:API extensions was added. We also introduced our own extension to enhance the OpenAPI experience.

Next to the existing IAtomicOperationFilter, IJsonApiEndpointFilter was added, which enables to remove controller action methods at runtime.

Breaking changes

  • This version requires .NET 8 or higher; official support has ended for .NET 6.
  • The relaxed form "atomic-operations" for the Atomic Operations JSON:API extension was renamed to "atomic" for consistency.

Bugfixes

  • A proper error is now returned when the ID in a request body is an empty string or whitespace.
  • Resource inheritance: Atomic operations enabled on a base type are implicitly enabled on all derived types.
  • Resource inheritance: Pagination on inluded derived types wasn't being applied.
  • Resource inheritance: A post-resource request with ?include used to fail.
  • The calculation of the total resource count on a secondary/relationship endpoint could crash when resource definitions are involved.

Merged PRs

  • Fixed: Produce error on invalid ID in request body by @bkoelman in #1593
  • Basic support for third-party JSON:API extensions by @bkoelman in #1623
  • Fix resource inheritance with atomic operations by @bkoelman in #1628
  • Refactorings for JSON:API extensions to unblock OpenAPI support by @bkoelman in #1629
  • Resource inheritance fixes by @bkoelman in #1641
  • Content negotiation: Enable override of chosen media type when Accept header is missing by @bkoelman in #1644
  • IJsonApiEndpointFilter: remove controller action methods at runtime by @bkoelman in #1646
  • Drop support for .NET 6, test against .NET 9 by @bkoelman in #1656
  • Breaking: rename relaxed form of Atomic Operations extension by @bkoelman in #1664
  • Add note about shared models by @bkoelman in #1679
  • Refactor internal-only JSON:API extensions support by @bkoelman in #1687
  • Marshall JsonApiException thrown from JsonConverter by @bkoelman in #1690
  • Fix invalid expression for total count on inverse relationship filter from resource definition by @bkoelman in #1711
  • Merge experimental OpenAPI support into master by @bkoelman in #1716

Full Changelog: v5.6.0...v5.7.0