Skip to content

rulvar API reference


rulvar API reference / @rulvar/core / canonicalizeSchema

Function: canonicalizeSchema()

ts
function canonicalizeSchema(schema): JsonSchema;

Defined in: packages/core/src/l0/schema.ts:309

Canonical schema derivation: local fragment-only $ref inlined (recursion is a ConfigError), remote and dynamic references forbidden, annotation keywords stripped (format retained), reference infrastructure ($defs, definitions, $anchor) removed once inlined. The result feeds JCS serialization and sha256.

Parameters

ParameterType
schemaJsonSchema

Returns

JsonSchema