INNER CODE UNIT · TypeScript
makeAjv
x-cmd/x-cmd · mod/ajv/lib/ajv.ts:189
function makeAjv(_draft: string | undefined): Ajv {
const ajv = new Ajv({ allErrors: true, strict: false, verbose: true });
try {
addFormats(ajv);
} catch {
// ajv-formats may not match a non-07 draft; ignore.
}
return ajv;
}
// ---------------------------------------------------------------------------
// Schema migration
// ---------------------------------------------------------------------------
const DRAFTS = [
"http://json-schema.org/draft-04/schema#",
"http://json-schema.org/draft-06/schema#",
"http://json-schema.org/draft-07/schema#",