Home / Function/ spacecraft.schema() — astro Function Reference

spacecraft.schema() — astro Function Reference

Architecture documentation for the spacecraft.schema() function in content.config.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  8fa4e650_e620_5515_3f8d_28d097501298["spacecraft.schema()"]
  827521ed_ff30_2590_dc55_2526ca807403["content.config.ts"]
  8fa4e650_e620_5515_3f8d_28d097501298 -->|defined in| 827521ed_ff30_2590_dc55_2526ca807403
  style 8fa4e650_e620_5515_3f8d_28d097501298 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/integrations/cloudflare/test/fixtures/vite-plugin/src/content.config.ts lines 79–91

	schema: ({ image }) =>
		z.object({
			title: z.string(),
			description: z.string(),
			publishedDate: z.coerce.date(),
			tags: z.array(z.string()),
			heroImage: image().optional(),
			cat: reference('cats').prefault('siamese'),
			something: z
				.string()
				.optional()
				.transform((str) => ({ type: 'test', content: str })),
		}),

Domain

Subdomains

Frequently Asked Questions

What does spacecraft.schema() do?
spacecraft.schema() is a function in the astro codebase, defined in packages/integrations/cloudflare/test/fixtures/vite-plugin/src/content.config.ts.
Where is spacecraft.schema() defined?
spacecraft.schema() is defined in packages/integrations/cloudflare/test/fixtures/vite-plugin/src/content.config.ts at line 79.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free