v4.0.0-alpha5
Pre-release
Pre-release
·
1287 commits
to master
since this release
New features
- Configurable default attribute capabilities in options.
- Resources are found from DbContext.Model (no more need to expose them via
DbSet<>
properties). - Inject services in entities (see limitations at https://docs.microsoft.com/en-us/ef/core/modeling/constructors#injecting-services).
- Return updated resource from PATCH only if the update changes the resource in ways other than those specified by the request.
- SourceLink: enables to step into the NuGet library by downloading sources from GitHub.
- Improved support for custom logging and error handling.
- Eager loading: unconditionally include unexposed related entities.
- Overloads on app.UseJsonApi() to influence middleware order.
- New options to constrain maximum page size and number.
Breaking changes
- Paging is now enabled by default. Set options.DefaultPageSize = 0 in Startup for the old behavior.
- Query string parameters omitNull/omitDefault have been renamed to nulls/defaults and the meaning of their true/false values is inverted.
- Casing convention is set in options using Newtonsoft.Json.Serialization.NamingStrategy.
- Some types were renamed, had signature changes and/or moved into different namespaces.
- ILoggerFactory is no longer optional. Use
NullLoggerFactory.Instance
from tests. - Replaced set of optional booleans on Attr with flags enumeration.
- Content negotiation returns 406 to browsers that send incompatible Accept headers.
Closed issues
- Default attribute capabilities (#707)
- Fixed: Re-fetch entity after CREATE without relationships (#724)
- Fixes in content negotiation, better separation between json:api and asp.net controllers (#725)
- Bugfixes on combining sparse fieldsets with includes (#708)
- Fail on mismatch between ID in URL and patch body (#702)
- Use EF Core entity model when scanning for resources (#550)
- Added support for injecting DbContext in resources (#657)
- Fixed NullReferenceException on parallel requests (#727)
- Use NamingStrategy from Newtonsoft.Json to configure casing convention (#718)
- Fixed: custom serializer settings are ignored (#687)
- Fixed: crash on invalid relationship name (#713)
- Replaced omitNull/omitDefault query string parameters with nulls/defaults (#720)
- Change tracking for patch updates, to improve json:api spec compliance (#577)
- Fixed: run tests in parallel (#485)
- Restored SourceLink support (#692)
- Fixed: null data returned when resource not found (#631)
- Fixed: crash on invalid relationship name (#709)
- Improved and pluggable error handling and logging (#714)
- Improved request validation (#655)
- Eager loading: unconditionally include unexposed related entities (#652)
- Include query string parameters in top-level self link and paging links (#276)
- Fixed: Filtering on special chars sends back an un-escaped special character in the links urls (#408)
- Updated to .NET Core 3.1 (#711)
- Fixed inefficient cache usage (#450)
- Cleanup of public overloads for
ILoggerFactory
(#674) - Added MaximumPageSize and MaximumPageNumber to IJsonApiOptions (#673)
- Allow user flexibility in authentication/authorization middleware options (#656)
- Fixed invalid top-level self link (#646)
- Expose DefaultPageSize/RequestedPageSize to give the user more control over pagination (#641)
- Support query param operations on nested resources (#634)
- Fixed: first/prev links not rendered on second page (#622)