New features and enhancements
This release adds more ways to use functions in filter query strings (see #1881). Additionally, the request pipeline is optimized to eliminate COUNT(*) SQL queries when pagination is disabled, while the new JsonApiResourceService.CanIncludeTotalResourceCount virtual method enables skipping these SQL queries based on additional user-defined logic.
OpenAPI preview 8 comes with support for [DisableQueryString] and [HasMany(DisablePagination = true)].
Breaking changes
- As a result of request pipeline optimization, the order in which resource definition callbacks execute has changed slightly (see #1915).
- The incorrect
[DisallowNull]on theidparameter ofIResourceWriteRepository.GetForCreateAsynchas been removed. - The relaxed variants of JSON:API media types have been deprecated, now that both NSwag and Kiota can properly handle JSON:API extensions. While they are still accepted, they are no longer emitted when generating OpenAPI documents. Our extension spec has been updated.
Bugfixes
- Fixed an incorrect
HTTP 415response in content negotiation with JSON:API extensions. - When the
AllowViewcapability onHasOneis turned off,HTTP GETrequests to secondary/relationship endpoints are now blocked. - OpenAPI: Links for
filter/page/sortare no longer generated for endpoints that return a single resource/identifier. - OpenAPI: Not all relationship capabilities were properly reflected in the generated OpenAPI document.
Merged PRs
- Replace int with long for ID by @niteshsinghal85 in #1879
- Greater flexibility in custom filter functions by @bkoelman in #1881
- Fixes to doc-comments to improve layout of generated API documentation by @bkoelman in #1902
- Request meta tests boilerplate by @mrmarcosmagalhaes in #1746
- Optimization: skip COUNT query when pagination is disabled by @bkoelman in #1915
- Fix awkward grammar by @bkoelman in #1918
- Document JsonApiEndpoints enum by @bkoelman in #1304
- OpenAPI: Add support for DisableQueryString/DisablePagination and fix links by @bkoelman in #1924
- Minor performance improvements on hot code paths by @bkoelman in #1947
- Deprecate relaxed variants of media types by @bkoelman in #1966
- Fixed: HTTP 415 error at operations endpoint when using OpenAPI extension by @bkoelman in #1971
- Refactor: use HttpMethods by @bkoelman in #1976
- Block GET request on secondary/relationship endpoint when
AllowViewis off by @bkoelman in #1992 - Add OpenAPI test coverage for capabilities by @bkoelman in #1993
- Add OpenAPI tests for the presence of meta by @bkoelman in #1996
- Nullability fixes by @bkoelman in #2006
- Add OpenAPI tests for custom routes by @bkoelman in #2008
- Add virtual CanIncludeTotalResourceCount to JsonApiResourceService by @bjornharrtell in #2005
New Contributors
- @niteshsinghal85 made their first contribution in #1879
- @mrmarcosmagalhaes made their first contribution in #1746
Full Changelog: v5.10.0...v5.11.0