Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / schemaHash

Function: schemaHash() ​

ts
function schemaHash(schema): string;

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

schemaHash = sha256(JCS(canonicalize(schema))). Accepts the derived JSON Schema (or a boolean schema); pass undefined for "no schema declared".

Parameters ​

ParameterType
schema| boolean | JsonSchema | undefined

Returns ​

string