Releases: cerebris/jsonapi-resources
Releases · cerebris/jsonapi-resources
v0.7.0 - Bug fixes, model hints, improved filter application and verification
Features:
- Add
verify
andapply
options on filters. Used to define custom apply and verify logic, and deprecates overriding the resource methodsapply_filter
andverify_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
Features:
- Removes attribute and resource name restrictions for
model
,href
andlinks
. - Paged paginator now using
prev
link name instead ofprevious
, 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
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
Adds exception callbacks. See https://github.com/cerebris/jsonapi-resources#handling-exceptions for more details.
v0.5.8 - key type and relation names
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
Fixes issue with getting related resources count where the relation name doesn't match the resource name.
v0.5.6 - Fix Record Count
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
New features:
- Request options can be controlled with configuration options:
config.allow_include
,config.allow_sort
, andconfig.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'sGROUP 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
Fix camel case scope converting inside link_builder
v0.5.3 - Singletons
Allows singleton resources by removing the key check from the URL's key to the data's key for updating single resources.