mongoose-to-swagger icon indicating copy to clipboard operation
mongoose-to-swagger copied to clipboard

Allow required, description, and enum to be regular fields if their types are wrong

Open JulianKingman opened this issue 2 years ago • 0 comments

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

JulianKingman avatar Oct 27 '22 14:10 JulianKingman