enjoi
enjoi copied to clipboard
Converts a JSON schema to a Joi schema.
It would be nice to be able to get at the JSON Schema's optional "description" property by mapping it to Joi's [description()](https://joi.dev/api/?v=17.6.0#anydescriptiondesc).
I don't want to provide the field everywhere. This line of code makes me cry when I use a very expensive schema
The newly added useDefaults behavior should be modified to consider the empty string and `null` as empty for the purposes of default value insertion. This would bring us in line...
Hi, Using a `$ref` in a `anyOf` or an `affOf` in a schema triggers the following error: `RangeError: Maximum call stack size exceeded` ### Code to reproduce ``` const Enjoi...
JSONSchemas without the `type` keyword are still valid, eg: ``` { format: 'date-time' } ``` is a valid JSONSchema that matches against any non-string value, or any string value that...
The example from the **README** is throwing an error. It is saying **message: '"name" is required',**. ```ts const Joi = require('joi'); const Enjoi = require('enjoi'); const schema = Enjoi.schema({ type:...
Hi, Is there a way to transform a Joi object into a JSON-schema? I would like to be able to save a Joi instance into a Database and retrieve it...
**1** Uniques by key Example: I have an array of objects and need uniques elements by "key1", "key2", "key3" Schema should have` {type:"array", uniques:[ "key1", "key2", "key3"]}` Valid schema ```...
Hapi and Joi have had a massive refactor of their libraries https://github.com/hapijs/joi/issues/2037 hapi-openapi relies on this library to validate a swagger. The enjoi library needs an update to use these...
It would be extremely nice to have this library to support parsing to Yup schema as well. I've a case where I use Joi in the backend and I want...