import { Serializer } from 'ember-cli-mirage';

export default Serializer.extend({
  root: false,
  //Mirage: You cannot have a serializer that sideloads (embed: false) and disables the root (root: false).
  embed: true,
  serialize(response) {
    let json = Serializer.prototype.serialize.apply(this, arguments);
    json.items_count = response.items.models.length;

    return json;
  }
});
