Skip to content

v5.6.0

Latest
Compare
Choose a tag to compare
@bkoelman bkoelman released this 30 Jun 19:17
· 76 commits to master since this release
ee41f12

New features and enhancements

Aside from a new logo (which was needed to enable dark mode on the documentation website), most of the changes involve unblocking our ongoing development of OpenAPI support for JSON:API. Please read the docs and give it a try (see the instructions for NSwag and Kiota), we'd love to hear your feedback.

  • The describedby top-level link has been added, whose visibility can be configured at various levels. Its value can be set by implementing IDocumentDescriptionLinkProvider.
  • Controller action methods have been enriched with [Required], pipeline methods with [DisallowNull] for id parameters.
  • A relaxed variant of the atomic operations media type can be used, to workaround deficiencies in OpenAPI client generators.

Breaking changes

  • When your project contains an atomic operations controller, earlier versions would always expose all operations for all resource types, despite the use of [Resource(GenerateControllerEndpoints = ...)] to constrain endpoints. The new behavior is to block operations whose endpoints are blocked using GenerateControllerEndpoints. If you're using custom controllers (or just want to override this default), implement IAtomicOperationFilter. To revert to the old behavior, use IAtomicOperationFilter.AlwaysEnabled.

Bugfixes

  • Fix crash on empty query string parameter name. For example: http://localhost:5065/people?=.
  • Fix percent-encoding of whitespace in response links. For example: equals(city,%27New York%27) equals(city,%27New%20York%27).
  • Return empty object ({}) instead of { "data": null } in atomic operation results.
  • Do not allow lid in atomic operations request when a client-generated ID is required.
  • Take options.UseRelativeLinks into account when rendering HTTP Location header.

Merged PRs

  • Replace CreateTupleAccessExpressionForConstant with simpler implementation by @bkoelman in #1469
  • Don't crash on empty query string parameter name by @verdie-g in #1484
  • Drop dependency on EF Core internals by @bkoelman in #1492
  • Enable setting the "describedby" top-level link by @bkoelman in #1495
  • Controller attribute changes by @bkoelman in #1503
  • Move back [FromBody] and [Required] to derived controllers by @bkoelman in #1506
  • Move [FromBody] back on base controllers, to prevent a breaking change by @bkoelman in #1508
  • Revert "Resharper: Replace async method with Task return" by @bkoelman in #1513
  • Add support for configuring the visibility of the "describedby" link by @bkoelman in #1516
  • Fix whitespace in query string parameters within pagination links by @bkoelman in #1526
  • New logo, dark mode on landing page by @bkoelman in #1549
  • Allow relaxed Content-Type for atomic operations by @bkoelman in #1553
  • Filter operations based on GenerateControllerEndpoints usage by @bkoelman in #1561
  • Return Forbidden when operation is inaccessible, to match resource endpoint status code by @bkoelman in #1562
  • Fixed: return empty object instead of data:null in operation results by @bkoelman in #1564
  • Fixed: Do not allow the use of 'lid' when client-generated IDs are required by @bkoelman in #1581
  • Fixed: send absolute/relative URL in location header, depending on options.UseRelativeLinks by @bkoelman in #1582
  • Add [DisallowNull] on TId in pipeline parameters by @bkoelman in #1583

Full Changelog: v5.5.1...v5.6.0