To generate a MongoDB schema validation script from your project, click the Script icon on the main toolbar. A preview of the script will appear in the modal form.
Click the Save Scripts button and select a location to save the files.

The Overwrite existing files option allows you to ignore existing scripts and overwrite them without displaying a warning.
For more information about MongoDB schema validation, visit
https://docs.mongodb.com/manual/core/schema-validation/
#