Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static listShape(
this: T,
): ReadShape>> {
const schema = [
new schemas.Union(
{
first: FirstUnionResource.getEntitySchema(),
second: SecondUnionResource.getEntitySchema(),
},
(input: FirstUnionResource | SecondUnionResource) => input['type'],
),
];
return {
...super.detailShape(),
schema,
};
}
}
static detailShape(
this: T,
): ReadShape>> {
const schema = new schemas.Union(
{
first: FirstUnionResource.getEntitySchema(),
second: SecondUnionResource.getEntitySchema(),
},
'type',
);
return {
...super.detailShape(),
schema,
};
}
static listShape(