Open ghost opened 8 years ago
Any thoughts about this? Would be much appreciated.
Sorry for the lack of response.
The problem here is that we are only using Joi behind the scenes. Swagger documents specify json-schema.
Perhaps we can support this through a vendor extension, i.e. x-joi-allowUnknown
or something like that.
We're also looking into moving away from Joi schemas for validation except for swaggerize-hapi
.
Either solution would be great... Looking forward to testing it out :-) P.S. sorry for not answering before
It would be nice to have the possibility to add JOI options override, so that, if present, the JOI.any.options would be overridden. This would make it possible to add options like "allowUnknown" as seen in the JOI API documentation.
This would of course need to be passed down through swaggerize-routes and enjoi.