modelNameFromPayloadType (payloadType) Stringpublic
Inherited from DS.JSONSerializer but overwritten in addon/serializers/rest.js:861
modelNameFromPayloadType can be used to change the mapping for a DS model name, taken from the value in the payload. Say your API namespaces the type of a model and returns the following payload for the post model, which has a polymorphic user relationship: // GET /api/posts/1
{
"post": {
"id": 1,
"user": 1,
"userType: "api::v1::administrator"