Skip to content

Commit cd92a24

Browse files
committed
Exclude independent schema files from swagger validation
1 parent 67a2786 commit cd92a24

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/validate.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,17 @@ describe('YAML Samples', function() {
113113
before(function(done) {
114114
setupValidators(done);
115115
})
116+
exclusions = ["./examples/v2.0/yaml/petstore-separate/common/Error.yaml",
117+
"./examples/v2.0/yaml/petstore-separate/spec/NewPet.yaml",
118+
"./examples/v2.0/yaml/petstore-separate/spec/Pet.yaml",
119+
"./examples/v2.0/yaml/petstore-separate/spec/parameters.yaml"]
120+
116121
files = glob.sync("./examples/**/*.yaml")
117122
validators.forEach(function(validator) {
118123
files.forEach(function(file) {
119-
createYAMLTest(file, validator);
124+
if (exclusions.indexOf(file) == -1) {
125+
createYAMLTest(file, validator);
126+
}
120127
})
121128
})
122129
})

0 commit comments

Comments
 (0)