@particle-academy/fancy-conformance 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERSION +1 -1
- package/package.json +1 -1
- package/suites/flow/workflow-props/cases.json +408 -76
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.9.
|
|
1
|
+
0.9.1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-academy/fancy-conformance",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Shared cross-language conformance fixtures for the Fancy suite. One contract, N implementations, and a single table that every implementation asserts in its own CI \u2014 so 'parity' is a test result rather than a claim. Ships the fixture data itself, so a Rust, Go or Python runner can consume it without a JavaScript toolchain.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -6,221 +6,553 @@
|
|
|
6
6
|
"id": "0001-supplied-value-passes-through",
|
|
7
7
|
"title": "A declared, supplied value arrives in the resolved map unchanged.",
|
|
8
8
|
"since": "0.9.0",
|
|
9
|
-
"tags": [
|
|
9
|
+
"tags": [
|
|
10
|
+
"happy-path"
|
|
11
|
+
],
|
|
10
12
|
"input": {
|
|
11
|
-
"declared": [
|
|
12
|
-
|
|
13
|
+
"declared": [
|
|
14
|
+
{
|
|
15
|
+
"name": "topic",
|
|
16
|
+
"type": "string"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"passed": {
|
|
20
|
+
"topic": "otters"
|
|
21
|
+
}
|
|
13
22
|
},
|
|
14
|
-
"expected": {
|
|
23
|
+
"expected": {
|
|
24
|
+
"ok": true,
|
|
25
|
+
"props": {
|
|
26
|
+
"topic": "otters"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
15
29
|
},
|
|
16
30
|
{
|
|
17
31
|
"id": "0002-default-fills-an-omitted-value",
|
|
18
32
|
"title": "An omitted input with a default resolves to the default.",
|
|
19
33
|
"since": "0.9.0",
|
|
20
|
-
"tags": [
|
|
34
|
+
"tags": [
|
|
35
|
+
"defaults"
|
|
36
|
+
],
|
|
21
37
|
"input": {
|
|
22
|
-
"declared": [
|
|
38
|
+
"declared": [
|
|
39
|
+
{
|
|
40
|
+
"name": "limit",
|
|
41
|
+
"type": "number",
|
|
42
|
+
"default": 10
|
|
43
|
+
}
|
|
44
|
+
],
|
|
23
45
|
"passed": {}
|
|
24
46
|
},
|
|
25
|
-
"expected": {
|
|
47
|
+
"expected": {
|
|
48
|
+
"ok": true,
|
|
49
|
+
"props": {
|
|
50
|
+
"limit": 10
|
|
51
|
+
}
|
|
52
|
+
}
|
|
26
53
|
},
|
|
27
54
|
{
|
|
28
55
|
"id": "0003-supplied-beats-default",
|
|
29
56
|
"title": "An explicitly supplied value wins over the declared default.",
|
|
30
57
|
"since": "0.9.0",
|
|
31
|
-
"tags": [
|
|
58
|
+
"tags": [
|
|
59
|
+
"defaults"
|
|
60
|
+
],
|
|
32
61
|
"input": {
|
|
33
|
-
"declared": [
|
|
34
|
-
|
|
62
|
+
"declared": [
|
|
63
|
+
{
|
|
64
|
+
"name": "limit",
|
|
65
|
+
"type": "number",
|
|
66
|
+
"default": 10
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"passed": {
|
|
70
|
+
"limit": 25
|
|
71
|
+
}
|
|
35
72
|
},
|
|
36
|
-
"expected": {
|
|
73
|
+
"expected": {
|
|
74
|
+
"ok": true,
|
|
75
|
+
"props": {
|
|
76
|
+
"limit": 25
|
|
77
|
+
}
|
|
78
|
+
}
|
|
37
79
|
},
|
|
38
80
|
{
|
|
39
81
|
"id": "0004-explicit-zero-is-not-replaced-by-a-default",
|
|
40
82
|
"title": "A supplied 0 survives a non-zero default.",
|
|
41
83
|
"since": "0.9.0",
|
|
42
|
-
"tags": [
|
|
84
|
+
"tags": [
|
|
85
|
+
"defaults",
|
|
86
|
+
"falsy",
|
|
87
|
+
"trap"
|
|
88
|
+
],
|
|
43
89
|
"input": {
|
|
44
|
-
"declared": [
|
|
45
|
-
|
|
90
|
+
"declared": [
|
|
91
|
+
{
|
|
92
|
+
"name": "limit",
|
|
93
|
+
"type": "number",
|
|
94
|
+
"default": 10
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"passed": {
|
|
98
|
+
"limit": 0
|
|
99
|
+
}
|
|
46
100
|
},
|
|
47
|
-
"expected": {
|
|
101
|
+
"expected": {
|
|
102
|
+
"ok": true,
|
|
103
|
+
"props": {
|
|
104
|
+
"limit": 0
|
|
105
|
+
}
|
|
106
|
+
}
|
|
48
107
|
},
|
|
49
108
|
{
|
|
50
109
|
"id": "0005-explicit-false-is-not-replaced-by-a-default",
|
|
51
110
|
"title": "A supplied false survives a true default.",
|
|
52
111
|
"since": "0.9.0",
|
|
53
|
-
"tags": [
|
|
112
|
+
"tags": [
|
|
113
|
+
"defaults",
|
|
114
|
+
"falsy",
|
|
115
|
+
"trap"
|
|
116
|
+
],
|
|
54
117
|
"input": {
|
|
55
|
-
"declared": [
|
|
56
|
-
|
|
118
|
+
"declared": [
|
|
119
|
+
{
|
|
120
|
+
"name": "dryRun",
|
|
121
|
+
"type": "boolean",
|
|
122
|
+
"default": true
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"passed": {
|
|
126
|
+
"dryRun": false
|
|
127
|
+
}
|
|
57
128
|
},
|
|
58
|
-
"expected": {
|
|
129
|
+
"expected": {
|
|
130
|
+
"ok": true,
|
|
131
|
+
"props": {
|
|
132
|
+
"dryRun": false
|
|
133
|
+
}
|
|
134
|
+
}
|
|
59
135
|
},
|
|
60
136
|
{
|
|
61
137
|
"id": "0006-explicit-empty-string-is-not-replaced-by-a-default",
|
|
62
138
|
"title": "A supplied empty string survives a non-empty default.",
|
|
63
139
|
"since": "0.9.0",
|
|
64
|
-
"tags": [
|
|
140
|
+
"tags": [
|
|
141
|
+
"defaults",
|
|
142
|
+
"falsy",
|
|
143
|
+
"trap"
|
|
144
|
+
],
|
|
65
145
|
"input": {
|
|
66
|
-
"declared": [
|
|
67
|
-
|
|
146
|
+
"declared": [
|
|
147
|
+
{
|
|
148
|
+
"name": "note",
|
|
149
|
+
"type": "string",
|
|
150
|
+
"default": "unset"
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"passed": {
|
|
154
|
+
"note": ""
|
|
155
|
+
}
|
|
68
156
|
},
|
|
69
|
-
"expected": {
|
|
157
|
+
"expected": {
|
|
158
|
+
"ok": true,
|
|
159
|
+
"props": {
|
|
160
|
+
"note": ""
|
|
161
|
+
}
|
|
162
|
+
}
|
|
70
163
|
},
|
|
71
164
|
{
|
|
72
165
|
"id": "0007-absent-optional-is-absent-not-null",
|
|
73
166
|
"title": "An optional input with no default and no value is missing from the map entirely.",
|
|
74
167
|
"since": "0.9.0",
|
|
75
|
-
"tags": [
|
|
168
|
+
"tags": [
|
|
169
|
+
"absence"
|
|
170
|
+
],
|
|
76
171
|
"input": {
|
|
77
172
|
"declared": [
|
|
78
|
-
{
|
|
79
|
-
|
|
173
|
+
{
|
|
174
|
+
"name": "topic",
|
|
175
|
+
"type": "string"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "note",
|
|
179
|
+
"type": "string"
|
|
180
|
+
}
|
|
80
181
|
],
|
|
81
|
-
"passed": {
|
|
182
|
+
"passed": {
|
|
183
|
+
"topic": "otters"
|
|
184
|
+
}
|
|
82
185
|
},
|
|
83
|
-
"expected": {
|
|
186
|
+
"expected": {
|
|
187
|
+
"ok": true,
|
|
188
|
+
"props": {
|
|
189
|
+
"topic": "otters"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
84
192
|
},
|
|
85
193
|
{
|
|
86
194
|
"id": "0008-untyped-declaration-accepts-anything",
|
|
87
195
|
"title": "An input declaring no type accepts a nested object.",
|
|
88
196
|
"since": "0.9.0",
|
|
89
|
-
"tags": [
|
|
197
|
+
"tags": [
|
|
198
|
+
"types"
|
|
199
|
+
],
|
|
90
200
|
"input": {
|
|
91
|
-
"declared": [
|
|
92
|
-
|
|
201
|
+
"declared": [
|
|
202
|
+
{
|
|
203
|
+
"name": "payload"
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"passed": {
|
|
207
|
+
"payload": {
|
|
208
|
+
"nested": [
|
|
209
|
+
1,
|
|
210
|
+
2
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
}
|
|
93
214
|
},
|
|
94
|
-
"expected": {
|
|
215
|
+
"expected": {
|
|
216
|
+
"ok": true,
|
|
217
|
+
"props": {
|
|
218
|
+
"payload": {
|
|
219
|
+
"nested": [
|
|
220
|
+
1,
|
|
221
|
+
2
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
95
226
|
},
|
|
96
227
|
{
|
|
97
228
|
"id": "0009-required-is-satisfied-by-its-default",
|
|
98
229
|
"title": "A required input carrying a default does not need the caller to supply it.",
|
|
99
230
|
"since": "0.9.0",
|
|
100
|
-
"tags": [
|
|
231
|
+
"tags": [
|
|
232
|
+
"required",
|
|
233
|
+
"defaults"
|
|
234
|
+
],
|
|
101
235
|
"input": {
|
|
102
|
-
"declared": [
|
|
236
|
+
"declared": [
|
|
237
|
+
{
|
|
238
|
+
"name": "limit",
|
|
239
|
+
"type": "number",
|
|
240
|
+
"required": true,
|
|
241
|
+
"default": 5
|
|
242
|
+
}
|
|
243
|
+
],
|
|
103
244
|
"passed": {}
|
|
104
245
|
},
|
|
105
|
-
"expected": {
|
|
246
|
+
"expected": {
|
|
247
|
+
"ok": true,
|
|
248
|
+
"props": {
|
|
249
|
+
"limit": 5
|
|
250
|
+
}
|
|
251
|
+
}
|
|
106
252
|
},
|
|
107
253
|
{
|
|
108
254
|
"id": "0010-array-satisfies-array-not-object",
|
|
109
255
|
"title": "A list satisfies a declared array.",
|
|
110
256
|
"since": "0.9.0",
|
|
111
|
-
"tags": [
|
|
257
|
+
"tags": [
|
|
258
|
+
"types",
|
|
259
|
+
"trap"
|
|
260
|
+
],
|
|
112
261
|
"input": {
|
|
113
|
-
"declared": [
|
|
114
|
-
|
|
262
|
+
"declared": [
|
|
263
|
+
{
|
|
264
|
+
"name": "tags",
|
|
265
|
+
"type": "array"
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
"passed": {
|
|
269
|
+
"tags": [
|
|
270
|
+
"a",
|
|
271
|
+
"b"
|
|
272
|
+
]
|
|
273
|
+
}
|
|
115
274
|
},
|
|
116
|
-
"expected": {
|
|
275
|
+
"expected": {
|
|
276
|
+
"ok": true,
|
|
277
|
+
"props": {
|
|
278
|
+
"tags": [
|
|
279
|
+
"a",
|
|
280
|
+
"b"
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
}
|
|
117
284
|
},
|
|
118
285
|
{
|
|
119
286
|
"id": "0011-object-satisfies-object",
|
|
120
287
|
"title": "A map satisfies a declared object.",
|
|
121
288
|
"since": "0.9.0",
|
|
122
|
-
"tags": [
|
|
289
|
+
"tags": [
|
|
290
|
+
"types"
|
|
291
|
+
],
|
|
123
292
|
"input": {
|
|
124
|
-
"declared": [
|
|
125
|
-
|
|
293
|
+
"declared": [
|
|
294
|
+
{
|
|
295
|
+
"name": "meta",
|
|
296
|
+
"type": "object"
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"passed": {
|
|
300
|
+
"meta": {
|
|
301
|
+
"k": "v"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
126
304
|
},
|
|
127
|
-
"expected": {
|
|
305
|
+
"expected": {
|
|
306
|
+
"ok": true,
|
|
307
|
+
"props": {
|
|
308
|
+
"meta": {
|
|
309
|
+
"k": "v"
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
128
313
|
},
|
|
129
314
|
{
|
|
130
315
|
"id": "0012-no-declaration-and-no-props",
|
|
131
316
|
"title": "A workflow that declares nothing, called with nothing, resolves to an empty map.",
|
|
132
317
|
"since": "0.9.0",
|
|
133
|
-
"tags": [
|
|
134
|
-
|
|
135
|
-
|
|
318
|
+
"tags": [
|
|
319
|
+
"happy-path",
|
|
320
|
+
"absence"
|
|
321
|
+
],
|
|
322
|
+
"input": {
|
|
323
|
+
"declared": null,
|
|
324
|
+
"passed": null
|
|
325
|
+
},
|
|
326
|
+
"expected": {
|
|
327
|
+
"ok": true,
|
|
328
|
+
"props": {}
|
|
329
|
+
}
|
|
136
330
|
},
|
|
137
331
|
{
|
|
138
332
|
"id": "0101-an-unknown-key-fails",
|
|
139
333
|
"title": "A misspelled input name FAILS rather than sitting unread.",
|
|
140
334
|
"since": "0.9.0",
|
|
141
|
-
"tags": [
|
|
335
|
+
"tags": [
|
|
336
|
+
"validation",
|
|
337
|
+
"regression",
|
|
338
|
+
"silent-failure"
|
|
339
|
+
],
|
|
142
340
|
"input": {
|
|
143
|
-
"declared": [
|
|
144
|
-
|
|
341
|
+
"declared": [
|
|
342
|
+
{
|
|
343
|
+
"name": "topic",
|
|
344
|
+
"type": "string"
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
"passed": {
|
|
348
|
+
"topik": "otters"
|
|
349
|
+
}
|
|
145
350
|
},
|
|
146
|
-
"expected": {
|
|
351
|
+
"expected": {
|
|
352
|
+
"ok": false,
|
|
353
|
+
"code": "unknown_input"
|
|
354
|
+
}
|
|
147
355
|
},
|
|
148
356
|
{
|
|
149
357
|
"id": "0102-props-passed-to-a-workflow-declaring-none-fails",
|
|
150
358
|
"title": "Passing anything to a workflow that declares no inputs FAILS.",
|
|
151
359
|
"since": "0.9.0",
|
|
152
|
-
"tags": [
|
|
360
|
+
"tags": [
|
|
361
|
+
"validation",
|
|
362
|
+
"silent-failure"
|
|
363
|
+
],
|
|
153
364
|
"input": {
|
|
154
365
|
"declared": null,
|
|
155
|
-
"passed": {
|
|
366
|
+
"passed": {
|
|
367
|
+
"topic": "otters"
|
|
368
|
+
}
|
|
156
369
|
},
|
|
157
|
-
"expected": {
|
|
370
|
+
"expected": {
|
|
371
|
+
"ok": false,
|
|
372
|
+
"code": "unknown_input"
|
|
373
|
+
}
|
|
158
374
|
},
|
|
159
375
|
{
|
|
160
376
|
"id": "0103-unknown-is-reported-before-missing-required",
|
|
161
377
|
"title": "A caller who misspells a required input is told about the word they typed.",
|
|
162
378
|
"since": "0.9.0",
|
|
163
|
-
"tags": [
|
|
379
|
+
"tags": [
|
|
380
|
+
"validation",
|
|
381
|
+
"ordering"
|
|
382
|
+
],
|
|
164
383
|
"input": {
|
|
165
|
-
"declared": [
|
|
166
|
-
|
|
384
|
+
"declared": [
|
|
385
|
+
{
|
|
386
|
+
"name": "topic",
|
|
387
|
+
"type": "string",
|
|
388
|
+
"required": true
|
|
389
|
+
}
|
|
390
|
+
],
|
|
391
|
+
"passed": {
|
|
392
|
+
"topik": "otters"
|
|
393
|
+
}
|
|
167
394
|
},
|
|
168
|
-
"expected": {
|
|
395
|
+
"expected": {
|
|
396
|
+
"ok": false,
|
|
397
|
+
"code": "unknown_input"
|
|
398
|
+
}
|
|
169
399
|
},
|
|
170
400
|
{
|
|
171
401
|
"id": "0104-missing-required-fails",
|
|
172
402
|
"title": "A required input with no default and no value FAILS.",
|
|
173
403
|
"since": "0.9.0",
|
|
174
|
-
"tags": [
|
|
404
|
+
"tags": [
|
|
405
|
+
"validation",
|
|
406
|
+
"required"
|
|
407
|
+
],
|
|
175
408
|
"input": {
|
|
176
|
-
"declared": [
|
|
409
|
+
"declared": [
|
|
410
|
+
{
|
|
411
|
+
"name": "topic",
|
|
412
|
+
"type": "string",
|
|
413
|
+
"required": true
|
|
414
|
+
}
|
|
415
|
+
],
|
|
177
416
|
"passed": {}
|
|
178
417
|
},
|
|
179
|
-
"expected": {
|
|
418
|
+
"expected": {
|
|
419
|
+
"ok": false,
|
|
420
|
+
"code": "missing_required"
|
|
421
|
+
}
|
|
180
422
|
},
|
|
181
423
|
{
|
|
182
424
|
"id": "0105-wrong-type-fails",
|
|
183
425
|
"title": "A string supplied where a number is declared FAILS.",
|
|
184
426
|
"since": "0.9.0",
|
|
185
|
-
"tags": [
|
|
427
|
+
"tags": [
|
|
428
|
+
"validation",
|
|
429
|
+
"types"
|
|
430
|
+
],
|
|
186
431
|
"input": {
|
|
187
|
-
"declared": [
|
|
188
|
-
|
|
432
|
+
"declared": [
|
|
433
|
+
{
|
|
434
|
+
"name": "limit",
|
|
435
|
+
"type": "number"
|
|
436
|
+
}
|
|
437
|
+
],
|
|
438
|
+
"passed": {
|
|
439
|
+
"limit": "ten"
|
|
440
|
+
}
|
|
189
441
|
},
|
|
190
|
-
"expected": {
|
|
442
|
+
"expected": {
|
|
443
|
+
"ok": false,
|
|
444
|
+
"code": "type_mismatch"
|
|
445
|
+
}
|
|
191
446
|
},
|
|
192
447
|
{
|
|
193
448
|
"id": "0106-object-does-not-satisfy-array",
|
|
194
449
|
"title": "A map supplied where an array is declared FAILS.",
|
|
195
450
|
"since": "0.9.0",
|
|
196
|
-
"tags": [
|
|
451
|
+
"tags": [
|
|
452
|
+
"validation",
|
|
453
|
+
"types",
|
|
454
|
+
"trap"
|
|
455
|
+
],
|
|
197
456
|
"input": {
|
|
198
|
-
"declared": [
|
|
199
|
-
|
|
457
|
+
"declared": [
|
|
458
|
+
{
|
|
459
|
+
"name": "tags",
|
|
460
|
+
"type": "array"
|
|
461
|
+
}
|
|
462
|
+
],
|
|
463
|
+
"passed": {
|
|
464
|
+
"tags": {
|
|
465
|
+
"0": "a"
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
"expected": {
|
|
470
|
+
"ok": false,
|
|
471
|
+
"code": "type_mismatch"
|
|
200
472
|
},
|
|
201
|
-
"
|
|
473
|
+
"skip": {
|
|
474
|
+
"php": "Not representable in PHP. `json_decode('{\"0\":\"a\"}', true)` coerces the numeric STRING key to int 0, producing a list -- so the map this case describes cannot exist on that runtime and `array_is_list` correctly reports a list. The rule itself is pinned for every runtime by 0109, which uses a non-numeric key."
|
|
475
|
+
},
|
|
476
|
+
"notes": "Kept rather than rewritten because the divergence is worth recording: a JS host and a PHP host genuinely disagree about this value, and the reason is PHP's key coercion rather than either implementation being wrong."
|
|
202
477
|
},
|
|
203
478
|
{
|
|
204
479
|
"id": "0107-array-does-not-satisfy-object",
|
|
205
480
|
"title": "A list supplied where an object is declared FAILS.",
|
|
206
481
|
"since": "0.9.0",
|
|
207
|
-
"tags": [
|
|
482
|
+
"tags": [
|
|
483
|
+
"validation",
|
|
484
|
+
"types",
|
|
485
|
+
"trap"
|
|
486
|
+
],
|
|
208
487
|
"input": {
|
|
209
|
-
"declared": [
|
|
210
|
-
|
|
488
|
+
"declared": [
|
|
489
|
+
{
|
|
490
|
+
"name": "meta",
|
|
491
|
+
"type": "object"
|
|
492
|
+
}
|
|
493
|
+
],
|
|
494
|
+
"passed": {
|
|
495
|
+
"meta": [
|
|
496
|
+
"a"
|
|
497
|
+
]
|
|
498
|
+
}
|
|
211
499
|
},
|
|
212
|
-
"expected": {
|
|
500
|
+
"expected": {
|
|
501
|
+
"ok": false,
|
|
502
|
+
"code": "type_mismatch"
|
|
503
|
+
}
|
|
213
504
|
},
|
|
214
505
|
{
|
|
215
506
|
"id": "0108-null-does-not-satisfy-a-declared-type",
|
|
216
507
|
"title": "An explicit null supplied where a string is declared FAILS.",
|
|
217
508
|
"since": "0.9.0",
|
|
218
|
-
"tags": [
|
|
509
|
+
"tags": [
|
|
510
|
+
"validation",
|
|
511
|
+
"types"
|
|
512
|
+
],
|
|
219
513
|
"input": {
|
|
220
|
-
"declared": [
|
|
221
|
-
|
|
514
|
+
"declared": [
|
|
515
|
+
{
|
|
516
|
+
"name": "topic",
|
|
517
|
+
"type": "string"
|
|
518
|
+
}
|
|
519
|
+
],
|
|
520
|
+
"passed": {
|
|
521
|
+
"topic": null
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
"expected": {
|
|
525
|
+
"ok": false,
|
|
526
|
+
"code": "type_mismatch"
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
"id": "0109-a-string-keyed-map-does-not-satisfy-array",
|
|
531
|
+
"title": "A map with a non-numeric key supplied where an array is declared FAILS.",
|
|
532
|
+
"since": "0.9.1",
|
|
533
|
+
"tags": [
|
|
534
|
+
"validation",
|
|
535
|
+
"types",
|
|
536
|
+
"trap"
|
|
537
|
+
],
|
|
538
|
+
"notes": "The runnable half of 0106. A non-numeric key survives json_decode on PHP as a string-keyed array, so `array_is_list` reports false and every runtime agrees. This is the case that actually pins object-is-not-array across all three.",
|
|
539
|
+
"input": {
|
|
540
|
+
"declared": [
|
|
541
|
+
{
|
|
542
|
+
"name": "tags",
|
|
543
|
+
"type": "array"
|
|
544
|
+
}
|
|
545
|
+
],
|
|
546
|
+
"passed": {
|
|
547
|
+
"tags": {
|
|
548
|
+
"a": 1
|
|
549
|
+
}
|
|
550
|
+
}
|
|
222
551
|
},
|
|
223
|
-
"expected": {
|
|
552
|
+
"expected": {
|
|
553
|
+
"ok": false,
|
|
554
|
+
"code": "type_mismatch"
|
|
555
|
+
}
|
|
224
556
|
}
|
|
225
557
|
]
|
|
226
558
|
}
|