You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 92d5d10
Browse filesBrowse the repository at this point in the historyBrowse files
// Base schema without refinements so it can be composed with `.pick()`, `.extend()`, etc.
164
+
// Zod v4 forbids `.pick()` on schemas containing refinements (`.check()`), so the
165
+
// refinements below are attached to `stixBundleSchema` rather than this base.
166
+
exportconststixBundleBaseSchema=z
164
167
.object({
165
168
id: createStixIdValidator('bundle'),
166
169
type: createStixTypeValidator('bundle'),
@@ -190,20 +193,21 @@ export const stixBundleSchema = z
190
193
description:
191
194
'A Bundle is a collection of arbitrary STIX Objects grouped together in a single container. A Bundle does not have any semantic meaning and the objects contained within the Bundle are not considered related by virtue of being in the same Bundle. A STIX Bundle Object is not a STIX Object but makes use of the type and id Common Properties.',
192
195
})
193
-
.strict()
194
-
.check((ctx)=>{
195
-
// Validate that the first object is 'x-mitre-collection' and only one collection exists
196
-
validateXMitreCollection()(ctx);
196
+
.strict();
197
197
198
-
// Validate that all IDs referenced in 'x_mitre_contents' are present in 'objects' array
0 commit comments