Releases: json-api-dotnet/JsonApiDotNetCore
v5.0.2
v5.0.1
v5.0.0
New features and enhancements
In addition to what's listed at v5.0.0-pre1, this release adds full support for resource inheritance. In short, this means you can define (abstract) base resource classes and perform various operations against their endpoints. Sparse fieldsets, includes, sorting and filtering were adapted to understand them, among which is the new isType()
filter function. When using post/patch/delete in a type hierarchy, extra database queries are executed to provide the best possible experience for writing custom business logic in resource definitions. For details, see documentation at https://www.jsonapi.net/usage/resources/inheritance.html and the PR description. Additionally, this release improves serialization performance and makes resource graph lookups faster.
Note: See our updated documentation, as well as updated examples in our codebase.
Upgrading from v4 instead? Be sure to check out our migration guide.
Breaking changes
Aside from the breaking changes listed at v5.0.0-pre1, we had to slightly adapt some signatures in resource service/repository/definition interfaces to support resource inheritance. And we fixed the bug where we forgot to call into IResourceDefinition.OnPrepareWrite
from a delete to-many relationship request.
Merged PRs
- Fixed: do not auto-register abstract base classes and interfaces by @bart-degreed in b17f8f5
- Added example that uses a different database per tenant by @bart-degreed in #1135
- Added workaround for bug in EF Core 6.0.2 by @bart-degreed in #1139
- Bugfix: hide Self link in included resources for missing controller by @bart-degreed in #1141
- Replaced references to Error in docs, which was renamed to ErrorObject by @bart-degreed in #1143
Full Changelog: v4.2.0...v5.0.0
v5.0.0-pre1
New features and enhancements
First of all, this release is a refresher to embrace the latest technologies. We've updated to ASP.NET 6 with EF Core 6 and adopted nullable reference types. We've switched to System.Text.Json. And we're now leveraging EF Core's built-in many-to-many relationships. Lastly, ASP.NET controllers can be auto-generated using source generators. Aside from these changes, pagination links at secondary endpoints got better. We've added various performance optimizations. And improved error responses on invalid input. And quite some bug fixes too!
Note: See our updated documentation, as well as updated examples in our codebase.
Upgrading from v4 instead? Be sure to check out our migration guide.
Breaking changes
- When using
[Resource]
, this now automatically generates a controller class. Replace with[Resource(GenerateControllerEndpoints = JsonApiEndpoints.None)]
to turn that off. - The experimental Resource Hooks feature has finally been removed.
- The switch to System.Text.Json introduced breaks as well, see here and here.
- Short-hand interfaces were removed too.
- Remaining breaks are listed here, here and here.
Merged PRs
- Removed Resource Hooks by @bart-degreed in #1036
- Updated dependencies to .NET 5 with EF Core 5 by @bart-degreed in #1022
- Updated roadmap for v5.x by @bart-degreed in #1034
- Native many to many by @bart-degreed in #1037
- Refactorings by @bart-degreed in #1038
- Instrumented code to measure execution time of the various layers by @bart-degreed in #1023
- Optimized RemoveFromToManyRelationship endpoint by @bart-degreed in #1039
- Feature/allow leading space by @sgryphon in #1041
- Rename JsonApiDotNetCoreExampleTests -> JsonApiDotNetCoreTests by @maurei in #1069
- Removing dependency on JsonApiDotNetCoreExample project in test projects by @maurei in #1068
- Updated PostgreSQL to v13.4 by @bart-degreed in #1072
- Removed temporary workaround to start postgres service in cibuild by @bart-degreed in #1083
- Restored docs for HasManyThrough, which was removed in #1037 by @bart-degreed in #1084
- Use System.Text.Json by @bart-degreed in #1075
- Corrected example in docs by @bart-degreed in #1087
- Redesign conversion between JSON objects and ASP.NET models by @bart-degreed in #1091
- Remove short-hand interfaces for TId is int by @bart-degreed in #1093
- Nullable reference types by @bart-degreed in #1095
- Secondary paging by @bart-degreed in #1100
- Resource Graph validations by @bart-degreed in #1101
- Fix code cleanup by @bart-degreed in #1107
- Various fixes and improvements by @bart-degreed in #1114
- Auto-generated JSON:API controllers using source generators by @bart-degreed in #1117
- Update to .NET 6 with EF Core 6 by @bart-degreed in #1122
- Added tests for blobs by @bart-degreed in #1125
- Move resource annotations into separate package by @bart-degreed in #1127
New Contributors
Full Changelog: v4.2.0...v5.0.0-pre1
v4.2.0
New features
See the notes for v4.2.0-beta. The most prominent one: new extensibility points for business logic, documented here and here.
This replaces the experimental Resource Hooks, which we intend to remove in the next major version.
Breaking changes
We had to take a few binary-breaking changes in obscure places. Just recompiling your project should be sufficient in nearly all cases. See our versioning policy.
Closed issues
- Consecutive exception hides original error (#1017)
- Bugs around empty included[] in response (#991)
- Adding extra includes from IResourceDefinition.OnApplyIncludes() does not work (#989)
- Sending an empty fields parameter results in error (#996)
- Makes the hashing algorithm used for ETags pluggable (#1007)
v4.2.0-beta
We're releasing a beta because we want to verify we've done the new business rules extensibility points on IResourceDefinition
right (see here and here). Please give it a try and let us know by creating an issue, so we can adapt. Once released, we cannot take breaking changes anymore.
New features
- Rewrite of
LinkBuilder
to use ASP.NET Core routing to render links (#987) - New business logic extensibility points on
IResourceDefinition
(#977) - New option to emit JSON:API version in response documents (#992)
- ETag support to save network bandwidth (#933)
- Allow condition on has() filter function (#985)
Breaking changes
We had to take a few binary breaking changes in obscure places. Just recompiling your project should be sufficient in nearly all cases.
Closed issues
v4.1.1
New features
- Support for bulk/batch requests (json:api atomic:operations) (#930)
Breaking changes
We had to take a few binary breaking changes in obscure places. Just recompiling your project should be sufficient in nearly all cases.
Closed issues
v4.1.0
NuGet issues prevented us from publishing this version, so we created v4.1.1 instead.