From 2d2e8911fbc8024a8620060d2c916ae0cf7c77c9 Mon Sep 17 00:00:00 2001 From: Suprith KG Date: Fri, 16 Aug 2024 23:40:19 +0530 Subject: [PATCH 1/2] Ad ref case for Draft3 to Draft4 transform --- ...001-ref-and-adjecent-keywords-present.json | 10 ++++++ .../to-draft4/002-ref-and-x-ref-present.json | 10 ++++++ ...003-correct-sideeffects-ref-transform.json | 9 ++++++ ... 004-unknown-in-previous-draft-anyOf.json} | 0 ...unknown-in-previous-draft-multipleOf.json} | 0 ... 005-unknown-in-previous-draft-allOf.json} | 0 ... 006-unknown-in-previous-draft-oneOf.json} | 0 ...=> 007-unknown-in-previous-draft-not.json} | 0 ...nknown-in-previous-draft-definitions.json} | 0 ...nown-in-previous-draft-maxProperties.json} | 0 ...nown-in-previous-draft-minProperties.json} | 0 .../{009-schema.json => 011-schema.json} | 0 ...son => 012-type-has-value-equals-any.json} | 0 ...son => 013-type-has-any-in-its-array.json} | 0 ...one-object-in-its-array-anyOf-absent.json} | 0 ...-and-strings-in-its-array-initialize.json} | 0 ...has-objects-and-strings-in-its-array.json} | 0 ...=> 017-type-has-objects-in-its-array.json} | 0 ...y.json => 018-type-is-an-empty-array.json} | 0 ...=> 019-disallow-has-value-equals-any.json} | 0 ...object-in-its-array-initialize-allOf.json} | 0 ...-has-atleast-one-object-in-its-array.json} | 0 ...=> 022-disallow-has-any-in-its-array.json} | 0 ...is-an-array-of-strings-allOf-present.json} | 0 ...-is-an-array-of-strings-allOf-absent.json} | 0 ...on => 025-disallow-is-an-empty-array.json} | 0 ...pendencies-children-have-type-string.json} | 0 ...-divisiblyBy.json => 027-divisiblyBy.json} | 0 ...028-extends-is-an-array-allOf-absent.json} | 2 +- ...29-extends-is-an-array-allOf-present.json} | 0 ...30-extends-is-an-object-allOf-absent.json} | 0 ...1-extends-is-an-object-allOf-present.json} | 0 ...rray.json => 032-empty-extends-array.json} | 0 ...false-present-in-properties's-values.json} | 0 ...-required-is-present-in-outer-schema.json} | 0 ...sent-and-required-true-in-properties.json} | 0 ...-true-present-in-properties's-values.json} | 0 ...empty-required-array-in-outer-schema.json} | 0 test/from-draft3/to-draft4/ref.json | 31 +++++++++++++++++++ 39 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 rules/from-draft3/to-draft4/001-ref-and-adjecent-keywords-present.json create mode 100644 rules/from-draft3/to-draft4/002-ref-and-x-ref-present.json create mode 100644 rules/from-draft3/to-draft4/003-correct-sideeffects-ref-transform.json rename rules/from-draft3/to-draft4/{002-unknown-in-previous-draft-anyOf.json => 004-unknown-in-previous-draft-anyOf.json} (100%) rename rules/from-draft3/to-draft4/{001-unknown-in-previous-draft-multipleOf.json => 004-unknown-in-previous-draft-multipleOf.json} (100%) rename rules/from-draft3/to-draft4/{003-unknown-in-previous-draft-allOf.json => 005-unknown-in-previous-draft-allOf.json} (100%) rename rules/from-draft3/to-draft4/{004-unknown-in-previous-draft-oneOf.json => 006-unknown-in-previous-draft-oneOf.json} (100%) rename rules/from-draft3/to-draft4/{005-unknown-in-previous-draft-not.json => 007-unknown-in-previous-draft-not.json} (100%) rename rules/from-draft3/to-draft4/{006-unknown-in-previous-draft-definitions.json => 008-unknown-in-previous-draft-definitions.json} (100%) rename rules/from-draft3/to-draft4/{007-unknown-in-previous-draft-maxProperties.json => 009-unknown-in-previous-draft-maxProperties.json} (100%) rename rules/from-draft3/to-draft4/{008-unknown-in-previous-draft-minProperties.json => 010-unknown-in-previous-draft-minProperties.json} (100%) rename rules/from-draft3/to-draft4/{009-schema.json => 011-schema.json} (100%) rename rules/from-draft3/to-draft4/{010-type-has-value-equals-any.json => 012-type-has-value-equals-any.json} (100%) rename rules/from-draft3/to-draft4/{011-type-has-any-in-its-array.json => 013-type-has-any-in-its-array.json} (100%) rename rules/from-draft3/to-draft4/{012-type-has-atleast-one-object-in-its-array-anyOf-absent.json => 014-type-has-atleast-one-object-in-its-array-anyOf-absent.json} (100%) rename rules/from-draft3/to-draft4/{013-type-has-objects-and-strings-in-its-array-initialize.json => 015-type-has-objects-and-strings-in-its-array-initialize.json} (100%) rename rules/from-draft3/to-draft4/{014-type-has-objects-and-strings-in-its-array.json => 016-type-has-objects-and-strings-in-its-array.json} (100%) rename rules/from-draft3/to-draft4/{015-type-has-objects-in-its-array.json => 017-type-has-objects-in-its-array.json} (100%) rename rules/from-draft3/to-draft4/{016-type-is-an-empty-array.json => 018-type-is-an-empty-array.json} (100%) rename rules/from-draft3/to-draft4/{017-disallow-has-value-equals-any.json => 019-disallow-has-value-equals-any.json} (100%) rename rules/from-draft3/to-draft4/{019-disallow-has-atleast-one-object-in-its-array-initialize-allOf.json => 020-disallow-has-atleast-one-object-in-its-array-initialize-allOf.json} (100%) rename rules/from-draft3/to-draft4/{020-disallow-has-atleast-one-object-in-its-array.json => 021-disallow-has-atleast-one-object-in-its-array.json} (100%) rename rules/from-draft3/to-draft4/{018-disallow-has-any-in-its-array.json => 022-disallow-has-any-in-its-array.json} (100%) rename rules/from-draft3/to-draft4/{021-disallow-is-an-array-of-strings-allOf-present.json => 023-disallow-is-an-array-of-strings-allOf-present.json} (100%) rename rules/from-draft3/to-draft4/{022-disallow-is-an-array-of-strings-allOf-absent.json => 024-disallow-is-an-array-of-strings-allOf-absent.json} (100%) rename rules/from-draft3/to-draft4/{023-disallow-is-an-empty-array.json => 025-disallow-is-an-empty-array.json} (100%) rename rules/from-draft3/to-draft4/{024-dependencies-children-have-type-string.json => 026-dependencies-children-have-type-string.json} (100%) rename rules/from-draft3/to-draft4/{025-divisiblyBy.json => 027-divisiblyBy.json} (100%) rename rules/from-draft3/to-draft4/{026-extends-is-an-array-allOf-absent.json => 028-extends-is-an-array-allOf-absent.json} (83%) rename rules/from-draft3/to-draft4/{027-extends-is-an-array-allOf-present.json => 029-extends-is-an-array-allOf-present.json} (100%) rename rules/from-draft3/to-draft4/{028-extends-is-an-object-allOf-absent.json => 030-extends-is-an-object-allOf-absent.json} (100%) rename rules/from-draft3/to-draft4/{029-extends-is-an-object-allOf-present.json => 031-extends-is-an-object-allOf-present.json} (100%) rename rules/from-draft3/to-draft4/{030-empty-extends-array.json => 032-empty-extends-array.json} (100%) rename rules/from-draft3/to-draft4/{031-required-false-present-in-properties's-values.json => 033-required-false-present-in-properties's-values.json} (100%) rename rules/from-draft3/to-draft4/{032-required-is-present-in-outer-schema.json => 034-required-is-present-in-outer-schema.json} (100%) rename rules/from-draft3/to-draft4/{033-required-is-absent-and-required-true-in-properties.json => 035-required-is-absent-and-required-true-in-properties.json} (100%) rename rules/from-draft3/to-draft4/{034-required-true-present-in-properties's-values.json => 036-required-true-present-in-properties's-values.json} (100%) rename rules/from-draft3/to-draft4/{035-empty-required-array-in-outer-schema.json => 037-empty-required-array-in-outer-schema.json} (100%) create mode 100644 test/from-draft3/to-draft4/ref.json diff --git a/rules/from-draft3/to-draft4/001-ref-and-adjecent-keywords-present.json b/rules/from-draft3/to-draft4/001-ref-and-adjecent-keywords-present.json new file mode 100644 index 0000000..bbb03f4 --- /dev/null +++ b/rules/from-draft3/to-draft4/001-ref-and-adjecent-keywords-present.json @@ -0,0 +1,10 @@ +{ + "vocabulary": "core", + "condition": [ + { "operation": "has-key", "path": [], "value": "$ref" }, + { "operation": "type-is", "path": [ {} ], "value": [ "array", "booelan", "integer", "number", "object", "string" ] } + ], + "transform": [ + { "operation": "prefix-until-unique", "path": [ {} ], "value": "x-" } + ] +} diff --git a/rules/from-draft3/to-draft4/002-ref-and-x-ref-present.json b/rules/from-draft3/to-draft4/002-ref-and-x-ref-present.json new file mode 100644 index 0000000..5e482fa --- /dev/null +++ b/rules/from-draft3/to-draft4/002-ref-and-x-ref-present.json @@ -0,0 +1,10 @@ +{ + "vocabulary": "core", + "condition": [ + { "operation": "has-key", "path": [], "value": "$ref" }, + { "operation": "has-key", "path": [], "value": "x-$ref" } + ], + "transform": [ + { "operation": "prefix-until-unique", "path": [ "x-$ref" ], "value": "x-" } + ] +} diff --git a/rules/from-draft3/to-draft4/003-correct-sideeffects-ref-transform.json b/rules/from-draft3/to-draft4/003-correct-sideeffects-ref-transform.json new file mode 100644 index 0000000..56ba6d3 --- /dev/null +++ b/rules/from-draft3/to-draft4/003-correct-sideeffects-ref-transform.json @@ -0,0 +1,9 @@ +{ + "vocabulary": "core", + "condition": [ + { "operation": "has-key", "path": [], "value": "x-$ref" } + ], + "transform": [ + { "operation": "move", "to": [ "$ref" ], "from": [ "x-$ref" ] } + ] +} diff --git a/rules/from-draft3/to-draft4/002-unknown-in-previous-draft-anyOf.json b/rules/from-draft3/to-draft4/004-unknown-in-previous-draft-anyOf.json similarity index 100% rename from rules/from-draft3/to-draft4/002-unknown-in-previous-draft-anyOf.json rename to rules/from-draft3/to-draft4/004-unknown-in-previous-draft-anyOf.json diff --git a/rules/from-draft3/to-draft4/001-unknown-in-previous-draft-multipleOf.json b/rules/from-draft3/to-draft4/004-unknown-in-previous-draft-multipleOf.json similarity index 100% rename from rules/from-draft3/to-draft4/001-unknown-in-previous-draft-multipleOf.json rename to rules/from-draft3/to-draft4/004-unknown-in-previous-draft-multipleOf.json diff --git a/rules/from-draft3/to-draft4/003-unknown-in-previous-draft-allOf.json b/rules/from-draft3/to-draft4/005-unknown-in-previous-draft-allOf.json similarity index 100% rename from rules/from-draft3/to-draft4/003-unknown-in-previous-draft-allOf.json rename to rules/from-draft3/to-draft4/005-unknown-in-previous-draft-allOf.json diff --git a/rules/from-draft3/to-draft4/004-unknown-in-previous-draft-oneOf.json b/rules/from-draft3/to-draft4/006-unknown-in-previous-draft-oneOf.json similarity index 100% rename from rules/from-draft3/to-draft4/004-unknown-in-previous-draft-oneOf.json rename to rules/from-draft3/to-draft4/006-unknown-in-previous-draft-oneOf.json diff --git a/rules/from-draft3/to-draft4/005-unknown-in-previous-draft-not.json b/rules/from-draft3/to-draft4/007-unknown-in-previous-draft-not.json similarity index 100% rename from rules/from-draft3/to-draft4/005-unknown-in-previous-draft-not.json rename to rules/from-draft3/to-draft4/007-unknown-in-previous-draft-not.json diff --git a/rules/from-draft3/to-draft4/006-unknown-in-previous-draft-definitions.json b/rules/from-draft3/to-draft4/008-unknown-in-previous-draft-definitions.json similarity index 100% rename from rules/from-draft3/to-draft4/006-unknown-in-previous-draft-definitions.json rename to rules/from-draft3/to-draft4/008-unknown-in-previous-draft-definitions.json diff --git a/rules/from-draft3/to-draft4/007-unknown-in-previous-draft-maxProperties.json b/rules/from-draft3/to-draft4/009-unknown-in-previous-draft-maxProperties.json similarity index 100% rename from rules/from-draft3/to-draft4/007-unknown-in-previous-draft-maxProperties.json rename to rules/from-draft3/to-draft4/009-unknown-in-previous-draft-maxProperties.json diff --git a/rules/from-draft3/to-draft4/008-unknown-in-previous-draft-minProperties.json b/rules/from-draft3/to-draft4/010-unknown-in-previous-draft-minProperties.json similarity index 100% rename from rules/from-draft3/to-draft4/008-unknown-in-previous-draft-minProperties.json rename to rules/from-draft3/to-draft4/010-unknown-in-previous-draft-minProperties.json diff --git a/rules/from-draft3/to-draft4/009-schema.json b/rules/from-draft3/to-draft4/011-schema.json similarity index 100% rename from rules/from-draft3/to-draft4/009-schema.json rename to rules/from-draft3/to-draft4/011-schema.json diff --git a/rules/from-draft3/to-draft4/010-type-has-value-equals-any.json b/rules/from-draft3/to-draft4/012-type-has-value-equals-any.json similarity index 100% rename from rules/from-draft3/to-draft4/010-type-has-value-equals-any.json rename to rules/from-draft3/to-draft4/012-type-has-value-equals-any.json diff --git a/rules/from-draft3/to-draft4/011-type-has-any-in-its-array.json b/rules/from-draft3/to-draft4/013-type-has-any-in-its-array.json similarity index 100% rename from rules/from-draft3/to-draft4/011-type-has-any-in-its-array.json rename to rules/from-draft3/to-draft4/013-type-has-any-in-its-array.json diff --git a/rules/from-draft3/to-draft4/012-type-has-atleast-one-object-in-its-array-anyOf-absent.json b/rules/from-draft3/to-draft4/014-type-has-atleast-one-object-in-its-array-anyOf-absent.json similarity index 100% rename from rules/from-draft3/to-draft4/012-type-has-atleast-one-object-in-its-array-anyOf-absent.json rename to rules/from-draft3/to-draft4/014-type-has-atleast-one-object-in-its-array-anyOf-absent.json diff --git a/rules/from-draft3/to-draft4/013-type-has-objects-and-strings-in-its-array-initialize.json b/rules/from-draft3/to-draft4/015-type-has-objects-and-strings-in-its-array-initialize.json similarity index 100% rename from rules/from-draft3/to-draft4/013-type-has-objects-and-strings-in-its-array-initialize.json rename to rules/from-draft3/to-draft4/015-type-has-objects-and-strings-in-its-array-initialize.json diff --git a/rules/from-draft3/to-draft4/014-type-has-objects-and-strings-in-its-array.json b/rules/from-draft3/to-draft4/016-type-has-objects-and-strings-in-its-array.json similarity index 100% rename from rules/from-draft3/to-draft4/014-type-has-objects-and-strings-in-its-array.json rename to rules/from-draft3/to-draft4/016-type-has-objects-and-strings-in-its-array.json diff --git a/rules/from-draft3/to-draft4/015-type-has-objects-in-its-array.json b/rules/from-draft3/to-draft4/017-type-has-objects-in-its-array.json similarity index 100% rename from rules/from-draft3/to-draft4/015-type-has-objects-in-its-array.json rename to rules/from-draft3/to-draft4/017-type-has-objects-in-its-array.json diff --git a/rules/from-draft3/to-draft4/016-type-is-an-empty-array.json b/rules/from-draft3/to-draft4/018-type-is-an-empty-array.json similarity index 100% rename from rules/from-draft3/to-draft4/016-type-is-an-empty-array.json rename to rules/from-draft3/to-draft4/018-type-is-an-empty-array.json diff --git a/rules/from-draft3/to-draft4/017-disallow-has-value-equals-any.json b/rules/from-draft3/to-draft4/019-disallow-has-value-equals-any.json similarity index 100% rename from rules/from-draft3/to-draft4/017-disallow-has-value-equals-any.json rename to rules/from-draft3/to-draft4/019-disallow-has-value-equals-any.json diff --git a/rules/from-draft3/to-draft4/019-disallow-has-atleast-one-object-in-its-array-initialize-allOf.json b/rules/from-draft3/to-draft4/020-disallow-has-atleast-one-object-in-its-array-initialize-allOf.json similarity index 100% rename from rules/from-draft3/to-draft4/019-disallow-has-atleast-one-object-in-its-array-initialize-allOf.json rename to rules/from-draft3/to-draft4/020-disallow-has-atleast-one-object-in-its-array-initialize-allOf.json diff --git a/rules/from-draft3/to-draft4/020-disallow-has-atleast-one-object-in-its-array.json b/rules/from-draft3/to-draft4/021-disallow-has-atleast-one-object-in-its-array.json similarity index 100% rename from rules/from-draft3/to-draft4/020-disallow-has-atleast-one-object-in-its-array.json rename to rules/from-draft3/to-draft4/021-disallow-has-atleast-one-object-in-its-array.json diff --git a/rules/from-draft3/to-draft4/018-disallow-has-any-in-its-array.json b/rules/from-draft3/to-draft4/022-disallow-has-any-in-its-array.json similarity index 100% rename from rules/from-draft3/to-draft4/018-disallow-has-any-in-its-array.json rename to rules/from-draft3/to-draft4/022-disallow-has-any-in-its-array.json diff --git a/rules/from-draft3/to-draft4/021-disallow-is-an-array-of-strings-allOf-present.json b/rules/from-draft3/to-draft4/023-disallow-is-an-array-of-strings-allOf-present.json similarity index 100% rename from rules/from-draft3/to-draft4/021-disallow-is-an-array-of-strings-allOf-present.json rename to rules/from-draft3/to-draft4/023-disallow-is-an-array-of-strings-allOf-present.json diff --git a/rules/from-draft3/to-draft4/022-disallow-is-an-array-of-strings-allOf-absent.json b/rules/from-draft3/to-draft4/024-disallow-is-an-array-of-strings-allOf-absent.json similarity index 100% rename from rules/from-draft3/to-draft4/022-disallow-is-an-array-of-strings-allOf-absent.json rename to rules/from-draft3/to-draft4/024-disallow-is-an-array-of-strings-allOf-absent.json diff --git a/rules/from-draft3/to-draft4/023-disallow-is-an-empty-array.json b/rules/from-draft3/to-draft4/025-disallow-is-an-empty-array.json similarity index 100% rename from rules/from-draft3/to-draft4/023-disallow-is-an-empty-array.json rename to rules/from-draft3/to-draft4/025-disallow-is-an-empty-array.json diff --git a/rules/from-draft3/to-draft4/024-dependencies-children-have-type-string.json b/rules/from-draft3/to-draft4/026-dependencies-children-have-type-string.json similarity index 100% rename from rules/from-draft3/to-draft4/024-dependencies-children-have-type-string.json rename to rules/from-draft3/to-draft4/026-dependencies-children-have-type-string.json diff --git a/rules/from-draft3/to-draft4/025-divisiblyBy.json b/rules/from-draft3/to-draft4/027-divisiblyBy.json similarity index 100% rename from rules/from-draft3/to-draft4/025-divisiblyBy.json rename to rules/from-draft3/to-draft4/027-divisiblyBy.json diff --git a/rules/from-draft3/to-draft4/026-extends-is-an-array-allOf-absent.json b/rules/from-draft3/to-draft4/028-extends-is-an-array-allOf-absent.json similarity index 83% rename from rules/from-draft3/to-draft4/026-extends-is-an-array-allOf-absent.json rename to rules/from-draft3/to-draft4/028-extends-is-an-array-allOf-absent.json index e55a5ff..fa78bfd 100644 --- a/rules/from-draft3/to-draft4/026-extends-is-an-array-allOf-absent.json +++ b/rules/from-draft3/to-draft4/028-extends-is-an-array-allOf-absent.json @@ -7,6 +7,6 @@ { "operation": "not-has-key", "path": [], "value": "allOf" } ], "transform": [ - { "operation": "move", "to": [ "allOf" ], "from": [ "extends" ] } + { "operation": "add", "path": [ "allOf" ], "value": [] } ] } diff --git a/rules/from-draft3/to-draft4/027-extends-is-an-array-allOf-present.json b/rules/from-draft3/to-draft4/029-extends-is-an-array-allOf-present.json similarity index 100% rename from rules/from-draft3/to-draft4/027-extends-is-an-array-allOf-present.json rename to rules/from-draft3/to-draft4/029-extends-is-an-array-allOf-present.json diff --git a/rules/from-draft3/to-draft4/028-extends-is-an-object-allOf-absent.json b/rules/from-draft3/to-draft4/030-extends-is-an-object-allOf-absent.json similarity index 100% rename from rules/from-draft3/to-draft4/028-extends-is-an-object-allOf-absent.json rename to rules/from-draft3/to-draft4/030-extends-is-an-object-allOf-absent.json diff --git a/rules/from-draft3/to-draft4/029-extends-is-an-object-allOf-present.json b/rules/from-draft3/to-draft4/031-extends-is-an-object-allOf-present.json similarity index 100% rename from rules/from-draft3/to-draft4/029-extends-is-an-object-allOf-present.json rename to rules/from-draft3/to-draft4/031-extends-is-an-object-allOf-present.json diff --git a/rules/from-draft3/to-draft4/030-empty-extends-array.json b/rules/from-draft3/to-draft4/032-empty-extends-array.json similarity index 100% rename from rules/from-draft3/to-draft4/030-empty-extends-array.json rename to rules/from-draft3/to-draft4/032-empty-extends-array.json diff --git a/rules/from-draft3/to-draft4/031-required-false-present-in-properties's-values.json b/rules/from-draft3/to-draft4/033-required-false-present-in-properties's-values.json similarity index 100% rename from rules/from-draft3/to-draft4/031-required-false-present-in-properties's-values.json rename to rules/from-draft3/to-draft4/033-required-false-present-in-properties's-values.json diff --git a/rules/from-draft3/to-draft4/032-required-is-present-in-outer-schema.json b/rules/from-draft3/to-draft4/034-required-is-present-in-outer-schema.json similarity index 100% rename from rules/from-draft3/to-draft4/032-required-is-present-in-outer-schema.json rename to rules/from-draft3/to-draft4/034-required-is-present-in-outer-schema.json diff --git a/rules/from-draft3/to-draft4/033-required-is-absent-and-required-true-in-properties.json b/rules/from-draft3/to-draft4/035-required-is-absent-and-required-true-in-properties.json similarity index 100% rename from rules/from-draft3/to-draft4/033-required-is-absent-and-required-true-in-properties.json rename to rules/from-draft3/to-draft4/035-required-is-absent-and-required-true-in-properties.json diff --git a/rules/from-draft3/to-draft4/034-required-true-present-in-properties's-values.json b/rules/from-draft3/to-draft4/036-required-true-present-in-properties's-values.json similarity index 100% rename from rules/from-draft3/to-draft4/034-required-true-present-in-properties's-values.json rename to rules/from-draft3/to-draft4/036-required-true-present-in-properties's-values.json diff --git a/rules/from-draft3/to-draft4/035-empty-required-array-in-outer-schema.json b/rules/from-draft3/to-draft4/037-empty-required-array-in-outer-schema.json similarity index 100% rename from rules/from-draft3/to-draft4/035-empty-required-array-in-outer-schema.json rename to rules/from-draft3/to-draft4/037-empty-required-array-in-outer-schema.json diff --git a/test/from-draft3/to-draft4/ref.json b/test/from-draft3/to-draft4/ref.json new file mode 100644 index 0000000..2901c2c --- /dev/null +++ b/test/from-draft3/to-draft4/ref.json @@ -0,0 +1,31 @@ +[ + { + "title": "$ref present in schema, with adjacent keywords", + "from": { + "$id": "http://example.com", + "properties": { + "foo": { + "$ref": "/bar", + "type": "string", + "$id": "zoo" + }, + "bar": { + "$id": "bar" + } + } + }, + "to": { + "$id": "http://example.com", + "properties": { + "foo": { + "$ref": "/bar", + "x-type": "string", + "x-$id": "zoo" + }, + "bar": { + "$id": "bar" + } + } + } + } +] From ac86c53f58e49f27737159d548acbcede43b1ad5 Mon Sep 17 00:00:00 2001 From: Suprith KG Date: Tue, 20 Aug 2024 23:52:20 +0530 Subject: [PATCH 2/2] Change to id --- test/from-draft3/to-draft4/ref.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/from-draft3/to-draft4/ref.json b/test/from-draft3/to-draft4/ref.json index 2901c2c..c75fda1 100644 --- a/test/from-draft3/to-draft4/ref.json +++ b/test/from-draft3/to-draft4/ref.json @@ -2,28 +2,28 @@ { "title": "$ref present in schema, with adjacent keywords", "from": { - "$id": "http://example.com", + "id": "http://example.com", "properties": { "foo": { "$ref": "/bar", "type": "string", - "$id": "zoo" + "id": "zoo" }, "bar": { - "$id": "bar" + "id": "bar" } } }, "to": { - "$id": "http://example.com", + "id": "http://example.com", "properties": { "foo": { "$ref": "/bar", "x-type": "string", - "x-$id": "zoo" + "x-id": "zoo" }, "bar": { - "$id": "bar" + "id": "bar" } } }