Understand cause of an exception
mikebrules opened this issue · 1 comments
mikebrules commented
Hello - I'm trying to understand the cause of an exception I see when my stack starts up, and which I can't find any background on -
Error: Cannot add other alternatives without at least one schema
I am defining a schema and using spread
to pull in a Joi Objtect defined in a different file; i.e.
return dynogels.define('Stories', {
hashKey: 'assetId',
schema: {
...validators
},
tableName
where ...validators
is this...
export default Joi.object({
...metaPartial,
...coverImagePartial,
title: Title.required(),
summary: Summary.required(),
assetType: AssetType.only(ASSET_TYPE_STORY).required(),
type: StoryType.default(ARTICLE),
blocks: Joi
.array()
.items(textBlockValidator, promoBlockValidator, embedBlockValidator)
.default([])
});
I can't understand what the "alternatives" relates to?
Many thanks
Mike