- add support to handle custom types via joi.extend (thanks to @qbikez)
- Use lodash instead of lodash subpackages (thanks to @sabdullahpear)
- Add Typescript typings (thanks to @Mairu)
- Fix joi .example() for joi >= 14.x (thanks to @lucasconstantino and @DragFAQ)
- Add file support (thanks to @qwang1113)
- Fix for crash when an object property is forbidden, which now works for any data type. (thank you @david-unergie)
- Ignore a
default()
value when it is a function. (thank you @mmed) - Added support for
joi.example()
(thank you @Siilwyn)
- BREAKING CHANGE: Now only supports node 8.9+ and Joi 13.x
- BREAKING CHANGE: J2S now outputs a
components
property instead ofdefinitions
. This contains sub-properties for schemas, properties, etc. By default, any component defined with aclassName
meta value will be put intoschemas
. This can be overridden with theclassTarget
meta value.
.label()
values are now parsed into thetitle
attribute. (Thank you @jimcatts)
- BREAKING CHANGE: J2S now outputs for OpenAPI v3 / Swagger 3 specification.
- Definitions are now targeted for
#/components/schemas/
(Thank you @pato1) - Nullable values now output the
nullable: true
attribute instead of passing the non-standard type array. (Thank you @pato1) - Regular expressions passed for matching on lower case and uppercase strings now omit opening and closing slashes. (Thank you @h2non)
- Definitions are now targeted for
- Added support for joi.forbidden() (Thank you @cjnqt)
- Fixed an undefined function error when an object definition lacked keys (Thank you @zcstarr)
- Added support for joi.when() (Thank you @buglavere)