mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-20 16:38:37 +01:00
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
|
|
@ -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…
Reference in a new issue