Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createJSONSchema(element, destFile) {
var args = {
useRef: true,
useTypeAliasRef: false,
useRootRef: false,
useTitle: false,
useDefaultProperties: false,
disableExtraProperties: true,
usePropertyOrder: false,
generateRequired: true,
out: undefined
};
args.out = destFile;
var definition = TJS.generateSchema(program, element, args);
grunt.file.write(destFile,JSON.stringify(definition, null, 4) + "\n" );
}
};