// TODO This has to be reworked. Need a mechanism to determine if the response
// is a full full resource or contains a list of resources. The '?only' feature which
// returns partial resource(s) break this self
// if (isJson(ctx)) {
// let content = ctx.body.data || (Array.isArray(ctx.body) ? ctx.body : [ctx.body]);
// for (let resource of content) {
// should.exist(resource, 'null content is evil');
// should.exist(resource._metadata, 'missing _metadata');
// should.exist(resource._metadata.self, 'missing _metadata.self');
// }
// if (ctx.req.tenant.httpResponse.validateResource)
// {
// model.validate(ctx.body, null, ctx.res.get('content-type'));
// }
// }