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

Required Validators On Nested Objects was not working properly

Open simonjoom opened this issue 7 years ago • 0 comments

-> Required Validators On Nested Objects fixed with required on nested object i had a error from mongoose:: /Cannot.*'required'/ As well i could enter any object when i create the validation of schema is not working.

See http://mongoosejs.com/docs/validation.html Chapitre: « Required Validators On Nested Objects »

The return getSchema isn't a full fledged path , need to use a single nested schema else the user can enter any schema object the validation will pass (mongoose will comporte as a type Mixed. Solution: Fixed properly validation check with nested object process ref should to return a type to a Object mongoose.schema and not a simple javascript object.

there is as well different bug fixed Was tested with last swagger.

simonjoom avatar May 13 '17 17:05 simonjoom