tlivings / enjoi

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

Resolving of `not` is incorrect #97

Closed yehtutlwin closed 3 years ago

yehtutlwin commented 4 years ago

Currently, the not resolution assumes that it is an array https://github.com/tlivings/enjoi/blob/abdd7052c612f46c32e9a5a03da4b4714b9b6fe2/lib/resolver.js#L195-L201

However, according to OAS, not is an object, not an array. (https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/)