krakenjs / swaggerize-express

Design-driven apis with swagger 2.0 and express.
Other
354 stars 81 forks source link

Override JOI options feature request #95

Open ghost opened 8 years ago

ghost commented 8 years ago

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.

ghost commented 8 years ago

Any thoughts about this? Would be much appreciated.

tlivings commented 8 years ago

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.

ghost commented 8 years ago

Either solution would be great... Looking forward to testing it out :-) P.S. sorry for not answering before