Hi there
I’ve read the guide for custom serializers Customizing Serializers - Ember Data - Ember Guides and I wanted to extend my application serializer with a specific format for the style info in the json-output:
import JSONAPISerializer from '@ember-data/serializer/json-api';
import { underscore } from '@ember/string';
export default JSONAPISerializer.extend({
keyForAttribute(attr) {
return underscore(attr);
},
keyForRelationship(key) {
return underscore(key);
}
});
I want to underscore the “type” info but there’s no keyForType or something similar.
{
"data": {
"type": "people", //<-----this type
"id": "123",
"attributes": {
"given-name": "Jeff",
"family-name": "Atwood"
}
}
}
Do I miss something or is this solved an other way.
Thank you
Michael