Skip to content

v4.0.0-beta1

Pre-release
Pre-release
Compare
Choose a tag to compare
@bart-degreed bart-degreed released this 10 Sep 16:03
· 662 commits to master since this release
38d23a3

New features

  • Composable filters and deeply nested queries (see #792 for details)

Breaking changes

  • We no longer call app.UseRouting() and app.UseEndpoints(...) anymore, so you need to add these yourself to Startup.cs
  • Code namespace changes (details at #808)
  • New filter query string syntax. Set options.EnableLegacyFilterNotation to true to allow legacy filters
    To use new notation, prefix with "expr:", for example: ?filter=expr:equals(lastName,'Smith')
  • Multiple filters in query string at same depth are combined using OR operator (used to be AND, which violates json:api recommendations)
  • Using a negative page number (to reverse order) is no longer possible
  • "total-records" in response meta has been renamed to "total-resources" (and casing convention is applied)
  • ResourceDefinition<T>.HideFields() has been replaced by ResourceDefinition<T>.OnApplySparseFieldSet()
  • ResourceDefinition<T>.GetQueryFilters() has been replaced by ResourceDefinition<T>.OnRegisterQueryableHandlersForQueryStringParameters
    These are no longer tied to only filters. For example: ?filter[isHighRisk]=true now uses: ?isHighRisk=true
  • When no sort is provided, resources are sorted ascending by ID
  • Notable renames:
    DefaultResourceService -> JsonApiResourceService
    DefaultResourceRepository -> EntityFrameworkCoreRepository
    BaseJsonApiController.GetRelationshipsAsync -> GetRelationshipAsync
    BaseJsonApiController.GetRelationshipAsync -> GetSecondaryAsync
    AttrCapabilities.AllowMutate -> AllowChange
  • Most occurrences of 'entity' were renamed to 'resource' and Default prefix was removed from various class names

Closed issues

  • Routing does not respect custom pluralized resource name (#805)
  • Changes on public API surface (#808)
  • Fixed versioning on AppVeyor NuGet feed (#802)
  • fix: support for lazy loading proxies (#793)
  • Composable filters and deeply nested queries (#792)
  • Required Input validation disabled for partial patching / relationships (#781)
  • Fix synchronous error in flushasync (#773)
  • Fixed: only run custom path cutting logic when RouteAttribute is used (#769)
  • Fixed: Namespace not honored when RelativeLinks=true (#763)
  • Simplified signature of app.UseJsonApi() (#750)
  • Fixed: exception logged in Kestrel on Delete request (#762)
  • Show helpful error when ActionResult returns unsupported type (#753)
  • Fixed: Filter passes query validation, but the filter is not applied (#659)
  • Simplify/optimize filter query string parsing (#758)
  • Unexpected behavior on negative page number (#757)
  • Fixed: error setting default sort for non-string properties (#754)
  • Fixed: sorting on multiple attributes (#755)
  • Fixed: do not intercept exceptions thrown from non-json:api requests (#749)
  • Fix for GetDefaultSortOrder not firing (#746)
  • Fixed: missing property setter in options (#742)

Special thanks to @bjornharrtell and @fdlane for providing feedback, trying things out, submitting bugs or even fixing them!