Skip to content

Releases: brainstudnl/json-api-resource

v4.3.1

05 Jan 14:52
ecdd43c

Choose a tag to compare

What's Changed

  • Improve the docblock for toId in JsonApiResource by @brdv in #32
  • Handle null resource more gracefully in toId by @brdv in #34

Full Changelog: v4.3.0...v4.3.1

v4.3.0

28 Apr 08:59
75c6331

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v4.2.0...v4.3.0

v4.2.0

16 Oct 07:22
0d3ee6e

Choose a tag to compare

What's Changed

  • Add more robust id resolving by @brdv in #31
  • Update readme documentation to new methods by @brdv in #29

Full Changelog: v4.1.1...v4.2.0

v4.1.1

27 Sep 12:20
f9af786

Choose a tag to compare

What's Changed

  • Apply filter to outcome of toRelationships method by @brdv in #30

Full Changelog: v4.1.0...v4.1.1

v4.1.0

27 Sep 08:43
b2f4e38

Choose a tag to compare

Release v4.1.0

This release introduces a new way to define resources. It adds four methods to the JsonApiResource that each cover a specific part of a resource. The big difference is that you'll have direct access to the Request in theses methods, as the methods are called only in toArray. This will allow for better/easier access to the specific Request your resource is built for.

It also deprecates the use of the register method, as going forward, using the methods to define your resource is the preferred way. For now, we keep the options to use register, but know that it might be removed in a future release.

What's Changed

  • Update laravel pint by @brdv in #25
  • Rename CollectionResource to ResourceCollection to better follow Laravel by @brdv in #26
  • Add option to define resources by methods by @brdv in #24
  • Type getId method as string or int by @brdv in #28
  • Allow for empty attributes in response by @brdv in #27

Full Changelog: v4.0.6...v4.1.0

v4.0.6

08 Jul 07:53
cc2abb2

Choose a tag to compare

What's Changed

  • Allow empty metadata in addMeta method by @brdv in #21
  • Make ContentTooLarge exception PSR-4 compliant by @brdv in #19

Full Changelog: v4.0.5...v4.0.6

v4.0.5

18 Jun 07:28
2c8bdfd

Choose a tag to compare

What's Changed

  • Fix faulty isEmpty() call to empty() by @brdv in #23

Full Changelog: v4.0.4...v4.0.5

v4.0.4

17 Jun 13:56
928dfa4

Choose a tag to compare

What's Changed

  • Map symfony 405 exception to ApiException by @brdv in #22

Full Changelog: v4.0.3...v4.0.4

Add Laravel 11 support

04 Jun 06:47
f7e1450

Choose a tag to compare

What's Changed

  • Bump laravel and php required versions by @brdv in #20

Full Changelog: v4.0.2...v4.0.3

Patch 4.0.2: Fixes validation errors

22 May 07:06
03b21b5

Choose a tag to compare

Fixes issue in validation errors where keys were not indexed but named.