-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Namespace separator fix for type field in jsonapi adapter #1216
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,7 +203,7 @@ def test_include_multiple_posts_and_linked | |
assert_equal expected, alt_adapter.serializable_hash[:included] | ||
end | ||
|
||
def test_underscore_model_namespace_for_linked_resource_type | ||
def test_remove_model_namespace_for_linked_resource_type | ||
spammy_post = Post.new(id: 123) | ||
spammy_post.related = [Spam::UnrelatedLink.new(id: 456)] | ||
serializer = SpammyPostSerializer.new(spammy_post) | ||
|
@@ -212,7 +212,7 @@ def test_underscore_model_namespace_for_linked_resource_type | |
expected = { | ||
related: { | ||
data: [{ | ||
type: 'spam_unrelated_links', | ||
type: 'unrelated_links', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why did the expectation change here? aside, the type should probably be json-api/json-api#850 (the issue I made that the jsonapi forum references ) ( |
||
id: '456' | ||
}] | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the moment, I would argue this is incorrect. e.g
User::Mailer
,Admin::Mailer
would both resolve to mailer. and see #1029 (comment)