Skip to content

Releases: lucacorti/jsonapi_plug

2.0.2

20 Oct 20:45
b04b895

Choose a tag to compare

What's Changed

  • Fix minor typos in README.md by @camatcode in #102
  • Bug Fix: Change unsupported_content_type to unsupported_media_type by @camatcode in #103
  • Fix elixir 1.19 compilation warnings and update test matrix by @lucacorti

New Contributors

Full Changelog: 2.0.1...2.0.2

2.0.1

13 Mar 09:28
2d4ea56

Choose a tag to compare

  • Allow included resources in patch for now.

Contributors: @davidgarra92

2.0.0

09 Nov 18:57
ade5b7d

Choose a tag to compare

JSONAPIPlug 2.0 has moved to a protocol based approach to resource definition.
This is the result of a big refactoring, cleaning up internals and providing a more
stable foundation for the library moving forward. This means there are a number of
breaking changes that require changes to applications using JSONAPIPlug.

See the upgrade guide in the docs for detailed upgrade instructions from 1.0.

  • JSONAPIPlug.Resource is now a protocol instead of a behaviour.
    Using structs as resource data is now mandatory.
  • Moved path option from JSONAPI.Resource to JSONAPIPlug.Plug.
  • Passing functions to JSONAPIPlug.Resource attribute serialize
    and deserialize to customize attribute value serialization and
    deserialization has been replaced by JSONAPIPlug.Resource.Attribute.
  • Generating per-resource JSON:API links and meta with JSONAPIPlug.Resource
    callbacks has been replaces by the JSONAPIPlug.Resource.Links and
    JSONAPIPlug.Resource.Meta protocols.
  • Removed links option to JSONAPIPlug.API. Resource links are always generated.
  • Moved the Phoenix render function to a component module in the library, this can
    be added to the phoenix MyAppWeb module and imported in the phoenix _json.ex
    module via use MyAppWeb, :jsonapi as per phoenix conventions.
  • Enforce client_generated_ids option. This prevents sending ids in resources and
    included resources when client_generated_ids is turned off. If you were sending
    ids to support resource creation with included atomically, this is now supported
    by sending JSON:API 1.1 lid in relationships and included resources. This
    is supported even though the reported jsonapi vesion is still 1.0 because the
    library still doesn't have full JSON:API 1.1 support. Only lid is supported.

Contributors: @lucacorti @treere

1.0.7

23 Sep 13:30
4b1948a

Choose a tag to compare

Fix case in deserialization of relationships (@treere)

1.0.6

24 May 17:30
da842d4

Choose a tag to compare

1.0.5

30 Jan 19:18
14b9e99

Choose a tag to compare

  • Allow disabling generation of links for relationships and includes. (@treere)
  • Add compile time optimizations for case transformation of resource fields (@treere)
  • Add support to restrict allowed includes to JSONAPIPlug.Plug. (@lucacorti)

1.0.4

23 Oct 11:15
2ba02e1

Choose a tag to compare

  • Fix deeply nested includes not always serialized correctly (@treere)

1.0.3

28 Apr 17:12
d8300c8

Choose a tag to compare

  • Accept id along with attributes in default sort parser implementation (@agos)
  • Remove deprecated builder_opts() usage from Plug.Builder (@lucacorti)

1.0.2

14 Apr 09:43
15ce4a8

Choose a tag to compare

  • Cache runtime configuration for API using :persistent_term.
  • Relax :nimble_options dependency.

1.0.1

15 Mar 21:00
296fa3f

Choose a tag to compare

  • Allow :nimble_options 1.0