Skip to content

Releases: cerebris/jsonapi-resources

v0.7.0 - Bug fixes, model hints, improved filter application and verification

08 Dec 14:40
Compare
Choose a tag to compare

Features:

  • Add verify and apply options on filters. Used to define custom apply and verify logic, and deprecates overriding the resource methods apply_filter and verify_filter.
  • Adds model hints to allow namespaced models and custom resolution of models to resources.
  • Context is now provided to apply_sort method

Bug fixes:

  • Fixed issues introduced in v0.6.x with resolving models to resources. Complex scenarios now should use model hints to assist the code in correct name resolution.

v0.6.1 - Restricted attribute names, immutable

21 Oct 20:19
Compare
Choose a tag to compare

Features:

  • Removes attribute and resource name restrictions for model, href and links.
  • Paged paginator now using prev link name instead of previous, as per the spec.
  • Adds immutable option for resources that should not be changed.

Bug fixes:

  • Fixes issues with Single Table Inheritance resource names.

v0.6.0

09 Oct 13:45
Compare
Choose a tag to compare

Breaking change:

  • Context in Resource was reworked so that class methods require context and instance methods use the context stored in the resource. This may break some methods that override resource methods.

General improvements:

  • Request object was refactored to improve code organization
  • Readme was extended

Bugs fixes:

  • Fix issue with multiword module names
  • Compatibility with Rails 4.0 was restored
  • Generated paths with Rails engines fixed
  • Fix issue with record_count when records method used columns from multiple tables in select

v0.5.9 - Exception callbacks

03 Sep 12:22
Compare
Choose a tag to compare

v0.5.8 - key type and relation names

03 Sep 12:18
Compare
Choose a tag to compare

General improvements:

  • Table of Contents for Readme
  • Section in Readme for Includes

New Features:

  • relation_name option on relationships can now be set and dynamically determined, allowing the resource to selectively use a relation on the model
  • key_type: the key type can be set globally in the configuration and per resource. This supports integer, string, uuid, and custom procs. When using uuids the routes also enforce the correct uuid format.

Bugs fixes:

  • Generator now ensures that generated resources use the singular class name
  • Status in errors is now returned as a string to comply with the JSON API spec

v0.5.7 - Fix related resources count

13 Aug 02:08
Compare
Choose a tag to compare

Fixes issue with getting related resources count where the relation name doesn't match the resource name.

v0.5.6 - Fix Record Count

11 Aug 22:17
Compare
Choose a tag to compare

Fixes an error where the record count was being output as a hash of pagination parameters.

v0.5.5 - Pagination links, a new generator, request option control, and bug fixes

10 Aug 14:27
Compare
Choose a tag to compare

New features:

  • Request options can be controlled with configuration options: config.allow_include, config.allow_sort, and config.allow_filter.
  • A Resource Generator has been added.
  • Pagination links are now generated for related resource requests.

Bug fixes:

  • using filter_records(filters, options).count(:all) to fix an error in Postgresql's GROUP BY clause.
  • The title and details of Validation Errors have been switched.
  • When using non ActiveRecord based resources an error was happening if ActiveRecord was not loaded.
  • Pagination links have been fixed for results that were smaller than a full page size.

v0.5.4 - Fix camel case scopes

29 Jul 13:58
Compare
Choose a tag to compare

Fix camel case scope converting inside link_builder

v0.5.3 - Singletons

29 Jul 11:46
Compare
Choose a tag to compare

Allows singleton resources by removing the key check from the URL's key to the data's key for updating single resources.