Skip to content

Commit 68626ce

Browse files
[9.2] 🌊 Streams simulation API: relax validation (#239856)
Manual backport of #239851 --------- Co-authored-by: kibanamachine <[email protected]>
1 parent e6ee46a commit 68626ce

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

‎oas_docs/bundle.json‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53990,6 +53990,10 @@
5399053990
},
5399153991
"type": "array"
5399253992
},
53993+
{
53994+
"items": {},
53995+
"type": "array"
53996+
},
5399353997
{}
5399453998
]
5399553999
},
@@ -60837,6 +60841,10 @@
6083760841
},
6083860842
"type": "array"
6083960843
},
60844+
{
60845+
"items": {},
60846+
"type": "array"
60847+
},
6084060848
{}
6084160849
]
6084260850
},
@@ -67955,6 +67963,10 @@
6795567963
},
6795667964
"type": "array"
6795767965
},
67966+
{
67967+
"items": {},
67968+
"type": "array"
67969+
},
6795867970
{}
6795967971
]
6796067972
},
@@ -71145,6 +71157,10 @@
7114571157
},
7114671158
"type": "array"
7114771159
},
71160+
{
71161+
"items": {},
71162+
"type": "array"
71163+
},
7114871164
{}
7114971165
]
7115071166
},

‎oas_docs/output/kibana.yaml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59345,6 +59345,8 @@ paths:
5934559345
nullable: true
5934659346
- not: {}
5934759347
type: array
59348+
- items: {}
59349+
type: array
5934859350
- {}
5934959351
type: object
5935059352
- anyOf:
@@ -62889,6 +62891,8 @@ paths:
6288962891
nullable: true
6289062892
- not: {}
6289162893
type: array
62894+
- items: {}
62895+
type: array
6289262896
- {}
6289362897
type: object
6289462898
- anyOf:
@@ -66650,6 +66654,8 @@ paths:
6665066654
nullable: true
6665166655
- not: {}
6665266656
type: array
66657+
- items: {}
66658+
type: array
6665366659
- {}
6665466660
type: object
6665566661
- anyOf:
@@ -68296,6 +68302,8 @@ paths:
6829668302
nullable: true
6829768303
- not: {}
6829868304
type: array
68305+
- items: {}
68306+
type: array
6829968307
- {}
6830068308
type: object
6830168309
- anyOf:

‎x-pack/platform/packages/shared/kbn-streams-schema/src/shared/record_types.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ export const primitive: z.ZodType<Primitive> = z.union([
1818
]);
1919

2020
export interface RecursiveRecord {
21-
[key: PropertyKey]: Primitive | Primitive[] | RecursiveRecord;
21+
[key: PropertyKey]: Primitive | Primitive[] | unknown[] | RecursiveRecord;
2222
}
2323

2424
export const recursiveRecord: z.ZodType<RecursiveRecord> = z.lazy(() =>
25-
z.record(z.union([primitive, z.array(primitive), recursiveRecord]))
25+
z.record(z.union([primitive, z.array(primitive), z.array(z.unknown()), recursiveRecord]))
2626
);
2727

28-
export type FlattenRecord = Record<PropertyKey, Primitive | Primitive[]>;
28+
export type FlattenRecord = Record<PropertyKey, Primitive | Primitive[] | unknown[]>;
2929

3030
export const flattenRecord: z.ZodType<FlattenRecord> = z.record(
31-
z.union([primitive, z.array(primitive)])
31+
z.union([primitive, z.array(primitive), z.array(z.unknown())])
3232
);
3333

3434
export const sampleDocument = recursiveRecord;

0 commit comments

Comments
 (0)