Skip to main content

Function: buildSchema()

buildSchema(ref, data, templates): Schema

Defined in: packages/core/src/domain/services/build-schema.ts:455

Constructs a fully-typed Schema from validated intermediate data and pre-loaded template contents.

Pure function — performs no I/O. All semantic validation (duplicate IDs, dependency graph, ID format) happens here.

Parameters​

ref​

string

The schema reference for error messages

data​

SchemaYamlData

The validated intermediate data from YAML parsing

templates​

ReadonlyMap<string, string>

Map from template relative path to file content

Returns​

Schema

A fully-constructed Schema instance

Throws​

SchemaValidationError When semantic validation fails