-
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
Changing root to model class name #998
Changing root to model class name #998
Conversation
I'm somewhat concerned that this appears to be a breaking change in that many tests needed to be changed. However, I've lost track of if this is a 0.10 issue, so maybe it's ok in the rc? |
@bf4 yeap, this is might impact some ppl updating to 0.10.x, but we already know that upgrading from older version won't be easy, there a lot of other breaking changes, and use the resource class name seems the right thing, it helps user to keep a pattern. Do you have any thoughts about it? 😄 |
I guess I'd like to see some kind of changelog or doc for how the same resource will be rendered given different ams versions (and adapters), but not sure how practical that is. |
That said, I suppose, that in all the changed tests, the new expectation appears more correct and less surprising from a hypermedia point of view. e.g. PostWithComments should still have a root key of post(s), not 'post(s)_with_comments' |
ec5a3cf
to
bf24c16
Compare
bf24c16
to
9817a5b
Compare
Taking into account that:
I and also after talk to @spastorino and @bf4, that fell comfortable about this, I'm merging it. |
…_name Changing root to model class name
👍 🎆 |
As I mentioned on #986
This basically changes the default
root
used on Json Adapter to be the resource class name instead of the serializer's name.This is also a prerequisite to other PRs.
example:
This serializer:
resulted on this response (using json aadapter):
now it results: