module.exports = Joi.object({
a: Joi.string()
}).description("");
is a lot to write. It would be cool if it could look like
object({
a: string()
}).description();
Where the rule is that there is only one line to this syntax (it may contain spaces within braces but not outside them). i.e. this would be invalid
object({
})
object({
})
(here we have a line break after the closing brace in line 2 -> error)
But if its outside of the major braces its okay.
It would be nice to create a verification like
joiful("input.joi")
and perhaps even nicer to have
scopeful("input.joi")
File ending joi
tells scopeful
to set the scope to require("joi")