You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suspect that the normalizeXXXX methods on the DS.RESTSerializer and DS.JSONAPISerializer serializers are commonly used, but given the change from extractXXXX pre ED 2.0 finding solid examples is hard for new users.
Specifically, the docs for these methods should:
Address the difference between each method (universal? just on save? just on responses?)
Provide an example of 'fixing' common issues—typically JSON responses without a root key, a different id key (_id is common), and/or populating model fields on the save response only.
Show how to populate model fields on the response (that were empty on the outgoing save - e.g. rendered text)
Clarify the requirements for the output: does it matter if the root key for a single object is pluralized? Does the root key need to be pluralized for an array response? The docs show non-plural vs. plural keys but this doesn't matter: you can just pluralize it all the time.
For myself—as a relative newcomer to Ember—much of the above is discoverable through trial-and-error only, which isn't ideal.
The text was updated successfully, but these errors were encountered:
@elithrar this issue should be on the emberjs/data project not the emberjs/ember.js project. Also perhaps join the #documentation channel in the embercommunity.slack.com chat to let them know the need for clarity.
I suspect that the
normalizeXXXX
methods on theDS.RESTSerializer
andDS.JSONAPISerializer
serializers are commonly used, but given the change fromextractXXXX
pre ED 2.0 finding solid examples is hard for new users.Specifically, the docs for these methods should:
_id
is common), and/or populating model fields on the save response only.For myself—as a relative newcomer to Ember—much of the above is discoverable through trial-and-error only, which isn't ideal.
The text was updated successfully, but these errors were encountered: