v4.0.0-rc
Pre-release
Pre-release
·
1166 commits
to master
since this release
New features
- When a request is canceled, we propagate that down to EF Core (#879)
- New extension method
AddResourceRepository()
onIServiceCollection
, similar toAddResourceService()
(#875) - Added POST/DELETE endpoints for to-many relationships (#875)
- Detection of side-effects during PATCH request now also runs on POST (#875)
- Improved error messages for malformed request bodies (#875)
- Resource-specific meta (#845)
- Best-effort paging (when total count is unknown) (#840)
- Generic resource definitions (#832)
Breaking changes
- We used to return
200 OK
with{ data: null }
for PATCH requests without side effects, where we now return204 No Content
without a body - Changed how custom meta is registered (see #737 (comment) for details)
- Base class
ResourceDefinition
was renamed toJsonApiResourceDefinition
and the meaning ofIResourceDefinition
was changed. IsRequiredAttribute
was added in v4-beta1 to enable ASP.NET ModelState validation of partial PATCH requests. This attribute is no longer needed and has been removed. Use the built-inRequiredAttribute
instead.- Breakup of
AttrCapabilities.AllowChange
(affected both POST and PATCH) intoAttrCapabilities.AllowCreate
(only POST) andAttrCapabilities.AllowChange
(only PATCH) - When page size and/or number match their default value, we no longer include them in paging links.
Closed issues
- Restructured eager loading tests and fixed two bugs (#882)
- Fixed: Paging links should not be rendered in POST response (#880)
- Add cancellation support (#878)
- Support POST requests to a to-many relationship link (#353)
- Support DELETE requests to a to-many relationship link (#850)
- Patching resource relationship on primary endpoint with non-existing resource fails (#852)
- Implicit removes and FK constraint violations on PATCH relationship endpoint (#853)
- Response when updating relationship of resource not conform spec (#578)
- PATCH Successfully but Return Data is Null (#870)
- Support for Self-Referencing ManyToMany Relationships (#790)
- Potential Bug Serializing Id's? (#363)
- Allow classes which inherit from DefaultResourceRepository more control of SaveChangesAsync (#690)
- Many-to-many includes no longer work on v4.0.0-beta1 (#868)
- Optimized/fixed TypeLocator.GetGenericInterfaceImplementation (#857)
- How to deserialize a class with a relationship that is a derived class? (#696)
- IHasMeta does not work (#737)
- Injecting multiple DbContexts does not work (#739)
- Feature: provide best-effort paging links when total count is unknown (#791)
- Bug: custom query string parameters do not respect casing convention (#719)
- Generic resource definitions (#806)
- Improved ModelState validation (#834)
- Fixed: Relations being validated on POST (#671)
- Add AttrCapabilities.AllowCreate (#801)
- Do not render defaults in paging links (#817)
- Fixed: Invalid parsing of legacy query strings (#815)
- Fixed: Type match incorrect for PATCH requests (#789)