Skip to content

Commit 2d36bb8

Browse files
committed
Update tests schema
Signed-off-by: Tushar Goel <[email protected]>
1 parent 07d9554 commit 2d36bb8

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

schemas/purl-test.schema.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,16 @@
128128
"string",
129129
"null"
130130
]
131+
},
132+
"expected_messages": {
133+
"title": "Expected messages",
134+
"description": "Validation messages expected for this test. Can be null or a list of strings.",
135+
"default": null,
136+
"type": ["null", "array"],
137+
"items": {
138+
"type": "string"
131139
}
140+
}
132141
},
133142
"allOf": [
134143
{
@@ -286,6 +295,31 @@
286295
"expected_failure_reason"
287296
]
288297
}
298+
},
299+
{
300+
"if": {
301+
"properties": {
302+
"test_type": { "const": "validation" }
303+
},
304+
"required": ["test_type"]
305+
},
306+
"then": {
307+
"properties": {
308+
"input": {
309+
"title": "Expected decoded PURL components",
310+
"description": "Test input as an object with decoded PURL components for validation.",
311+
"$ref": "#/definitions/purl_components"
312+
},
313+
"expected_messages": {
314+
"title": "Expected messages",
315+
"description": "Validation messages expected for this test. Can be null or a list of strings.",
316+
"default": null,
317+
"type": ["null", "array"],
318+
"items": { "type": "string" }
319+
}
320+
},
321+
"required": ["input"]
322+
}
289323
}
290324
]
291325
}

0 commit comments

Comments
 (0)