Open alanjames1987 opened 10 years ago
+1 would be amazing.
Todo:
It would be great if schema-validator could accept a Mongoose schema syntax so developers don't have to write two schemas. They can just copy paste.
If you use webpack/requirejs/mongoose you can share the exact same schema file! No need to copy paste
I am actually faced with this right now. I will see what I can do, the only issue is that custom types will not be supported.
Mongoose has a schema with additional syntax. It can define schemas without using a type attribute. It can use a type attribute also, but the point is that its not required.
Theses are the same in Mongoose.
I want to use schema-validator for validating objects received by socket.io before it sends them to another user. This is an area Mongoose can't validate as far as I know.
It would be great if schema-validator could accept a Mongoose schema syntax so developers don't have to write two schemas. They can just copy paste.