summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/quiet-actors-agree.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/.changeset/quiet-actors-agree.md b/.changeset/quiet-actors-agree.md
new file mode 100644
index 000000000..48730ebf0
--- /dev/null
+++ b/.changeset/quiet-actors-agree.md
@@ -0,0 +1,20 @@
+---
+'astro': minor
+---
+
+Allow Zod objects, unions, discriminated unions, intersections, and transform results as content collection schemas.
+
+#### Migration
+
+Astro requires a `z.object(...)` wrapper on all content collection schemas. Update your content collections config like so:
+
+```diff
+// src/content/config.ts
+import { z, defineCollection } from 'astro:content';
+
+const blog = defineCollection({
+- schema: {
++ schema: z.object({
+ ...
+})
+```