Skip to content

Conversation

wanyamaman
Copy link

All Submissions:

  • I've checked to ensure there aren't other open Pull Requests for the same update/change.
  • I've submitted a ticket for my issue if one did not already exist.
  • My submission passes all tests. (Please run the full test suite locally to cut down on noise from travis failures.)
  • I've used Github auto-closing keywords in the commit message or the description.
  • I've added/updated tests for this change.

Test Plan:

Reviewer Checklist:

  • Maintains compliance with JSON:API
  • Adequate test coverage exists to prevent regressions

gatopanx and others added 30 commits December 1, 2017 00:08
…for-nested-resources-but-not-includes

Allow pagination for nested resources but not for included resources
…s_in_relationships

Added support for :primary_key in sorting on relationships
…ormatting

added optional route formatting feature
…siting-relationships

Allow to post existing relationships
Works around primary key being cast due to pluck bug
Use `destroy` instead of `delete` to ensure callbacks are run
Update ruby and rails versions for travis tests
Replaces `allow_includes` with `default_allow_include_to_one` and `default_allow_include_to_many` configuration options.
Adds support for `allow_include` option on Relationships to override the config settings.
Allows the processor to retrieve records without further filtering,
which will have taken place earlier in the `find_fragments` and
`find_related_fragments`. This fixes issues where `records` has been
overridden and interferes with getting included
records (and already filtered by the find fragment step).
Introduce `Resource.retrieve_records`
Allow more control over allowing includes
Needed to avoid "DEPRECATION WARNING: Dangerous query method..."
See rails/rails#32995
vgsantoniazzi and others added 26 commits September 22, 2020 09:37
 # Summarize changes in around 50 characters or less
Relationship objects are used as key in @join_details in JoinManager.
This hash contains two types of objects: String and Relationship
In case of hash collisions in @join_details the method Relationship#eql? is called.
It currently fails when comparing with a string key.

Fixes #1333
Update version to v0.11.0.beta1
Have Resource#inherited call through to Class#inherited
Fix JSONAPI::PathSegment::Relationship#eql?
* Rails v6.1 compatibility (#1346)

* Fixes for rails 6.1.1

* Fixes for ruby 3.0.0

* Remove rails 5.0 support

Co-authored-by: Igor Gonchar <[email protected]>
…eding to understand the internal components (#1348)

* Refactor to allow resources to be serialized without the developer needing to understand the internal components

* Simplify and clarify naming for internal components

* Refine include_directives
* Remove code specifically for pre 5.1 rails versions

* Update rails version supported
…rated SQL strings (#1363)

* Refine when config.active_record.sqlite3.represent_boolean_as_integer is set

Tests with rails > 6.1.1 breaks with this option

* Update rails 6.1 tested version

* Add quoting for fields in built up sql

* Remove tests for generated sql statements

These are changing with new rails versions and it's creating a lot of false failures

* Remove tests for generated sql statements using joins_left

* Fix default sort for when empty array is provided

Fixes issue with relationship requests not getting a default sort

* Add helper methods for generating sql fields with aliases and quotes
JSONAPI::ResourceTree#load_included was failing to correctly
populate the resource fragments of included resources, such that
the `include_related` parameter was null. This was resulting in
the relationships object lacking a data attribute for nil or
empty resources.

The JSON-API specification states that a null or empty array should
be returned in these circumstances:
https://jsonapi.org/format/#document-resource-object-linkage

The underlying issue appears to be the use of `include_related` rather
than the symbol `:include_related` when initializing nested resource
fragments.
Deprecates content_type in favor of media_type
* Add Ruby 3.1 and Rails 7 to the CI matrix
* Adding Ruby 3.2
* Bump up patch versions
for efficient string storage since we don't mutate any of the string
literals after they have been declared. in essence, they're already
being used as frozen values.
You have a configuration option`allow_transactions`, but looks like implementation is missing.
When the user adds a join in `records`, it confuses `get_join_arel_node`
because it finds the same number of joins before & after adding a join
for `include_optional_linkage_data` (or equivalently for
`always_include_*_linkage_data`).

This commit falls back to searching the existing arel nodes for a
compatible join and uses that if found.
@wanyamaman wanyamaman self-assigned this Jan 16, 2025
@wanyamaman wanyamaman marked this pull request as ready for review January 16, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.