tlivings / enjoi

Converts a JSON schema to a Joi schema.
Apache License 2.0
282 stars 56 forks source link

Support 'error' property #77

Closed jc-white closed 5 years ago

jc-white commented 5 years ago

Noticed there was no support for the 'error' property, so I've added it to the typeDefinitionsMap to allow it to pass through to the joischema. Hopefully this was the right way to go about it, but let me know if there's a better way.

The Joi docs on 'error': https://github.com/hapijs/joi/blob/v15.0.3/API.md#anyerrorerr-options

jc-white commented 5 years ago

Ignore this - realized there was another way to go about this to comply with json schema. I'll open another PR later. Thanks!