-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconformance-suite.schema.json
More file actions
158 lines (158 loc) · 4.88 KB
/
conformance-suite.schema.json
File metadata and controls
158 lines (158 loc) · 4.88 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://formspec.org/schemas/conformance-suite/1.0",
"title": "Formspec Shared Conformance Suite Case",
"description": "Canonical shared-case contract for cross-runtime conformance checks executed by both Python and TypeScript runners.",
"$defs": {
"standardValidationCode": {
"type": "string",
"enum": [
"REQUIRED",
"TYPE_MISMATCH",
"MIN_REPEAT",
"MAX_REPEAT",
"CONSTRAINT_FAILED",
"PATTERN_MISMATCH",
"MAX_LENGTH_EXCEEDED",
"RANGE_UNDERFLOW",
"RANGE_OVERFLOW",
"SHAPE_FAILED",
"UNRESOLVED_EXTENSION",
"EXTENSION_COMPATIBILITY_MISMATCH",
"EXTENSION_RETIRED",
"EXTENSION_DEPRECATED"
],
"description": "Standard validation result codes that both Python and TypeScript runtimes MUST emit identically. The first seven are reserved built-in codes from validation-result.schema.json. The remaining are registry extension codes. Shape-level and external codes (e.g., 'BUDGET_SUM_MISMATCH', 'EIN_NOT_FOUND') are user-defined and not constrained here."
}
},
"type": "object",
"additionalProperties": false,
"required": ["id", "kind", "expected", "legacyCoverage"],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"pattern": "^[a-z0-9][a-z0-9._-]*$",
"description": "Stable, unique case identifier."
},
"kind": {
"type": "string",
"enum": [
"FEL_EVALUATION",
"ENGINE_PROCESSING",
"VALIDATION_REPORT",
"RESPONSE_VALIDATION"
],
"description": "Execution mode for this case."
},
"definitionPath": {
"type": "string",
"minLength": 1,
"description": "Repository-relative path to the form definition fixture."
},
"registryPaths": {
"type": "array",
"items": { "type": "string", "minLength": 1 },
"minItems": 1,
"description": "Optional repository-relative registry fixtures to load."
},
"payloadPath": {
"type": "string",
"minLength": 1,
"description": "Repository-relative path to the input payload fixture."
},
"inputData": {
"description": "Inline input payload."
},
"mode": {
"type": "string",
"enum": ["continuous", "submit"],
"description": "Validation mode to run for processing/report/response kinds."
},
"skipScreener": {
"type": "boolean",
"description": "When true, runners should skip screener entry before evaluating the main definition."
},
"expression": {
"type": "string",
"minLength": 1,
"description": "FEL expression for FEL_EVALUATION cases."
},
"comparator": {
"type": "string",
"enum": ["exact", "normalized", "tolerant-decimal"],
"description": "Comparison strategy for FEL_EVALUATION cases."
},
"fields": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["key"],
"properties": {
"key": { "type": "string", "minLength": 1 },
"dataType": { "type": "string", "minLength": 1 },
"value": {}
}
},
"description": "Field declarations and values for FEL_EVALUATION cases."
},
"compareResponseData": {
"type": "boolean",
"description": "When true, RESPONSE_VALIDATION compares normalized response.data in addition to validation artifacts."
},
"expected": {
"type": "object",
"description": "Canonical expected output after shared normalization."
},
"legacyCoverage": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["path", "check"],
"properties": {
"path": {
"type": "string",
"minLength": 1,
"description": "Repository-relative path of the replaced legacy test surface."
},
"check": {
"type": "string",
"minLength": 1,
"description": "Legacy test id/name/check this case replaces."
}
}
},
"description": "Explicit mapping of this shared case to replaced legacy checks."
}
},
"allOf": [
{
"if": {
"properties": { "kind": { "const": "FEL_EVALUATION" } },
"required": ["kind"]
},
"then": {
"required": ["expression", "comparator"],
"properties": {
"fields": { "type": "array" }
}
}
},
{
"if": {
"properties": { "kind": { "enum": ["ENGINE_PROCESSING", "VALIDATION_REPORT", "RESPONSE_VALIDATION"] } },
"required": ["kind"]
},
"then": {
"required": ["definitionPath"],
"oneOf": [
{ "required": ["payloadPath"] },
{ "required": ["inputData"] }
]
}
}
]
}