The reason this is useful is that title annotations will show up on various useful places. For example, I want to use the generated JSON schema in a VS Code extension, and the title annotation would show up as a header for the user. Everything else is already supported natively by Joi and well converted by the tool (e.g. Joi.example and Joi.description), but not title, since Joi doesn't support it natively. We would be able to do it with Joi.meta.
First of all, great job on this library! 🎉
What
Similar to https://github.com/kenspirit/joi-to-json/issues/21, I'd like to be able to set something like:
The reason this is useful is that title annotations will show up on various useful places. For example, I want to use the generated JSON schema in a VS Code extension, and the title annotation would show up as a header for the user. Everything else is already supported natively by Joi and well converted by the tool (e.g.
Joi.example
andJoi.description
), but not title, since Joi doesn't support it natively. We would be able to do it withJoi.meta
.Unfortunately the code here https://github.com/kenspirit/joi-to-json/blob/master/lib/parsers/json.js#L739-L748 only exposes
contentMediaType
andformat
.