Fix JSONApi sparse fieldset compliance for relationships - #203
Merged
Conversation
jherdman
suggested changes
May 10, 2019
jherdman
left a comment
Contributor
There was a problem hiding this comment.
Great catch! A few notes on making this safe to release ASAP.
Author
|
Thx! Will make these changes and update this PR shortly. |
leepfrog
force-pushed
the
fix-resource-fields
branch
from
May 10, 2019 15:41
497242a to
e7747a1
Compare
leepfrog
commented
May 10, 2019
| end | ||
| end | ||
|
|
||
| @spec is_field_valid_for_relationship({atom(), module()}, String.t()) :: boolean() |
Author
There was a problem hiding this comment.
This was the simplest way I could think of to handle the deprecation, but happy to take suggestions if needed.
jherdman
approved these changes
May 14, 2019
leepfrog
force-pushed
the
fix-resource-fields
branch
from
May 14, 2019 19:31
e7747a1 to
0784120
Compare
added 2 commits
May 14, 2019 12:32
instead of relationship name. see: https://jsonapi.org/format/#fetching-sparse-fieldsets - query_parser_test: fix a typo in test relationship definition
…arget resource type
leepfrog
force-pushed
the
fix-resource-fields
branch
from
May 14, 2019 19:32
0784120 to
6e9e9a6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes:
see: https://jsonapi.org/format/#fetching-sparse-fieldsets
Relevant section from the spec: "A client MAY request that an endpoint return only specific fields in the response on a per-type basis by including a fields[TYPE] parameter."