Releases: cerebris/jsonapi-resources
v0.10.0.beta3 - `apply_join` for relationships, caching performance
Adds the following:
- relationships can now have an
apply_join
callable to allow customization of how the relationship is joined to the parent table. - cache reads and writes are batched, where supported by rails (5.2 and up). This results in many few calls to the cache.
- A rake task,
jsonapi:resources:check_upgrade
, to help with upgrading from earlier versions.
v0.10.0.beta2 - always_include_to_one_linkage_data configuration option is back
The option to always include linkages for to_one relationships has been added. This exists in v0.9 but was not implemented in v0.10.0.beta1
This change also required some internal changes for handling joins and filtering on polymorphic relationships.
v0.9.5 - Fix error with empty include parameter
Fixes 500 error when include param is empty (#1211)
v0.10.0.beta1 - Rework of internals
Note: These release notes are a work-in-progress.
This large release contains a substantial re-architecture of the internals, especially the process of finding resources and their included resources, and caching.
These release notes will be expanded soon along with the documentation site.
v0.9.4 - Filter on relationships. Deprecation warnings with Rails 5.2 fixed
Filtering on related resources is supported.
Fixes deprecation warnings with Rails 5.2
v0.9.3 - Allow generic validation error. Bug fix for delete callbacks
Allows generic validation errors to be set.
Fixes an issue where delete
was being used instead of destroy
resulting in callback not being called.
v0.9.2 - Bug fixes and efficiency improvements
Corrects association fetching logic for related resources fetches to eagerly load downstream resources being included in the response.
Minor fixes for tests.
Bug Fix
Fixes a bug where filters were not passed to related resources.
Bug fixes and efficiency improvements
- Fixes issue when attributes are declared as strings on a resource.
- Returns an error when the first issue is found when parsing the request as opposed to collecting errors and trying to return a full set. Improves efficiency when deeply nested includes are invalid.
v0.9.0 - Caching
Features
- Caching support for ActiveRecord based resources
- Ids are now fetched through resource method which delegates to model
- Now handles all base spec requests as a single operation
- Make exception backtraces configurable (instead of defaulting to !production).
- Adds configuration option to whitelist all exceptions.
- Loosens Accept header check to allow starts with :api_json
- Add facility to override error object members in JR Exceptions
Bug Fixes
- Fixed missing context on show_related_resources
- Fixes handling of valid media types
- Fixes issue with controller filter order conflicts when checking media types
- Fixes situation where the linkage data could be partially calculated
- Fixes mismatch of object_id in exception_class_whitelist
- Fixes issue with rails engines paths and resources without namespaces
- Fixes issue rebuilding self link when link is provided
- Fixes handling camelized resources when looking up resource classes
- Fixes bug where immutable resources were generating routes for methods which mutate the resource
- Fixes issue with missing relationship data when serializing with complex includes
- Fix polymorphic type setter
- Fix issue where resources received context nested in hash
- Skip preloading of polymorphic relations, better handling of serialization with partially preloaded relations
- Fix so includes now follow namespacing
- Rescues JSON parsing error and return all exceptions from the parser in
_parser_exception
- Fixes sort with has one include
- Fixes an issue where the recreated relationships might be using the wrong model_name if the model_name is changed in a resource that is derived from a non abstract resource, such as done in many of the tests.
- Fixes issues related to CSV parsing of includes
- Fixes issues with has_one polymorphic serialization
- Fixes LoadError issue with engines
- Fixes issue where a
creatable
id
breaks Postgres when Postgres manages the id sequence. - Fixes page count when paginator is :none
- Fixes issue with nil values from include params, for example
include: ',,'
Breaking Changes
- Removed deprecated
updateable
andcreateable
methods (note misspellings). Useupdatable
andcreatable
instead. - Drops support for rails 4.1
- Sets the required_ruby_version to 2.1
- Derived resources now use the model name of their base resource, if it is not abstract.
- If you need ids to be created by the client, say for using GUIDs, you must now add the id to the creatable_fields method