kenspirit / joi-to-json

Capable of converting different versions' joi object to json schema
MIT License
39 stars 18 forks source link

Add support for isoDate, isoDuration, uuid, guid string formats #16

Closed Feasul closed 3 years ago

Feasul commented 3 years ago

According to https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.1.md#data-types date-time, uuid and email (which is already supported by joi-to-json) can be used despite not being defined by the spec. I have also thrown in convertion of isoDuration to duration which is covered by ajv with ajv-formats (which is what I use to do JSON Schema based validation).

kenspirit commented 3 years ago

@Feasul Thanks very much for the enhancement. It looks good.