Schema Projections
Schema projections define API contract type libraries with entity inheritance, consumer-selected root types, and reusable type definitions.
Type Libraries for API Contracts
Schema projections serve a different purpose from data projections. Where a data projection transforms entities for a specific database, a schema projection defines a library of types that API endpoints and consumers can select from. The result is a clean separation between how data is stored and how it is exposed to external systems.
How Schema Projections Differ
Data projections transform for storage. Schema projections transform for consumption. A database projection might flatten a nested structure into multiple tables with foreign keys. A schema projection might compose multiple entities into a rich response type with embedded objects. The intent is different, and the tooling reflects that difference.