Skip to content

Releases: json-api-dotnet/JsonApiDotNetCore

v4.2.0

23 Jun 13:46

Choose a tag to compare

New features

See the notes for v4.2.0-beta. The most prominent one: new extensibility points for business logic, documented here and here.
This replaces the experimental Resource Hooks, which we intend to remove in the next major version.

Breaking changes

We had to take a few binary-breaking changes in obscure places. Just recompiling your project should be sufficient in nearly all cases. See our versioning policy.

Closed issues

  • Consecutive exception hides original error (#1017)
  • Bugs around empty included[] in response (#991)
  • Adding extra includes from IResourceDefinition.OnApplyIncludes() does not work (#989)
  • Sending an empty fields parameter results in error (#996)
  • Makes the hashing algorithm used for ETags pluggable (#1007)

v4.2.0-beta

28 May 12:36

Choose a tag to compare

v4.2.0-beta Pre-release
Pre-release

We're releasing a beta because we want to verify we've done the new business rules extensibility points on IResourceDefinition right (see here and here). Please give it a try and let us know by creating an issue, so we can adapt. Once released, we cannot take breaking changes anymore.

New features

  • Rewrite of LinkBuilder to use ASP.NET Core routing to render links (#987)
  • New business logic extensibility points on IResourceDefinition (#977)
  • New option to emit JSON:API version in response documents (#992)
  • ETag support to save network bandwidth (#933)
  • Allow condition on has() filter function (#985)

Breaking changes

We had to take a few binary breaking changes in obscure places. Just recompiling your project should be sufficient in nearly all cases.

Closed issues

  • Cannot sort resource having a relationship with EagerLoadAttribute (#988)
  • Discovery does not discover injectables not co-located with resources (#995)
  • Assembly scanning does not work with custom open generic registrations (#981)

v4.1.1

18 Mar 16:41

Choose a tag to compare

New features

Breaking changes

We had to take a few binary breaking changes in obscure places. Just recompiling your project should be sufficient in nearly all cases.

Closed issues

  • Comma-delimited Accept header is not correctly parsed (#970)
  • Use controller type instead of name when mapping endpoints to resources (#966)

v4.1.0

18 Mar 16:22

Choose a tag to compare

NuGet issues prevented us from publishing this version, so we created v4.1.1 instead.

v4.0.4

23 Feb 13:00

Choose a tag to compare

This patch fixes rendered links when hosting in an IIS application virtual directory.

Closed issues

  • Pagination Links not forming correctly after hosting on IIS (#948)

v4.0.3

10 Feb 18:45

Choose a tag to compare

This patch release addresses a few bugfixes.

Closed issues

  • Missing help in IntelliSense (#940)
  • Global options not respected in relationship links rendering (#945)
  • Fixed: some defaults are still being rendered when using ?defaults=false (#941)
  • Additional fixes in resource hooks (#938, #929)

v4.0.2

20 Jan 12:08
816c58a

Choose a tag to compare

Fixes a NullReferenceException when using resource hooks.

Closed issues

Open up some members for extensibility (#927)
Fix for OnReturn hook in GetSecondary pipeline (#924)

v4.0.1

03 Jan 15:42

Choose a tag to compare

This version lowers the minimum required version of EF Core from 3.1.10 to 3.1.0.

Closed issues

  • Dependency on 3.1.10 of EF Core (#913)

v4.0.0

14 Dec 17:35
7b37eeb

Choose a tag to compare

Introduction

We're back! Almost 2 years since the last stable release, a lot has changed.
The original author was no longer able to maintain the project.
Long story short: @bart-degreed and @maurei have taken over and are fully committed to bringing this project to the next level.

Are you building an API from scratch? Our documentation is the place to get started.
Upgrading from v3 instead? Be sure to check out our migration guide.

The release notes of earlier pre-release v4 versions contain detailed lists of changes since v3. To summarize, these are the highlights:

  • Works with .NET Core 3.1/5 and Entity Framework Core 3.1/5
  • New advanced filtering capabilities (old syntax is still available)
  • Enhanced support for usage of the existing query string parameters
  • Flexible annotations to control what is permitted per resource attribute
  • Increased compliance with the JSON:API specification
  • Improved handling of create/update/delete of resources and relationships
  • Added support for POST and DELETE on relationship endpoints
  • Change tracking on POST/PATCH requests reduces the size of response messages
  • Vastly improved request validation with clear error messages
  • Built for scale: default page size, options to control maximum page size and number, maximum include depth
  • Improved support for custom logging and error handling
  • Eager Loading enables to unconditionally include unexposed related entities
  • A limited set of services can now be injected in resources
  • Up-to-date documentation, including auto-generated examples
  • SourceLink enables to step into our NuGet library during debug by downloading sources from GitHub
  • Well over a thousand automated tests (mostly integration)
  • Lots and lots of bugfixes

Removed features:

  • Entity-Resource separation (motivation here).
  • Bulk operations, because json:api has retracted its experimental specification.
    As a replacement, they recently finished Atomic Operations, which we intend to implement in one of the next versions.

Finally, a big thanks to all community contributors!

Release notes

New features

(none)

Breaking changes

  • Changed the usage of fields query string parameter to be json:api spec compliant. It now requires a resource type between brackets instead of a relationship path. The value can contain both attributes and relationships.

Closed issues

  • Small refactorings (#893)
  • Changes usage of fields parameter to be json:api spec compliant (#904)
  • Fixed: hide duplicate stacktrace for ModelState errors (#905)
  • Fixed: write content type on invalid Accept headers (#903)
  • Wrong totalResourceCount when using resource definition filter (#881)
  • Minor fixes in content negotiation (#897)
  • Refactored JsonApiException to contain a list of errors (#894)

v4.0.0-rc

23 Nov 09:58
c986c34

Choose a tag to compare

v4.0.0-rc Pre-release
Pre-release

New features

  • When a request is canceled, we propagate that down to EF Core (#879)
  • New extension method AddResourceRepository() on IServiceCollection, similar to AddResourceService() (#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 return 204 No Content without a body
  • Changed how custom meta is registered (see #737 (comment) for details)
  • Base class ResourceDefinition was renamed to JsonApiResourceDefinition and the meaning of IResourceDefinition 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-in RequiredAttribute instead.
  • Breakup of AttrCapabilities.AllowChange (affected both POST and PATCH) into AttrCapabilities.AllowCreate (only POST) and AttrCapabilities.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)