Skip to content

Commit 72d307f

Browse files
committed
Fixed JSON examples into spec path, added JSON test exclusions
1 parent a0cd3cf commit 72d307f

File tree

5 files changed

+11
-1
lines changed

5 files changed

+11
-1
lines changed

test/validate.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,19 @@ describe('JSON Samples', function() {
100100
before(function(done) {
101101
setupValidators(done);
102102
})
103+
exclusions = ["./examples/v2.0/json/petstore-separate/common/Error.json",
104+
"./examples/v2.0/json/petstore-separate/spec/NewPet.json",
105+
"./examples/v2.0/json/petstore-separate/spec/Pet.json",
106+
"./examples/v2.0/json/petstore-separate/spec/parameters.json"]
103107

104108
files = glob.sync("./examples/**/*.json")
105109
validators.forEach(function(validator) {
106110
files.forEach(function(file) {
107-
createJSONTest(file, validator);
111+
if (exclusions.indexOf(file) == -1) {
112+
createJSONTest(file, validator);
113+
} else {
114+
//TODO: validate separate schema files in exclusion list
115+
}
108116
})
109117
})
110118
})
@@ -123,6 +131,8 @@ describe('YAML Samples', function() {
123131
files.forEach(function(file) {
124132
if (exclusions.indexOf(file) == -1) {
125133
createYAMLTest(file, validator);
134+
} else {
135+
//TODO: validate separate schema files in exclusion list
126136
}
127137
})
128138
})

0 commit comments

Comments
 (0)