Skip to content

Commit d9c0cbf

Browse files
committed
fix(matrix.schema): check for non-empty condition in tactic_refs
1 parent c407718 commit d9c0cbf

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/schemas/sdo/matrix.schema.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ import { createStixTypeValidator } from '../common/stix-type.js';
1515
//
1616
/////////////////////////////////////
1717

18-
export const xMitreTacticRefsSchema = z.array(createStixIdValidator('x-mitre-tactic')).meta({
19-
description:
20-
'An ordered list of x-mitre-tactic STIX IDs corresponding to the tactics of the matrix. The order determines the appearance within the matrix.',
21-
});
18+
export const xMitreTacticRefsSchema = z
19+
.array(createStixIdValidator('x-mitre-tactic'))
20+
.nonempty()
21+
.meta({
22+
description:
23+
'An ordered list of x-mitre-tactic STIX IDs corresponding to the tactics of the matrix. The order determines the appearance within the matrix.',
24+
});
2225

2326
export type XMitreTacticRefs = z.infer<typeof xMitreTacticRefsSchema>;
2427

0 commit comments

Comments
 (0)