Skip to content

Commit f8f3ead

Browse files
committed
fix schema
1 parent e3ab0b6 commit f8f3ead

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

src/components/ProductChangelog.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ if (!changelogs) {
9797
</div>
9898
);
9999
} else {
100-
description = marked.parse(entry.description);
100+
description = marked.parse(entry.description as string);
101101
return (
102102
<AnchorHeading depth={2} title={date} />
103103
<div data-product={entry.product.toLowerCase()}>

src/schemas/changelogs.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,11 @@ export const changelogsSchema = z.object({
1010
.object({
1111
publish_date: z.string(),
1212
title: z.string().optional(),
13+
description: z.string().optional(),
14+
individual_page: z.boolean().optional(),
15+
link: z.string().optional(),
1316
scheduled: z.boolean().optional(),
1417
scheduled_date: z.string().optional(),
1518
})
16-
.and(
17-
z
18-
.object({
19-
individual_page: z.boolean(),
20-
link: z.string(),
21-
})
22-
.or(
23-
z.object({
24-
description: z.string(),
25-
}),
26-
),
27-
)
2819
.array(),
2920
});

0 commit comments

Comments
 (0)