Merge pull request #61 from matrix-org/markjh/node_swagger_validator
Only validate a file if it ends with ".yaml".
This commit is contained in:
commit
ca9f30a7fd
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue