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
  df4b0ca0_ff64_1345_f91c_14ae0008739c["spacecraft.schema()"]
  417a2168_7db3_8ba7_a451_05ede087524a["content.config.ts"]
  df4b0ca0_ff64_1345_f91c_14ae0008739c -->|defined in| 417a2168_7db3_8ba7_a451_05ede087524a
  style df4b0ca0_ff64_1345_f91c_14ae0008739c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/e2e/fixtures/cloudflare/src/content.config.ts lines 80–92

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

Subdomains

Frequently Asked Questions

What does spacecraft.schema() do?
spacecraft.schema() is a function in the astro codebase, defined in packages/astro/e2e/fixtures/cloudflare/src/content.config.ts.
Where is spacecraft.schema() defined?
spacecraft.schema() is defined in packages/astro/e2e/fixtures/cloudflare/src/content.config.ts at line 80.

Analyze Your Own Codebase

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

Try Supermodel Free