Logo
NeoArc Studio

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.

Entity Extends
Entities can extend other entities in the schema, inheriting properties and adding or overriding fields. This keeps shared structure in one place while allowing specialisation for different consumers.
Consumer-Selected Roots
Each consumer of the schema selects which entities are its root types rather than the schema dictating a single entry point. One type library serves multiple API operations with different root selections.
Reusable Type Definitions
Shared types are defined once and referenced by multiple API operations. When a shared type changes, every operation that references it stays in sync automatically.
Profile-Based Naming
A schema profile controls naming conventions (camelCase, PascalCase, snake_case) independently from the model. The same entities appear with different naming in different API contracts.

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.