-
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
Move ApiObjects to JsonApi namespace/folder #1529
Conversation
8f6d5aa
to
ccca84b
Compare
class Serializer | ||
module Adapter | ||
class JsonApi | ||
class Relationship |
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.
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.
namespacing it under ApiObjects
seems unnecessary to me.
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.
Agreed. Under JsonApi is fine, see my errors pr
On Mon, Feb 22, 2016 at 9:56 PM Ben Mills [email protected] wrote:
In lib/active_model/serializer/adapter/json_api/relationship.rb
#1529 (comment)
:@@ -0,0 +1,53 @@
+module ActiveModel
- class Serializer
- module Adapter
class JsonApi
class Relationship
namespacing it under ApiObjects seems unnecessary to me.
—
Reply to this email directly or view it on GitHub
https://github.com/rails-api/active_model_serializers/pull/1529/files#r53733792
.
The tests files were not changed/moved because they would clash with some other test name (e.g. |
What if the tests from |
And have two different group of tests in the same test file? I don't think that's appropriate. To be clear here |
Do you have a preference on how you'd like it to be structured? |
@remear not really. Any suggestion would be good to me. I would just not like to merge the two different concerns into the same file. |
Follow up to https://github.com/rails-api/active_model_serializers/pull/1504/files#r52796473. Moved the Relationship and ResourceIdentifier to the JsonApi namespace/folder and slightly refactored the Relationship code.
ccca84b
to
e076111
Compare
@bf4 rebased on master and moved it to |
@@ -1,87 +1,84 @@ | |||
require 'test_helper' |
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.
Let's move these downs down a level and delete the api_objects directory
Closing in favor of #1543 |
Follow up to
https://github.com/rails-api/active_model_serializers/pull/1504/files#r52796473.
Moved the Relationship and ResourceIdentifier to the JsonApi
namespace/folder and slightly refactored the Relationship code.