Merge pull request #61 from matrix-org/markjh/node_swagger_validator

Only validate a file if it ends with ".yaml".
pull/977/head
Kegsay 9 years ago
commit ca9f30a7fd

@ -44,7 +44,8 @@ if (isDir) {
process.exit(1);
}
files.forEach(function(f) {
if (f.indexOf(".yaml") > 0) {
var suffix = ".yaml";
if (f.indexOf(suffix, f.length - suffix.length) > 0) {
parser.parse(path.join(opts.schema, f), function(err, api, metadata) {
if (!err) {
console.log("%s is valid.", f);

Loading…
Cancel
Save