@cfworker/json-schema
Version:
A JSON schema validator that will run on Cloudflare workers. Supports drafts 4, 7, 2019-09, and 2020-12.
14 lines (13 loc) • 435 B
TypeScript
import { Schema, SchemaDraft, ValidationResult } from './types.js';
export type Evaluated = Record<string | number, boolean>;
export declare function validate(
instance: any,
schema: Schema | boolean,
draft?: SchemaDraft,
lookup?: Record<string, Schema | boolean>,
shortCircuit?: boolean,
recursiveAnchor?: Schema | null,
instanceLocation?: string,
schemaLocation?: string,
evaluated?: Evaluated
): ValidationResult;