Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
skip: {
type: 'integer',
minimum: 0,
},
order: {
type: 'array',
items: {
type: 'string',
},
},
},
additionalProperties: false,
};
const modelRelations = getModelRelations(modelCtor);
const hasRelations = Object.keys(modelRelations).length > 0;
if (hasRelations) {
schema.properties!.include = {
type: 'array',
items: {
type: 'object',
properties: {
// TODO(bajtos) restrict values to relations defined by "model"
relation: {type: 'string'},
// TODO(bajtos) describe the filter for the relation target model
scope: scopeFilter,
},
},
};
}