From 81d89543f148350e21831fe901fbcd93581a83f7 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Mon, 15 Feb 2021 19:05:16 +0000 Subject: [PATCH] do not change definitions to defs, issue ajv-validator/ajv-cli#112 --- spec/fixtures/expected-schema-from-draft-04-to-2019.json | 2 +- src/index.ts | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/spec/fixtures/expected-schema-from-draft-04-to-2019.json b/spec/fixtures/expected-schema-from-draft-04-to-2019.json index edd37f8..995c0c1 100644 --- a/spec/fixtures/expected-schema-from-draft-04-to-2019.json +++ b/spec/fixtures/expected-schema-from-draft-04-to-2019.json @@ -1,7 +1,7 @@ { "$id": "my-schema", "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { + "definitions": { "str": { "$anchor": "str", "type": "string" diff --git a/src/index.ts b/src/index.ts index db9cf42..639b947 100644 --- a/src/index.ts +++ b/src/index.ts @@ -87,9 +87,6 @@ export function getAjv(): Ajv { : $schema break } - case "definitions": - dataSchema[version === "draft7" ? "definitions" : "$defs"] = dsCopy.definitions - break case "constant": dataSchema.const = dsCopy.constant break