Skip to content

Releases: tiagopog/jsonapi-utils

Support for Rails 5

12 Mar 20:05
Compare
Choose a tag to compare

Major features:

  • Update of jsonapi-resources to v0.8.0;
  • Support for Rails 5;
  • Support for custom filters and custom paginators;
  • Support for dasherized and camelized format keys.

Major bug fixes:

  • Fix double request parsing for default actions;
  • Use the proper key format for filter and sort operations.

Pair features from 0.4.x and 0.5.x

16 Oct 00:51
Compare
Choose a tag to compare

Major features included:

  • Custom filters;
  • Custom paginators;
  • Support for dasherized and camelized format keys.

Add support to Rails 5 and JSONAPI::Resources 0.8.0.beta1

31 Jul 19:03
Compare
Choose a tag to compare

This version introduces a couple of breaking changes to JSONAPI::Utils mostly because Rails 5 changed the way it deals with request parameters.

Main updates:

  • Add support to Rails 5;
  • Add support to JSONAPI::Resources at version 0.8.0.beta1;
  • It no longer needs to inherit JSONAPI::Resources directly in controllers, only JSONAPI::Utils is required;
  • Lots of code refactoring.

Introduce helpers for params

04 Jul 14:55
Compare
Choose a tag to compare

Improvements

  • Add helper methods to easily get permitted params for the primary resource and its relationships:
  • resource_params: helper to get the permitted params from params['data']['attributes'];
  • relationship_params: helper to get ids from params['relationships'].

Fixes

  • Work with a copy of ActionController's params in JSONAPI::Utils::Request#setup_request to avoid the bug reported in #21.

More details: #23

Introduce error rendering

04 Jul 15:01
Compare
Choose a tag to compare

This release brings a lot of improvements in terms of dealing with error messages. The major feature is the introduce of jsonapi_render_errors which renders a proper error response for any object which implements the #errors method.

Fix request validation flow

27 May 01:46
Compare
Choose a tag to compare
  • Fix an issue with the flow of request setup and validation reported in #12.

General improvements and fixes

02 May 22:17
Compare
Choose a tag to compare
  • Update README with some features from v0.4.1 and v0.4.2;
  • Improve the way it renders a Hash or a collection of Hashes;
  • Turn JSONAPI::Utils#filter_params and JSONAPI::Utils#sort_params into accessible helpers for getting deserialized filter/sort params from query string;
  • Not found error responses now supports slugs and uuids;
  • Better support for errors generated by requests which are not compliant with JSON API's specs.

Add some features from v0.3.5

10 Apr 05:28
Compare
Choose a tag to compare

There was a parallel development for v0.3.x because of its compatibility with jsonapi-resources at the popular versions v0.5.x . Then some features like a proper sorting and filtering, improvements for pagination, record count and other were firstly released for v0.3.5. Now v0.4.2 brings all those features for projects heading to use the latest version of jsonapi-resources.

Now supporting:

  • Filter:
    • Filter records via filter query string param;
    • Add filter opt-out: jsonapi_render collection, options: { filter: false };
    • Access filter params via: filter_params in controllers.
  • Sort:
    • Sort records via sort query string param;
    • Sorting is possible for two kind of objects: ActiveRecord_Relation and Array;
    • Access sort params via: sort_params in controllers.
  • Pagination:
    • Pagination is possible for two kind of objects: ActiveRecord_Relation and Array;
    • Add pagination opt-out: jsonapi_render collection, options: { paginate: false }.

General fixes and improvements:

  • Exception handling;
  • Pagination count;
  • Capturing the ID of a not found record.

Add support to filter and sort

04 Apr 15:56
Compare
Choose a tag to compare

Now supporting:

  • Filter:
    • Filter records via filter query string param;
    • Options to avoid filtering: jsonapi_render collection, options: { filter: false };
    • Access filter params via: filter_params in controllers.
  • Sort:
    • Sort records via sort query string param;
    • Sort is possible for two kind of objects: ActiveRecord_Relation and Array;
    • Access sort params via: sort_params in controllers.
  • Pagination for ActiveRecord_Relation and Array objects.

Fixes:

  • Exception handling;
  • Pagination count.

v0.4.1

04 Apr 15:58
Compare
Choose a tag to compare

Fixes:

  • Issue with nil value for @request object when a record is not found.