Allow schema comment null, allow unknown fields in schema

Fixes #154
This commit is contained in:
rijkvanzanten
2020-08-22 10:44:08 -06:00
parent 8414f257e2
commit 3a0ce08fe4

View File

@@ -60,11 +60,11 @@ const newFieldSchema = Joi.object({
field: Joi.string().required(),
type: Joi.string().valid(...types),
schema: Joi.object({
comment: Joi.string(),
comment: Joi.string().allow(null),
default_value: Joi.any(),
max_length: [Joi.number(), Joi.string()],
is_nullable: Joi.bool(),
}),
}).unknown(),
/** @todo base this on default validation */
meta: Joi.any(),
});