• Canonicalization contract for schemaFingerprint:

    1. Normalize $defs → definitions (Graviola convention).
    2. Recursively sort object keys lexicographically at every level.
    3. Preserve array element order (required, enum, allOf order are semantic).
    4. Exclude top-level version and $schema from the hashed payload.
    5. $ref strings are normalized only indirectly via defs→definitions rename; callers should use consistent ref targets before fingerprinting.

    The fingerprint is stable across property order permutations on the same schema.

    Parameters

    • schema: JSONSchema7

    Returns JSONSchema7