Skip to content

Commit d90c046

Browse files
committed
style: apply formatting
1 parent ba6008e commit d90c046

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

src/schemas/common/property-schemas/generics.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ export const nonEmptyRequiredString = z
4040
* stixListOfString.parse(["foo", ""]); // throws error
4141
* ```
4242
*/
43-
export const stixListOfString = z
44-
.array(nonEmptyRequiredString)
45-
.min(1, {
46-
error:
43+
export const stixListOfString = z.array(nonEmptyRequiredString).min(1, {
44+
error:
4745
'Empty lists are prohibited in STIX and MUST NOT be used as a substitute for omitting the property if it is optional. The list MUST be present and MUST have at least one value.',
48-
});
46+
});

src/schemas/common/property-schemas/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@ export * from './stix-open-vocabulary.js';
2121
export * from './stix-timestamp.js';
2222
export * from './stix-type.js';
2323
export * from './stix-versioning.js';
24-

src/schemas/common/stix-core.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ const stixBaseObjectSchema = z
3333
'The modified property represents the time that this particular version of the object was modified. The timstamp value MUST be precise to the nearest millisecond.',
3434
}),
3535
created_by_ref: stixCreatedByRefSchema.optional(),
36-
labels: stixListOfString
37-
.optional()
38-
.meta({ description: 'The labels property specifies a set of terms used to meta this object.' }),
36+
labels: stixListOfString.optional().meta({
37+
description: 'The labels property specifies a set of terms used to meta this object.',
38+
}),
3939
revoked: z
4040
.boolean()
4141
.optional()

src/schemas/sdo/malware.schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
MalwareTypeOV,
1515
ProcessorArchitectureOV,
1616
stixListOfString,
17-
stixTimestampSchema
17+
stixTimestampSchema,
1818
} from '../common/property-schemas/index.js';
1919
import { softwareSchema } from './software.schema.js';
2020

0 commit comments

Comments
 (0)