mongoose-to-swagger
mongoose-to-swagger copied to clipboard
Allow required, description, and enum to be regular fields if their types are wrong
Would you accept this PR if I added some tests and removed the preinstall step?
The idea here is to not set the meta fields unless they're of a type that it's expecting, effectively allowing mongoose fields called required
, description
(quite common), or enum
.
I'm not 100% sure this is the best way to do it, but it works 🤷
This would fix this issue: https://github.com/giddyinc/mongoose-to-swagger/issues/36