Use Moon Modeler data modeling tool to generate validation and
creation scripts for MongoDB or Mongoose along with other options, to preview
the code formatted and with syntax highlighting and to save the generated code for the
entire data model or just one selected MongoDB
collection.
Wait, the Moon Modeler isn't limited to the generation of schema validation scripts!
With custom templates, you can create snippets of application code, JavaScript files
etc.
Read about custom templates
and scripts