-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtestsuite.schema.json
56 lines (56 loc) · 1.53 KB
/
testsuite.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Test cases for OData ABNF",
"type": "object",
"additionalProperties": false,
"properties": {
"Constraints": {
"type": "object",
"description": "Constraints on matches for rules",
"patternProperties": {
"^[a-zA-Z][a-zA-Z0-9\\-]*$": {
"type": "array",
"description": "Allowed matches for a rule",
"items": {
"type": "string"
}
}
}
},
"TestCases": {
"type": "array",
"description": "List of Test Cases",
"items": {
"type": "object",
"description": "Test Case",
"additionalProperties": false,
"required": ["Name", "Rule", "Input"],
"properties": {
"Name": {
"type": "string",
"description": "Short description of test case"
},
"Rule": {
"type": "string",
"description": "Rule to test",
"pattern": "^[a-zA-Z][a-zA-Z0-9\\-]*$"
},
"Input": {
"type": "string",
"description": "Text to match against rule"
},
"FailAt": {
"type": "integer",
"description": "Position where match is expected to fail",
"minimum": 0
},
"Expect": {
"type": "array",
"description": "List of parsed tokens in format ruleName:matchedText",
"items": { "type": "string" }
}
}
}
}
}
}