Skip to content

rulvar API reference


rulvar API reference / @rulvar/rulvar / canonicalizeSchema

Function: canonicalizeSchema()

ts
function canonicalizeSchema(schema): JsonSchema;

Defined in: packages/core/dist/index.d.ts

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