Skip to content

Commit f605d9a

Browse files
authored
Merge pull request #177 from shrinishLT/DOT-4258
Add ignoreType in schema validation
2 parents a41b28e + 20d0b0b commit f605d9a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/lib/schemaValidation.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,15 @@ const SnapshotSchema: JSONSchemaType<Snapshot> = {
294294
},
295295
}
296296
},
297+
ignoreType:{
298+
type: "array",
299+
items: { type: "string", minLength: 1,
300+
enum: ["default", "layout", "images", "text", "colors", "dimensions", "position", "structure"],
301+
errorMessage: "Invalid snapshot options;ignoreType cannot be empty"
302+
},
303+
uniqueItems: true,
304+
errorMessage: "Invalid snapshot options; ignoreType must be an array of unique values from default, layout, images, text, colors, dimensions, position, structure"
305+
},
297306
web: {
298307
type: "object",
299308
properties: {

0 commit comments

Comments
 (0)