From 798c1ff2424a7a893c7e92fa108f51a5bbacf071 Mon Sep 17 00:00:00 2001 From: Omkar Moghe Date: Sun, 14 Jan 2024 12:26:09 -0800 Subject: [PATCH 01/32] fix existing specs --- lib/json_schemer.rb | 9 ++++ lib/json_schemer/configuration.rb | 68 +++++++++++++++++++++++++++++++ lib/json_schemer/schema.rb | 48 +++++++--------------- test/json_schemer_test.rb | 5 ++- 4 files changed, 96 insertions(+), 34 deletions(-) create mode 100644 lib/json_schemer/configuration.rb diff --git a/lib/json_schemer.rb b/lib/json_schemer.rb index 49ad144..611f95e 100644 --- a/lib/json_schemer.rb +++ b/lib/json_schemer.rb @@ -59,6 +59,7 @@ require 'json_schemer/openapi30/vocab/base' require 'json_schemer/openapi30/vocab' require 'json_schemer/openapi' +require 'json_schemer/configuration' require 'json_schemer/schema' module JSONSchemer @@ -245,6 +246,14 @@ def openapi30_document def openapi(document, **options) OpenAPI.new(document, **options) end + + def configuration + @configuration ||= Configuration.new + end + + def configure + yield configuration + end end META_SCHEMA_CALLABLES_BY_BASE_URI_STR = { diff --git a/lib/json_schemer/configuration.rb b/lib/json_schemer/configuration.rb new file mode 100644 index 0000000..7980508 --- /dev/null +++ b/lib/json_schemer/configuration.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +module JSONSchemer + class Configuration + module Defaults + BASE_URI = URI('json-schemer://schema').freeze + FORMATS = {}.freeze + CONTENT_ENCODINGS = {}.freeze + CONTENT_MEDIA_TYPES = {}.freeze + KEYWORDS = {}.freeze + BEFORE_PROPERTY_VALIDATION = [].freeze + AFTER_PROPERTY_VALIDATION = [].freeze + INSERT_PROPERTY_DEFAULTS = false + PROPERTY_RESOLVER = proc do |instance, property, results_with_tree_validity| + unless results_with_tree_validity.size == 1 + results_with_tree_validity = results_with_tree_validity.select(&:last) + end + annotations = results_with_tree_validity.to_set { |result, _tree_valid| result.annotation } + + if annotations.size == 1 + instance[property] = annotations.first.clone + true + else + false + end + end + REF_RESOLVER = proc { |uri| raise UnknownRef, uri.to_s } + REGEXP_RESOLVER = 'ruby' + OUTPUT_FORMAT = 'classic' + RESOLVE_ENUMERATORS = false + ACCESS_MODE = nil + end + + attr_accessor( + :base_uri, + :formats, + :content_encodings, + :content_media_types, + :keywords, + :before_property_validation, + :after_property_validation, + :insert_property_defaults, + :property_default_resolver, + :original_ref_resolver, + :original_regexp_resolver, + :output_format, + :resolve_enumerators, + :access_mode + ) + + def initialize + @base_uri = Defaults::BASE_URI + @formats = Defaults::FORMATS + @content_encodings = Defaults::CONTENT_ENCODINGS + @content_media_types = Defaults::CONTENT_MEDIA_TYPES + @keywords = Defaults::KEYWORDS + @before_property_validation = Array(Defaults::BEFORE_PROPERTY_VALIDATION) + @after_property_validation = Array(Defaults::AFTER_PROPERTY_VALIDATION) + @insert_property_defaults = Defaults::INSERT_PROPERTY_DEFAULTS + @property_default_resolver = Defaults::PROPERTY_RESOLVER + @original_ref_resolver = Defaults::REF_RESOLVER + @original_regexp_resolver = Defaults::REGEXP_RESOLVER + @output_format = Defaults::OUTPUT_FORMAT + @resolve_enumerators = Defaults::RESOLVE_ENUMERATORS + @access_mode = Defaults::ACCESS_MODE + end + end +end diff --git a/lib/json_schemer/schema.rb b/lib/json_schemer/schema.rb index baf1ec2..18e7759 100644 --- a/lib/json_schemer/schema.rb +++ b/lib/json_schemer/schema.rb @@ -18,29 +18,11 @@ def original_instance(instance_location) UNKNOWN_KEYWORD_CLASS = Draft202012::Vocab::Core::UnknownKeyword NOT_KEYWORD_CLASS = Draft202012::Vocab::Applicator::Not PROPERTIES_KEYWORD_CLASS = Draft202012::Vocab::Applicator::Properties - DEFAULT_BASE_URI = URI('json-schemer://schema').freeze - DEFAULT_FORMATS = {}.freeze - DEFAULT_CONTENT_ENCODINGS = {}.freeze - DEFAULT_CONTENT_MEDIA_TYPES = {}.freeze - DEFAULT_KEYWORDS = {}.freeze - DEFAULT_BEFORE_PROPERTY_VALIDATION = [].freeze - DEFAULT_AFTER_PROPERTY_VALIDATION = [].freeze - DEFAULT_REF_RESOLVER = proc { |uri| raise UnknownRef, uri.to_s } + NET_HTTP_REF_RESOLVER = proc { |uri| JSON.parse(Net::HTTP.get(uri)) } RUBY_REGEXP_RESOLVER = proc { |pattern| Regexp.new(pattern) } ECMA_REGEXP_RESOLVER = proc { |pattern| Regexp.new(EcmaRegexp.ruby_equivalent(pattern)) } - DEFAULT_PROPERTY_DEFAULT_RESOLVER = proc do |instance, property, results_with_tree_validity| - results_with_tree_validity = results_with_tree_validity.select(&:last) unless results_with_tree_validity.size == 1 - annotations = results_with_tree_validity.to_set { |result, _tree_valid| result.annotation } - if annotations.size == 1 - instance[property] = annotations.first.clone - true - else - false - end - end - attr_accessor :base_uri, :meta_schema, :keywords, :keyword_order attr_reader :value, :parent, :root, :parsed attr_reader :vocabulary, :format, :formats, :content_encodings, :content_media_types, :custom_keywords, :before_property_validation, :after_property_validation, :insert_property_defaults, :property_default_resolver @@ -50,23 +32,23 @@ def initialize( parent = nil, root = self, keyword = nil, - base_uri: DEFAULT_BASE_URI, + base_uri: JSONSchemer.configuration.base_uri, meta_schema: nil, vocabulary: nil, format: true, - formats: DEFAULT_FORMATS, - content_encodings: DEFAULT_CONTENT_ENCODINGS, - content_media_types: DEFAULT_CONTENT_MEDIA_TYPES, - keywords: DEFAULT_KEYWORDS, - before_property_validation: DEFAULT_BEFORE_PROPERTY_VALIDATION, - after_property_validation: DEFAULT_AFTER_PROPERTY_VALIDATION, - insert_property_defaults: false, - property_default_resolver: DEFAULT_PROPERTY_DEFAULT_RESOLVER, - ref_resolver: DEFAULT_REF_RESOLVER, - regexp_resolver: 'ruby', - output_format: 'classic', - resolve_enumerators: false, - access_mode: nil + formats: JSONSchemer.configuration.formats, + content_encodings: JSONSchemer.configuration.content_encodings, + content_media_types: JSONSchemer.configuration.content_media_types, + keywords: JSONSchemer.configuration.keywords, + before_property_validation: JSONSchemer.configuration.before_property_validation, + after_property_validation: JSONSchemer.configuration.after_property_validation, + insert_property_defaults: JSONSchemer.configuration.insert_property_defaults, + property_default_resolver: JSONSchemer.configuration.property_default_resolver, + ref_resolver: JSONSchemer.configuration.original_ref_resolver, + regexp_resolver: JSONSchemer.configuration.original_regexp_resolver, + output_format: JSONSchemer.configuration.output_format, + resolve_enumerators: JSONSchemer.configuration.resolve_enumerators, + access_mode: JSONSchemer.configuration.access_mode ) @value = deep_stringify_keys(value) @parent = parent diff --git a/test/json_schemer_test.rb b/test/json_schemer_test.rb index fae8aae..201f975 100644 --- a/test/json_schemer_test.rb +++ b/test/json_schemer_test.rb @@ -267,7 +267,10 @@ def test_default_meta_schema end def test_draft4_default_id - assert_equal(JSONSchemer::Schema::DEFAULT_BASE_URI, JSONSchemer.schema(true, :meta_schema => JSONSchemer::Draft4::BASE_URI.to_s).base_uri) + assert_equal( + JSONSchemer::Configuration::Defaults::BASE_URI, + JSONSchemer.schema(true, :meta_schema => JSONSchemer::Draft4::BASE_URI.to_s).base_uri + ) end def test_it_ignores_content_schema_without_content_media_type From 93e34394414cdf844e31ccb7183f67d4892b7a4c Mon Sep 17 00:00:00 2001 From: Omkar Moghe Date: Sun, 14 Jan 2024 12:33:02 -0800 Subject: [PATCH 02/32] array wrap safety --- lib/json_schemer/configuration.rb | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/json_schemer/configuration.rb b/lib/json_schemer/configuration.rb index 7980508..f7b0d58 100644 --- a/lib/json_schemer/configuration.rb +++ b/lib/json_schemer/configuration.rb @@ -37,8 +37,6 @@ module Defaults :content_encodings, :content_media_types, :keywords, - :before_property_validation, - :after_property_validation, :insert_property_defaults, :property_default_resolver, :original_ref_resolver, @@ -48,14 +46,19 @@ module Defaults :access_mode ) + attr_reader( + :before_property_validation, + :after_property_validation, + ) + def initialize @base_uri = Defaults::BASE_URI @formats = Defaults::FORMATS @content_encodings = Defaults::CONTENT_ENCODINGS @content_media_types = Defaults::CONTENT_MEDIA_TYPES @keywords = Defaults::KEYWORDS - @before_property_validation = Array(Defaults::BEFORE_PROPERTY_VALIDATION) - @after_property_validation = Array(Defaults::AFTER_PROPERTY_VALIDATION) + @before_property_validation = Defaults::BEFORE_PROPERTY_VALIDATION + @after_property_validation = Defaults::AFTER_PROPERTY_VALIDATION @insert_property_defaults = Defaults::INSERT_PROPERTY_DEFAULTS @property_default_resolver = Defaults::PROPERTY_RESOLVER @original_ref_resolver = Defaults::REF_RESOLVER @@ -65,4 +68,12 @@ def initialize @access_mode = Defaults::ACCESS_MODE end end + + def before_property_validation=(validations) + @before_property_validation = Array(validations) + end + + def after_property_validation=(validations) + @after_property_validation = Array(validations) + end end From b2af95900c0447420040e24c60ee88e590fbbf49 Mon Sep 17 00:00:00 2001 From: Omkar Moghe Date: Sat, 20 Jan 2024 13:47:46 -0800 Subject: [PATCH 03/32] specs --- lib/json_schemer.rb | 28 +++-- lib/json_schemer/configuration.rb | 60 ++++++--- lib/json_schemer/schema.rb | 2 +- test/configuration_test.rb | 194 ++++++++++++++++++++++++++++++ 4 files changed, 252 insertions(+), 32 deletions(-) create mode 100644 test/configuration_test.rb diff --git a/lib/json_schemer.rb b/lib/json_schemer.rb index 611f95e..04cb19d 100644 --- a/lib/json_schemer.rb +++ b/lib/json_schemer.rb @@ -63,19 +63,21 @@ require 'json_schemer/schema' module JSONSchemer - class UnsupportedMetaSchema < StandardError; end - class UnsupportedOpenAPIVersion < StandardError; end - class UnknownRef < StandardError; end - class UnknownFormat < StandardError; end - class UnknownVocabulary < StandardError; end - class UnknownContentEncoding < StandardError; end - class UnknownContentMediaType < StandardError; end - class UnknownOutputFormat < StandardError; end - class InvalidRefResolution < StandardError; end - class InvalidRefPointer < StandardError; end - class InvalidRegexpResolution < StandardError; end - class InvalidFileURI < StandardError; end - class InvalidEcmaRegexp < StandardError; end + UnsupportedMetaSchema = Class.new(StandardError) + UnsupportedOpenAPIVersion = Class.new(StandardError) + UnknownRef = Class.new(StandardError) + UnknownFormat = Class.new(StandardError) + UnknownVocabulary = Class.new(StandardError) + UnknownContentEncoding = Class.new(StandardError) + UnknownContentMediaType = Class.new(StandardError) + UnknownOutputFormat = Class.new(StandardError) + UnknownRegexpResolver = Class.new(StandardError) + UnknownAccessMode = Class.new(StandardError) + InvalidRefResolution = Class.new(StandardError) + InvalidRefPointer = Class.new(StandardError) + InvalidRegexpResolution = Class.new(StandardError) + InvalidFileURI = Class.new(StandardError) + InvalidEcmaRegexp = Class.new(StandardError) VOCABULARIES = { 'https://json-schema.org/draft/2020-12/vocab/core' => Draft202012::Vocab::CORE, diff --git a/lib/json_schemer/configuration.rb b/lib/json_schemer/configuration.rb index f7b0d58..65a3e26 100644 --- a/lib/json_schemer/configuration.rb +++ b/lib/json_schemer/configuration.rb @@ -7,7 +7,7 @@ module Defaults FORMATS = {}.freeze CONTENT_ENCODINGS = {}.freeze CONTENT_MEDIA_TYPES = {}.freeze - KEYWORDS = {}.freeze + CUSTOM_KEYWORDS = {}.freeze BEFORE_PROPERTY_VALIDATION = [].freeze AFTER_PROPERTY_VALIDATION = [].freeze INSERT_PROPERTY_DEFAULTS = false @@ -24,8 +24,8 @@ module Defaults false end end - REF_RESOLVER = proc { |uri| raise UnknownRef, uri.to_s } - REGEXP_RESOLVER = 'ruby' + ORIGINAL_REF_RESOLVER = proc { |uri| raise UnknownRef, uri.to_s } + ORIGINAL_REGEXP_RESOLVER = 'ruby' OUTPUT_FORMAT = 'classic' RESOLVE_ENUMERATORS = false ACCESS_MODE = nil @@ -36,19 +36,19 @@ module Defaults :formats, :content_encodings, :content_media_types, - :keywords, + :custom_keywords, :insert_property_defaults, :property_default_resolver, :original_ref_resolver, - :original_regexp_resolver, - :output_format, - :resolve_enumerators, - :access_mode - ) + :resolve_enumerators + ) attr_reader( :before_property_validation, :after_property_validation, + :original_regexp_resolver, + :output_format, + :access_mode ) def initialize @@ -56,24 +56,48 @@ def initialize @formats = Defaults::FORMATS @content_encodings = Defaults::CONTENT_ENCODINGS @content_media_types = Defaults::CONTENT_MEDIA_TYPES - @keywords = Defaults::KEYWORDS + @custom_keywords = Defaults::CUSTOM_KEYWORDS @before_property_validation = Defaults::BEFORE_PROPERTY_VALIDATION @after_property_validation = Defaults::AFTER_PROPERTY_VALIDATION @insert_property_defaults = Defaults::INSERT_PROPERTY_DEFAULTS @property_default_resolver = Defaults::PROPERTY_RESOLVER - @original_ref_resolver = Defaults::REF_RESOLVER - @original_regexp_resolver = Defaults::REGEXP_RESOLVER + @original_ref_resolver = Defaults::ORIGINAL_REF_RESOLVER + @original_regexp_resolver = Defaults::ORIGINAL_REGEXP_RESOLVER @output_format = Defaults::OUTPUT_FORMAT @resolve_enumerators = Defaults::RESOLVE_ENUMERATORS @access_mode = Defaults::ACCESS_MODE end - end - def before_property_validation=(validations) - @before_property_validation = Array(validations) - end + def before_property_validation=(validations) + @before_property_validation = Array(validations) + end + + def after_property_validation=(validations) + @after_property_validation = Array(validations) + end - def after_property_validation=(validations) - @after_property_validation = Array(validations) + def original_regexp_resolver=(resolver) + if resolver.is_a?(String) && !%w[ruby ecma].include?(resolver) + raise UnknownRegexpResolver + end + + @original_regexp_resolver = resolver + end + + def output_format=(format) + unless %[classic flag basic detailed verbose].include?(format) + raise UnknownOutputFormat + end + + @output_format = format + end + + def access_mode=(mode) + if mode.is_a?(String) && !%w[read write].include?(mode) + raise UnknownAccessMode + end + + @access_mode = mode + end end end diff --git a/lib/json_schemer/schema.rb b/lib/json_schemer/schema.rb index 18e7759..76b4209 100644 --- a/lib/json_schemer/schema.rb +++ b/lib/json_schemer/schema.rb @@ -39,7 +39,7 @@ def initialize( formats: JSONSchemer.configuration.formats, content_encodings: JSONSchemer.configuration.content_encodings, content_media_types: JSONSchemer.configuration.content_media_types, - keywords: JSONSchemer.configuration.keywords, + keywords: JSONSchemer.configuration.custom_keywords, before_property_validation: JSONSchemer.configuration.before_property_validation, after_property_validation: JSONSchemer.configuration.after_property_validation, insert_property_defaults: JSONSchemer.configuration.insert_property_defaults, diff --git a/test/configuration_test.rb b/test/configuration_test.rb new file mode 100644 index 0000000..3c1098d --- /dev/null +++ b/test/configuration_test.rb @@ -0,0 +1,194 @@ +require 'test_helper' + +class ConfigurationTest < Minitest::Test + parallelize_me! + + def run_configuration_test(option, default:, test:, expectation: test) + assert_equal(default, JSONSchemer.configuration.public_send(option)) + + JSONSchemer.configure { |config| config.public_send("#{option}=", test) } + + assert_equal(expectation, JSONSchemer.configuration.public_send(option)) + + # We need to reset the configuration to avoid "polluting" other tests. + JSONSchemer.configure { |config| config.public_send("#{option}=", default) } + end + + def test_configure + JSONSchemer.configure do |config| + assert_instance_of(JSONSchemer::Configuration, config) + end + end + + def test_base_uri + run_configuration_test( + :base_uri, + default: JSONSchemer::Configuration::Defaults::BASE_URI, + test: URI('some-other://schema') + ) + end + + def test_formats + run_configuration_test( + :formats, + default: JSONSchemer::Configuration::Defaults::FORMATS, + test: { + 'some-format' => lambda { |instance, _format| true } + } + ) + end + + def test_content_encodings + run_configuration_test( + :content_encodings, + default: JSONSchemer::Configuration::Defaults::CONTENT_ENCODINGS, + test: { + 'lowercase' => lambda { |instance| [true, instance&.downcase] } + } + ) + end + + def test_content_media_types + run_configuration_test( + :content_media_types, + default: JSONSchemer::Configuration::Defaults::CONTENT_MEDIA_TYPES, + test: { + 'text/csv' => lambda do |instance| + [true, CSV.parse(instance)] + rescue + [false, nil] + end + } + ) + end + + def test_keywords + run_configuration_test( + :custom_keywords, + default: JSONSchemer::Configuration::Defaults::CUSTOM_KEYWORDS, + test: { + 'even' => lambda { |data, curr_schema, _pointer| curr_schema.fetch('even') == data.to_i.even? } + } + ) + end + + def test_before_property_validation + run_configuration_test( + :before_property_validation, + default: JSONSchemer::Configuration::Defaults::BEFORE_PROPERTY_VALIDATION, + test: ['something'] + ) + end + + def test_before_property_validation_without_array + run_configuration_test( + :before_property_validation, + default: JSONSchemer::Configuration::Defaults::BEFORE_PROPERTY_VALIDATION, + test: 'something', + expectation: ['something'] + ) + end + + def test_after_property_validation + run_configuration_test( + :after_property_validation, + default: JSONSchemer::Configuration::Defaults::AFTER_PROPERTY_VALIDATION, + test: ['something'] + ) + end + + def test_after_property_validation_without_array + run_configuration_test( + :after_property_validation, + default: JSONSchemer::Configuration::Defaults::AFTER_PROPERTY_VALIDATION, + test: 'something', + expectation: ['something'] + ) + end + + def test_insert_property_defaults + run_configuration_test( + :insert_property_defaults, + default: JSONSchemer::Configuration::Defaults::INSERT_PROPERTY_DEFAULTS, + test: true + ) + end + + def test_property_default_resolver + run_configuration_test( + :property_default_resolver, + default: JSONSchemer::Configuration::Defaults::PROPERTY_RESOLVER, + test: lambda { |instance, property, results_with_tree_validity| true } + ) + end + + def test_original_ref_resolver + run_configuration_test( + :original_ref_resolver, + default: JSONSchemer::Configuration::Defaults::ORIGINAL_REF_RESOLVER, + test: lambda { |uri| { 'type' => 'string' } } + ) + end + + def test_original_regexp_resolver + run_configuration_test( + :original_regexp_resolver, + default: JSONSchemer::Configuration::Defaults::ORIGINAL_REGEXP_RESOLVER, + test: 'ecma' + ) + end + + def test_original_regexp_resolver_invalid_string + assert_raises(JSONSchemer::UnknownRegexpResolver) do + run_configuration_test( + :original_regexp_resolver, + default: JSONSchemer::Configuration::Defaults::ORIGINAL_REGEXP_RESOLVER, + test: 'invalid' + ) + end + end + + def test_output_format + run_configuration_test( + :output_format, + default: JSONSchemer::Configuration::Defaults::OUTPUT_FORMAT, + test: 'basic' + ) + end + + def test_output_format_invalid + assert_raises(JSONSchemer::UnknownOutputFormat) do + run_configuration_test( + :output_format, + default: JSONSchemer::Configuration::Defaults::OUTPUT_FORMAT, + test: 'invalid' + ) + end + end + + def test_resolve_enumerators + run_configuration_test( + :resolve_enumerators, + default: JSONSchemer::Configuration::Defaults::RESOLVE_ENUMERATORS, + test: true + ) + end + + def test_access_mode + run_configuration_test( + :access_mode, + default: JSONSchemer::Configuration::Defaults::ACCESS_MODE, + test: "write" + ) + end + + def test_access_mode_invalid_string + assert_raises(JSONSchemer::UnknownAccessMode) do + run_configuration_test( + :access_mode, + default: JSONSchemer::Configuration::Defaults::ACCESS_MODE, + test: "invalid" + ) + end + end +end From 3cb05b6989349630a50145beef9eb2a1d2b157e0 Mon Sep 17 00:00:00 2001 From: Omkar Moghe Date: Sat, 20 Jan 2024 13:50:47 -0800 Subject: [PATCH 04/32] warning fix --- test/configuration_test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/configuration_test.rb b/test/configuration_test.rb index 3c1098d..6e81af5 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -4,7 +4,11 @@ class ConfigurationTest < Minitest::Test parallelize_me! def run_configuration_test(option, default:, test:, expectation: test) - assert_equal(default, JSONSchemer.configuration.public_send(option)) + if default.nil? + assert_nil(JSONSchemer.configuration.public_send(option)) + else + assert_equal(default, JSONSchemer.configuration.public_send(option)) + end JSONSchemer.configure { |config| config.public_send("#{option}=", test) } From 92a64a7d0d74637d32895099d0955c87601f3b24 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Sat, 16 Dec 2023 14:18:49 -0800 Subject: [PATCH 05/32] Use `BINARY` instead of `ASCII_8BIT` `BINARY` is an alias of `ASCII_8BIT` and I think the name makes things more clear (particularly for the `binary` format). See: https://bugs.ruby-lang.org/issues/18576 --- lib/json_schemer/format.rb | 8 ++++---- lib/json_schemer/openapi30/meta.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/json_schemer/format.rb b/lib/json_schemer/format.rb index 570afe4..5595db7 100644 --- a/lib/json_schemer/format.rb +++ b/lib/json_schemer/format.rb @@ -76,8 +76,8 @@ module Format IRI_ESCAPE_REGEX = /[^[:ascii:]]/ UUID_REGEX = /\A\h{8}-\h{4}-\h{4}-[89AB]\h{3}-\h{12}\z/i NIL_UUID = '00000000-0000-0000-0000-000000000000' - ASCII_8BIT_TO_PERCENT_ENCODED = 256.times.each_with_object({}) do |byte, out| - out[-byte.chr] = -sprintf('%%%02X', byte) + BINARY_TO_PERCENT_ENCODED = 256.times.each_with_object({}) do |byte, out| + out[-byte.chr(Encoding::BINARY)] = -sprintf('%%%02X', byte) end.freeze class << self @@ -89,8 +89,8 @@ class << self def percent_encode(data, regexp) data = data.dup - data.force_encoding(Encoding::ASCII_8BIT) - data.gsub!(regexp, ASCII_8BIT_TO_PERCENT_ENCODED) + data.force_encoding(Encoding::BINARY) + data.gsub!(regexp, BINARY_TO_PERCENT_ENCODED) data.force_encoding(Encoding::US_ASCII) end diff --git a/lib/json_schemer/openapi30/meta.rb b/lib/json_schemer/openapi30/meta.rb index 4b62eb8..2a833f9 100644 --- a/lib/json_schemer/openapi30/meta.rb +++ b/lib/json_schemer/openapi30/meta.rb @@ -5,7 +5,7 @@ module OpenAPI30 # https://spec.openapis.org/oas/v3.0.3#data-types FORMATS = OpenAPI31::FORMATS.merge( 'byte' => proc { |instance, _value| ContentEncoding::BASE64.call(instance).first }, - 'binary' => proc { |instance, _value| instance.is_a?(String) && instance.encoding == Encoding::ASCII_8BIT }, + 'binary' => proc { |instance, _value| instance.is_a?(String) && instance.encoding == Encoding::BINARY }, 'date' => Format::DATE ) SCHEMA = { From 9601155abaf27c82eb2472fb2587766111e23ceb Mon Sep 17 00:00:00 2001 From: David Harsha Date: Sat, 16 Dec 2023 14:20:56 -0800 Subject: [PATCH 06/32] Maintain input encoding when percent encoding And use `String#b` to get duped binary string. --- lib/json_schemer/format.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/json_schemer/format.rb b/lib/json_schemer/format.rb index 5595db7..f729274 100644 --- a/lib/json_schemer/format.rb +++ b/lib/json_schemer/format.rb @@ -88,10 +88,9 @@ class << self include URITemplate def percent_encode(data, regexp) - data = data.dup - data.force_encoding(Encoding::BINARY) - data.gsub!(regexp, BINARY_TO_PERCENT_ENCODED) - data.force_encoding(Encoding::US_ASCII) + binary = data.b + binary.gsub!(regexp, BINARY_TO_PERCENT_ENCODED) + binary.force_encoding(data.encoding) end def valid_date_time?(data) From d52c130e9967919c6cf1c9dbc3f0babfb8b01cf8 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Sat, 16 Dec 2023 14:32:49 -0800 Subject: [PATCH 07/32] Support symbol keys for hooks & property defaults Noticed this issue when looking into: https://github.com/davishmcclurg/json_schemer/issues/166 --- lib/json_schemer/schema.rb | 8 +++++++- test/hooks_test.rb | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/lib/json_schemer/schema.rb b/lib/json_schemer/schema.rb index baf1ec2..1b80ca4 100644 --- a/lib/json_schemer/schema.rb +++ b/lib/json_schemer/schema.rb @@ -4,7 +4,13 @@ class Schema Context = Struct.new(:instance, :dynamic_scope, :adjacent_results, :short_circuit, :access_mode) do def original_instance(instance_location) Hana::Pointer.parse(Location.resolve(instance_location)).reduce(instance) do |obj, token| - obj.fetch(obj.is_a?(Array) ? token.to_i : token) + if obj.is_a?(Array) + obj.fetch(token.to_i) + elsif !obj.key?(token) && obj.key?(token.to_sym) + obj.fetch(token.to_sym) + else + obj.fetch(token) + end end end end diff --git a/test/hooks_test.rb b/test/hooks_test.rb index 06b6147..033a1c3 100644 --- a/test/hooks_test.rb +++ b/test/hooks_test.rb @@ -67,6 +67,39 @@ def test_it_inserts_defaults ) end + def test_it_inserts_defaults_in_symbol_keys + schemer = JSONSchemer.schema( + { + 'properties' => { + 'a' => { + 'properties' => { + 'b' => { + 'properties' => { + 'c' => { + 'default' => 'x' + } + } + } + } + } + } + }, + insert_property_defaults: true + ) + instance = { 'a' => { 'b' => {} } } + schemer.validate(instance) + assert_equal('x', instance.dig('a', 'b', 'c')) + instance = { :a => { 'b' => {} } } + schemer.validate(instance) + assert_equal('x', instance.dig(:a, 'b', 'c')) + instance = { 'a' => { :b => {} } } + schemer.validate(instance) + assert_equal('x', instance.dig('a', :b, 'c')) + instance = { :a => { :b => {} } } + schemer.validate(instance) + assert_equal('x', instance.dig(:a, :b, 'c')) + end + def test_it_does_not_fail_using_insert_defaults_when_no_properties_are_defined_by_schema schema = { '$comment' => 'Mostly empty schema' From 93c85a5006981347c7e9a4c11b73c6bdb65d8ba2 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Sat, 16 Dec 2023 14:37:47 -0800 Subject: [PATCH 08/32] Use root schema for custom keywords `custom_keywords` isn't passed to nested schemas (similar to formats, hooks, and ref resolution) so they need to be read from the root schema instead. Noticed this while looking into: https://github.com/davishmcclurg/json_schemer/issues/166 --- lib/json_schemer/schema.rb | 4 ++-- test/json_schemer_test.rb | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/json_schemer/schema.rb b/lib/json_schemer/schema.rb index 1b80ca4..39801e0 100644 --- a/lib/json_schemer/schema.rb +++ b/lib/json_schemer/schema.rb @@ -148,8 +148,8 @@ def validate_instance(instance, instance_location, keyword_location, context) adjacent_results[keyword_instance.class] = keyword_result end - if custom_keywords.any? - custom_keywords.each do |custom_keyword, callable| + if root.custom_keywords.any? + root.custom_keywords.each do |custom_keyword, callable| if value.key?(custom_keyword) [*callable.call(instance, value, instance_location)].each do |custom_keyword_result| custom_keyword_valid = custom_keyword_result == true diff --git a/test/json_schemer_test.rb b/test/json_schemer_test.rb index fae8aae..5eb1012 100644 --- a/test/json_schemer_test.rb +++ b/test/json_schemer_test.rb @@ -209,6 +209,25 @@ def test_it_validates_correctly_custom_keywords refute(schema.valid?(3)) end + def test_it_validates_custom_keywords_in_nested_schemas + schemer = JSONSchemer.schema( + { + 'properties' => { + 'x' => { + 'yah' => true + } + } + }, + keywords: { + 'yah' => proc do |instance, _schema, _instance_location| + instance == 'valid' + end + } + ) + assert(schemer.valid?({ 'x' => 'valid' })) + refute(schemer.valid?({ 'x' => 'invalid' })) + end + def test_it_handles_multiple_of_floats assert(JSONSchemer.schema({ 'multipleOf' => 0.01 }).valid?(8.61)) refute(JSONSchemer.schema({ 'multipleOf' => 0.01 }).valid?(8.666)) From 513c99130b9e7986b09881e7efd3fb7143744754 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Sat, 16 Dec 2023 14:44:55 -0800 Subject: [PATCH 09/32] Pass resolved instance location to custom keywords Never meant to expose `Location` hashes. Looks like this was an oversight when they were introduced. Noticed this while looking into: https://github.com/davishmcclurg/json_schemer/issues/166 --- lib/json_schemer/schema.rb | 3 ++- test/json_schemer_test.rb | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/lib/json_schemer/schema.rb b/lib/json_schemer/schema.rb index 39801e0..21d5fcd 100644 --- a/lib/json_schemer/schema.rb +++ b/lib/json_schemer/schema.rb @@ -149,9 +149,10 @@ def validate_instance(instance, instance_location, keyword_location, context) end if root.custom_keywords.any? + resolved_instance_location = Location.resolve(instance_location) root.custom_keywords.each do |custom_keyword, callable| if value.key?(custom_keyword) - [*callable.call(instance, value, instance_location)].each do |custom_keyword_result| + [*callable.call(instance, value, resolved_instance_location)].each do |custom_keyword_result| custom_keyword_valid = custom_keyword_result == true valid &&= custom_keyword_valid type = custom_keyword_result.is_a?(String) ? custom_keyword_result : custom_keyword diff --git a/test/json_schemer_test.rb b/test/json_schemer_test.rb index 5eb1012..f4fe278 100644 --- a/test/json_schemer_test.rb +++ b/test/json_schemer_test.rb @@ -228,6 +228,32 @@ def test_it_validates_custom_keywords_in_nested_schemas refute(schemer.valid?({ 'x' => 'invalid' })) end + def test_custom_keywords_receive_resolved_instance_location + custom_keyword_instance_location = nil + schemer = JSONSchemer.schema( + { + 'properties' => { + 'x' => { + 'yah' => true + }, + 'y' => { + 'yah' => true + } + } + }, + keywords: { + 'yah' => proc do |instance, _schema, instance_location| + custom_keyword_instance_location = instance_location + instance == 'valid' + end + } + ) + assert(schemer.valid?({ 'x' => 'valid' })) + assert_equal('/x', custom_keyword_instance_location) + refute(schemer.valid?({ 'y' => 'invalid' })) + assert_equal('/y', custom_keyword_instance_location) + end + def test_it_handles_multiple_of_floats assert(JSONSchemer.schema({ 'multipleOf' => 0.01 }).valid?(8.61)) refute(JSONSchemer.schema({ 'multipleOf' => 0.01 }).valid?(8.666)) From 094362adb3e0a3c5e2adeea18ade4332023e34df Mon Sep 17 00:00:00 2001 From: David Harsha Date: Thu, 16 Nov 2023 10:36:39 -0800 Subject: [PATCH 10/32] Consider all siblings in `unevaluated` keywords This uses all adjacent (same schema) results to calculate unevaluated keys/items, whether the keywords validated successfully or not. Previously, it only considered valid results, which causes confusing errors: ```ruby schemer = JSONSchemer.schema({ 'properties' => { 'x' => { 'type' => 'integer' } }, 'unevaluatedProperties' => false }) schemer.validate({ 'x' => 'invalid' }).map { _1.fetch_values('schema_pointer', 'error') } # => # [["/properties/x", "value at `/x` is not an integer"], # ["/unevaluatedProperties", "value at `/x` does not match schema"]] ``` The overall validation result shouldn't be affected, since the only additional keywords that it considers are failed ones (meaning the entire schema fails regardless of the unevaluated keys/items). Duplicate/unhelpful error messages are reduced, though, which is the main reason for making this change. Generally, this interpretation doesn't align with my reading of the spec, but there's been a lot of [discussion][0] around it and I think it makes sense from a user experience perspective. Hopefully it will get clarified in a future draft. Closes: https://github.com/davishmcclurg/json_schemer/issues/157 Related: - https://github.com/json-schema-org/json-schema-spec/issues/1172 - https://github.com/orgs/json-schema-org/discussions/67 - https://github.com/orgs/json-schema-org/discussions/57 - https://github.com/json-schema-org/json-schema-spec/blob/2cb7c7447f9b795c9940710bf0eda966a92c937f/adr/2022-04-08-cref-for-ambiguity-and-fix-later-gh-spec-issue-1172.md [0]: https://github.com/json-schema-org/json-schema-spec/issues/1172 --- .../draft202012/vocab/unevaluated.rb | 18 +- test/fixtures/draft2019-09.json | 1322 ++--------------- test/fixtures/draft2020-12.json | 1322 ++--------------- test/json_schemer_test.rb | 68 + 4 files changed, 378 insertions(+), 2352 deletions(-) diff --git a/lib/json_schemer/draft202012/vocab/unevaluated.rb b/lib/json_schemer/draft202012/vocab/unevaluated.rb index 0d86694..023b43e 100644 --- a/lib/json_schemer/draft202012/vocab/unevaluated.rb +++ b/lib/json_schemer/draft202012/vocab/unevaluated.rb @@ -18,7 +18,7 @@ def validate(instance, instance_location, keyword_location, context) unevaluated_items = instance.size.times.to_set context.adjacent_results.each_value do |adjacent_result| - collect_unevaluated_items(adjacent_result, instance_location, unevaluated_items) + collect_unevaluated_items(adjacent_result, unevaluated_items) end nested = unevaluated_items.map do |index| @@ -30,8 +30,7 @@ def validate(instance, instance_location, keyword_location, context) private - def collect_unevaluated_items(result, instance_location, unevaluated_items) - return unless result.valid && result.instance_location == instance_location + def collect_unevaluated_items(result, unevaluated_items) case result.source when Applicator::PrefixItems unevaluated_items.subtract(0..result.annotation) @@ -41,7 +40,9 @@ def collect_unevaluated_items(result, instance_location, unevaluated_items) unevaluated_items.subtract(result.annotation) end result.nested&.each do |subresult| - collect_unevaluated_items(subresult, instance_location, unevaluated_items) + if subresult.valid && subresult.instance_location == result.instance_location + collect_unevaluated_items(subresult, unevaluated_items) + end end end end @@ -61,7 +62,7 @@ def validate(instance, instance_location, keyword_location, context) evaluated_keys = Set[] context.adjacent_results.each_value do |adjacent_result| - collect_evaluated_keys(adjacent_result, instance_location, evaluated_keys) + collect_evaluated_keys(adjacent_result, evaluated_keys) end evaluated = instance.reject do |key, _value| @@ -77,14 +78,15 @@ def validate(instance, instance_location, keyword_location, context) private - def collect_evaluated_keys(result, instance_location, evaluated_keys) - return unless result.valid && result.instance_location == instance_location + def collect_evaluated_keys(result, evaluated_keys) case result.source when Applicator::Properties, Applicator::PatternProperties, Applicator::AdditionalProperties, UnevaluatedProperties evaluated_keys.merge(result.annotation) end result.nested&.each do |subresult| - collect_evaluated_keys(subresult, instance_location, evaluated_keys) + if subresult.valid && subresult.instance_location == result.instance_location + collect_evaluated_keys(subresult, evaluated_keys) + end end end end diff --git a/test/fixtures/draft2019-09.json b/test/fixtures/draft2019-09.json index da884b6..c26481e 100644 --- a/test/fixtures/draft2019-09.json +++ b/test/fixtures/draft2019-09.json @@ -23317,28 +23317,6 @@ "unevaluatedProperties": false }, "type": "schema" - }, - { - "data": { - "x": { - }, - "y": { - } - }, - "data_pointer": "/x", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "properties": { - "x": { - "$ref": "#" - } - }, - "unevaluatedProperties": false - }, - "type": "schema" } ], [ @@ -23362,52 +23340,6 @@ "unevaluatedProperties": false }, "type": "schema" - }, - { - "data": { - "x": { - }, - "y": { - } - }, - "data_pointer": "/x/x", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "properties": { - "x": { - "$ref": "#" - } - }, - "unevaluatedProperties": false - }, - "type": "schema" - }, - { - "data": { - "x": { - "x": { - }, - "y": { - } - } - }, - "data_pointer": "/x", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "properties": { - "x": { - "$ref": "#" - } - }, - "unevaluatedProperties": false - }, - "type": "schema" } ] ], @@ -23674,108 +23606,6 @@ "y" ] } - }, - { - "data": 1, - "data_pointer": "/a", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/one" - }, - { - "properties": { - "b": true - } - }, - { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } - } - ] - } - ], - "unevaluatedProperties": false - }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/b", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/one" - }, - { - "properties": { - "b": true - } - }, - { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } - } - ] - } - ], - "unevaluatedProperties": false - }, - "type": "schema" } ], [ @@ -24035,7 +23865,7 @@ }, { "data": 1, - "data_pointer": "/a", + "data_pointer": "/x", "schema": false, "schema_pointer": "/unevaluatedProperties", "root_schema": { @@ -24086,7 +23916,7 @@ }, { "data": 1, - "data_pointer": "/b", + "data_pointer": "/y", "schema": false, "schema_pointer": "/unevaluatedProperties", "root_schema": { @@ -24134,155 +23964,53 @@ "unevaluatedProperties": false }, "type": "schema" - }, + } + ] + ], + [ + [ { - "data": 1, - "data_pointer": "/x", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "data": { + }, + "data_pointer": "", + "schema": { + "required": [ + "c" + ], + "properties": { + "c": true + } + }, + "schema_pointer": "/$defs/two/oneOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/one" - }, - { - "properties": { - "b": true - } - }, - { "oneOf": [ { "$ref": "#/$defs/two" }, { "required": [ - "y" + "b" ], "properties": { - "y": true + "b": true + } + }, + { + "required": [ + "xx" + ], + "patternProperties": { + "x": true } - } - ] - } - ], - "unevaluatedProperties": false - }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/y", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/one" - }, - { - "properties": { - "b": true - } - }, - { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } - } - ] - } - ], - "unevaluatedProperties": false - }, - "type": "schema" - } - ] - ], - [ - [ - { - "data": { - }, - "data_pointer": "", - "schema": { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - "schema_pointer": "/$defs/two/oneOf/0", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true + }, + { + "required": [ + "all" + ], + "unevaluatedProperties": true } ] }, @@ -24682,477 +24410,16 @@ { "data": { }, - "data_pointer": "", - "schema": { - "required": [ - "a" - ], - "properties": { - "a": true - } - }, - "schema_pointer": "/oneOf/1", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "required", - "details": { - "missing_keys": [ - "a" - ] - } - } - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - { - "data": { - "a": 1, - "b": 1 - }, - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "oneOf" - }, - { - "data": 1, - "data_pointer": "/a", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/b", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "schema" - } - ], - [ - { - "data": { - "a": 1, - "c": 1 - }, - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } + "data_pointer": "", + "schema": { + "required": [ + "a" ], - "unevaluatedProperties": false + "properties": { + "a": true + } }, - "schema_pointer": "", + "schema_pointer": "/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -25221,14 +24488,34 @@ ], "unevaluatedProperties": false }, - "type": "oneOf" - }, + "type": "required", + "details": { + "missing_keys": [ + "a" + ] + } + } + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ { - "data": 1, - "data_pointer": "/a", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { + "data": { + "a": 1, + "b": 1 + }, + "data_pointer": "", + "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { @@ -25296,13 +24583,7 @@ ], "unevaluatedProperties": false }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/c", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -25371,14 +24652,14 @@ ], "unevaluatedProperties": false }, - "type": "schema" + "type": "oneOf" } ], [ { "data": { "a": 1, - "d": 1 + "c": 1 }, "data_pointer": "", "schema": { @@ -25519,13 +24800,16 @@ "unevaluatedProperties": false }, "type": "oneOf" - }, + } + ], + [ { - "data": 1, - "data_pointer": "/a", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { + "data": { + "a": 1, + "d": 1 + }, + "data_pointer": "", + "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { @@ -25593,13 +24877,7 @@ ], "unevaluatedProperties": false }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/d", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -25668,7 +24946,7 @@ ], "unevaluatedProperties": false }, - "type": "schema" + "type": "oneOf" } ], [ @@ -26653,181 +25931,11 @@ "data_pointer": "", "schema": { "required": [ - "all" - ], - "unevaluatedProperties": true - }, - "schema_pointer": "/$defs/one/oneOf/3", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "required", - "details": { - "missing_keys": [ - "all" - ] - } - }, - { - "data": { - "c": 1, - "d": 1 - }, - "data_pointer": "", - "schema": { - "required": [ - "a" - ], - "properties": { - "a": true - } - }, - "schema_pointer": "/oneOf/1", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "required", - "details": { - "missing_keys": [ - "a" - ] - } - }, - { - "data": 1, - "data_pointer": "/c", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "all" + ], + "unevaluatedProperties": true + }, + "schema_pointer": "/$defs/one/oneOf/3", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -26896,13 +26004,28 @@ ], "unevaluatedProperties": false }, - "type": "schema" + "type": "required", + "details": { + "missing_keys": [ + "all" + ] + } }, { - "data": 1, - "data_pointer": "/d", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "data": { + "c": 1, + "d": 1 + }, + "data_pointer": "", + "schema": { + "required": [ + "a" + ], + "properties": { + "a": true + } + }, + "schema_pointer": "/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -26971,19 +26094,16 @@ ], "unevaluatedProperties": false }, - "type": "schema" - } - ], - [ - - ], - [ - - ], - [ + "type": "required", + "details": { + "missing_keys": [ + "a" + ] + } + }, { "data": 1, - "data_pointer": "/foo", + "data_pointer": "/c", "schema": false, "schema_pointer": "/unevaluatedProperties", "root_schema": { @@ -27055,16 +26175,13 @@ "unevaluatedProperties": false }, "type": "schema" - } - ], - [ + }, { - "data": { - "xx": 1, - "a": 1 - }, - "data_pointer": "", - "schema": { + "data": 1, + "data_pointer": "/d", + "schema": false, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { @@ -27132,7 +26249,21 @@ ], "unevaluatedProperties": false }, - "schema_pointer": "", + "type": "schema" + } + ], + [ + + ], + [ + + ], + [ + { + "data": 1, + "data_pointer": "/foo", + "schema": false, + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -27201,14 +26332,17 @@ ], "unevaluatedProperties": false }, - "type": "oneOf" - }, + "type": "schema" + } + ], + [ { - "data": 1, - "data_pointer": "/xx", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { + "data": { + "xx": 1, + "a": 1 + }, + "data_pointer": "", + "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { @@ -27276,13 +26410,7 @@ ], "unevaluatedProperties": false }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/a", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -27351,7 +26479,7 @@ ], "unevaluatedProperties": false }, - "type": "schema" + "type": "oneOf" } ], [ @@ -28549,156 +27677,6 @@ "unevaluatedProperties": false }, "type": "oneOf" - }, - { - "data": 1, - "data_pointer": "/all", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/a", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "schema" } ] ], diff --git a/test/fixtures/draft2020-12.json b/test/fixtures/draft2020-12.json index 7ffbab6..3dc0cae 100644 --- a/test/fixtures/draft2020-12.json +++ b/test/fixtures/draft2020-12.json @@ -23294,28 +23294,6 @@ "unevaluatedProperties": false }, "type": "schema" - }, - { - "data": { - "x": { - }, - "y": { - } - }, - "data_pointer": "/x", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "x": { - "$ref": "#" - } - }, - "unevaluatedProperties": false - }, - "type": "schema" } ], [ @@ -23339,52 +23317,6 @@ "unevaluatedProperties": false }, "type": "schema" - }, - { - "data": { - "x": { - }, - "y": { - } - }, - "data_pointer": "/x/x", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "x": { - "$ref": "#" - } - }, - "unevaluatedProperties": false - }, - "type": "schema" - }, - { - "data": { - "x": { - "x": { - }, - "y": { - } - } - }, - "data_pointer": "/x", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "x": { - "$ref": "#" - } - }, - "unevaluatedProperties": false - }, - "type": "schema" } ] ], @@ -23651,108 +23583,6 @@ "y" ] } - }, - { - "data": 1, - "data_pointer": "/a", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/one" - }, - { - "properties": { - "b": true - } - }, - { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } - } - ] - } - ], - "unevaluatedProperties": false - }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/b", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/one" - }, - { - "properties": { - "b": true - } - }, - { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } - } - ] - } - ], - "unevaluatedProperties": false - }, - "type": "schema" } ], [ @@ -24012,7 +23842,7 @@ }, { "data": 1, - "data_pointer": "/a", + "data_pointer": "/x", "schema": false, "schema_pointer": "/unevaluatedProperties", "root_schema": { @@ -24063,7 +23893,7 @@ }, { "data": 1, - "data_pointer": "/b", + "data_pointer": "/y", "schema": false, "schema_pointer": "/unevaluatedProperties", "root_schema": { @@ -24111,155 +23941,53 @@ "unevaluatedProperties": false }, "type": "schema" - }, + } + ] + ], + [ + [ { - "data": 1, - "data_pointer": "/x", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "data": { + }, + "data_pointer": "", + "schema": { + "required": [ + "c" + ], + "properties": { + "c": true + } + }, + "schema_pointer": "/$defs/two/oneOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/one" - }, - { - "properties": { - "b": true - } - }, - { "oneOf": [ { "$ref": "#/$defs/two" }, { "required": [ - "y" + "b" ], "properties": { - "y": true + "b": true + } + }, + { + "required": [ + "xx" + ], + "patternProperties": { + "x": true } - } - ] - } - ], - "unevaluatedProperties": false - }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/y", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/one" - }, - { - "properties": { - "b": true - } - }, - { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } - } - ] - } - ], - "unevaluatedProperties": false - }, - "type": "schema" - } - ] - ], - [ - [ - { - "data": { - }, - "data_pointer": "", - "schema": { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - "schema_pointer": "/$defs/two/oneOf/0", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true + }, + { + "required": [ + "all" + ], + "unevaluatedProperties": true } ] }, @@ -24659,477 +24387,16 @@ { "data": { }, - "data_pointer": "", - "schema": { - "required": [ - "a" - ], - "properties": { - "a": true - } - }, - "schema_pointer": "/oneOf/1", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "required", - "details": { - "missing_keys": [ - "a" - ] - } - } - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - { - "data": { - "a": 1, - "b": 1 - }, - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "oneOf" - }, - { - "data": 1, - "data_pointer": "/a", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/b", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "schema" - } - ], - [ - { - "data": { - "a": 1, - "c": 1 - }, - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } + "data_pointer": "", + "schema": { + "required": [ + "a" ], - "unevaluatedProperties": false + "properties": { + "a": true + } }, - "schema_pointer": "", + "schema_pointer": "/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { @@ -25198,14 +24465,34 @@ ], "unevaluatedProperties": false }, - "type": "oneOf" - }, + "type": "required", + "details": { + "missing_keys": [ + "a" + ] + } + } + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ { - "data": 1, - "data_pointer": "/a", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { + "data": { + "a": 1, + "b": 1 + }, + "data_pointer": "", + "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "one": { @@ -25273,13 +24560,7 @@ ], "unevaluatedProperties": false }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/c", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { @@ -25348,14 +24629,14 @@ ], "unevaluatedProperties": false }, - "type": "schema" + "type": "oneOf" } ], [ { "data": { "a": 1, - "d": 1 + "c": 1 }, "data_pointer": "", "schema": { @@ -25496,13 +24777,16 @@ "unevaluatedProperties": false }, "type": "oneOf" - }, + } + ], + [ { - "data": 1, - "data_pointer": "/a", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { + "data": { + "a": 1, + "d": 1 + }, + "data_pointer": "", + "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "one": { @@ -25570,13 +24854,7 @@ ], "unevaluatedProperties": false }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/d", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { @@ -25645,7 +24923,7 @@ ], "unevaluatedProperties": false }, - "type": "schema" + "type": "oneOf" } ], [ @@ -26630,181 +25908,11 @@ "data_pointer": "", "schema": { "required": [ - "all" - ], - "unevaluatedProperties": true - }, - "schema_pointer": "/$defs/one/oneOf/3", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "required", - "details": { - "missing_keys": [ - "all" - ] - } - }, - { - "data": { - "c": 1, - "d": 1 - }, - "data_pointer": "", - "schema": { - "required": [ - "a" - ], - "properties": { - "a": true - } - }, - "schema_pointer": "/oneOf/1", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "required", - "details": { - "missing_keys": [ - "a" - ] - } - }, - { - "data": 1, - "data_pointer": "/c", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "all" + ], + "unevaluatedProperties": true + }, + "schema_pointer": "/$defs/one/oneOf/3", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { @@ -26873,13 +25981,28 @@ ], "unevaluatedProperties": false }, - "type": "schema" + "type": "required", + "details": { + "missing_keys": [ + "all" + ] + } }, { - "data": 1, - "data_pointer": "/d", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "data": { + "c": 1, + "d": 1 + }, + "data_pointer": "", + "schema": { + "required": [ + "a" + ], + "properties": { + "a": true + } + }, + "schema_pointer": "/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { @@ -26948,19 +26071,16 @@ ], "unevaluatedProperties": false }, - "type": "schema" - } - ], - [ - - ], - [ - - ], - [ + "type": "required", + "details": { + "missing_keys": [ + "a" + ] + } + }, { "data": 1, - "data_pointer": "/foo", + "data_pointer": "/c", "schema": false, "schema_pointer": "/unevaluatedProperties", "root_schema": { @@ -27032,16 +26152,13 @@ "unevaluatedProperties": false }, "type": "schema" - } - ], - [ + }, { - "data": { - "xx": 1, - "a": 1 - }, - "data_pointer": "", - "schema": { + "data": 1, + "data_pointer": "/d", + "schema": false, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "one": { @@ -27109,7 +26226,21 @@ ], "unevaluatedProperties": false }, - "schema_pointer": "", + "type": "schema" + } + ], + [ + + ], + [ + + ], + [ + { + "data": 1, + "data_pointer": "/foo", + "schema": false, + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { @@ -27178,14 +26309,17 @@ ], "unevaluatedProperties": false }, - "type": "oneOf" - }, + "type": "schema" + } + ], + [ { - "data": 1, - "data_pointer": "/xx", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { + "data": { + "xx": 1, + "a": 1 + }, + "data_pointer": "", + "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "one": { @@ -27253,13 +26387,7 @@ ], "unevaluatedProperties": false }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/a", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { @@ -27328,7 +26456,7 @@ ], "unevaluatedProperties": false }, - "type": "schema" + "type": "oneOf" } ], [ @@ -28526,156 +27654,6 @@ "unevaluatedProperties": false }, "type": "oneOf" - }, - { - "data": 1, - "data_pointer": "/all", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/a", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], - "properties": { - "d": true - } - } - ] - } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } - ], - "unevaluatedProperties": false - }, - "type": "schema" } ] ], diff --git a/test/json_schemer_test.rb b/test/json_schemer_test.rb index f4fe278..22e31ca 100644 --- a/test/json_schemer_test.rb +++ b/test/json_schemer_test.rb @@ -324,6 +324,74 @@ def test_draft7_additional_items_error assert_equal('array items at root do not match `additionalItems` schema', schemer.validate([1, 2], :resolve_enumerators => true).dig('errors', 1, 'error')) end + def test_unevaluated_items_errors + schemer = JSONSchemer.schema({ + 'prefixItems' => [ + { 'type' => 'integer' } + ], + 'unevaluatedItems' => false + }) + assert_equal(['/prefixItems/0'], schemer.validate(['invalid']).map { |error| error.fetch('schema_pointer') }) + assert_equal(['/unevaluatedItems'], schemer.validate([1, 'unevaluated']).map { |error| error.fetch('schema_pointer') }) + assert_equal(['/prefixItems/0', '/unevaluatedItems'], schemer.validate(['invalid', 'unevaluated']).map { |error| error.fetch('schema_pointer') }) + end + + def test_unevaluated_properties_errors + schemer = JSONSchemer.schema({ + 'properties' => { + 'foo' => { + 'type' => 'integer' + } + }, + 'unevaluatedProperties' => false + }) + assert_equal(['/properties/foo'], schemer.validate({ 'foo' => 'invalid' }).map { |error| error.fetch('schema_pointer') }) + assert_equal(['/unevaluatedProperties'], schemer.validate({ 'bar' => 'unevaluated' }).map { |error| error.fetch('schema_pointer') }) + assert_equal(['/unevaluatedProperties'], schemer.validate({ 'foo' => 1, 'bar' => 'unevaluated' }).map { |error| error.fetch('schema_pointer') }) + assert_equal(['/properties/foo', '/unevaluatedProperties'], schemer.validate({ 'foo' => 'invalid', 'bar' => '?' }).map { |error| error.fetch('schema_pointer') }) + + schemer = JSONSchemer.schema({ + 'properties' => { + 'foo' => { + 'type' => 'integer' + }, + 'bar' => { + 'type' => 'string' + } + }, + 'unevaluatedProperties' => false + }) + assert_equal(['/properties/foo'], schemer.validate({ 'foo' => 'invalid', 'bar' => 'valid' }).map { |error| error.fetch('schema_pointer') }) + assert_equal(['/properties/bar'], schemer.validate({ 'foo' => 1, 'bar' => 1 }).map { |error| error.fetch('schema_pointer') }) + end + + # https://github.com/json-schema-org/json-schema-spec/issues/1172#issuecomment-1062540587 + def test_unevaluated_properties_inconsistent_errors + all_of = [ + { + 'properties' => { + 'foo' => true + } + }, + false + ] + schemer1 = JSONSchemer.schema({ + 'allOf' => all_of, + 'unevaluatedProperties' => false + }) + schemer2 = JSONSchemer.schema({ + 'allOf' => [ + { 'allOf' => all_of } + ], + 'unevaluatedProperties' => false + }) + instance = { + 'foo' => true + } + assert_equal(['/allOf/1'], schemer1.validate(instance).map { |error| error.fetch('schema_pointer') }) + assert_equal(['/allOf/0/allOf/1', '/unevaluatedProperties'], schemer2.validate(instance).map { |error| error.fetch('schema_pointer') }) + end + def test_inspect output = JSONSchemer.openapi31_document.inspect assert_includes(output, 'JSONSchemer::Schema') From e8750cf682f94718c2188e6d3867d45e5d66ca73 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Sat, 16 Dec 2023 14:51:55 -0800 Subject: [PATCH 11/32] Add false schema errors for unevaluated keywords And change `additionalProperties` message to be consistent. --- lib/json_schemer/draft202012/vocab/applicator.rb | 2 +- lib/json_schemer/draft202012/vocab/unevaluated.rb | 8 ++++++++ test/output_format_test.rb | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/json_schemer/draft202012/vocab/applicator.rb b/lib/json_schemer/draft202012/vocab/applicator.rb index c759d7c..e756f17 100644 --- a/lib/json_schemer/draft202012/vocab/applicator.rb +++ b/lib/json_schemer/draft202012/vocab/applicator.rb @@ -300,7 +300,7 @@ def error(formatted_instance_location:, **) end def false_schema_error(formatted_instance_location:, **) - "object property at #{formatted_instance_location} is not defined and schema does not allow additional properties" + "object property at #{formatted_instance_location} is a disallowed additional property" end def parse diff --git a/lib/json_schemer/draft202012/vocab/unevaluated.rb b/lib/json_schemer/draft202012/vocab/unevaluated.rb index 023b43e..a24d868 100644 --- a/lib/json_schemer/draft202012/vocab/unevaluated.rb +++ b/lib/json_schemer/draft202012/vocab/unevaluated.rb @@ -8,6 +8,10 @@ def error(formatted_instance_location:, **) "array items at #{formatted_instance_location} do not match `unevaluatedItems` schema" end + def false_schema_error(formatted_instance_location:, **) + "array item at #{formatted_instance_location} is a disallowed unevaluated item" + end + def parse subschema(value) end @@ -52,6 +56,10 @@ def error(formatted_instance_location:, **) "object properties at #{formatted_instance_location} do not match `unevaluatedProperties` schema" end + def false_schema_error(formatted_instance_location:, **) + "object property at #{formatted_instance_location} is a disallowed unevaluated property" + end + def parse subschema(value) end diff --git a/test/output_format_test.rb b/test/output_format_test.rb index 001bb5b..6463f29 100644 --- a/test/output_format_test.rb +++ b/test/output_format_test.rb @@ -65,7 +65,7 @@ def test_output_formats_match_specification_examples 'keywordLocation' => '/items/$ref/additionalProperties', 'absoluteKeywordLocation' => 'https://example.com/polygon#/$defs/point/additionalProperties', 'instanceLocation' => '/1/z', - 'error' => 'object property at `/1/z` is not defined and schema does not allow additional properties' # 'Additional property \'z\' found but was invalid.' + 'error' => 'object property at `/1/z` is a disallowed additional property' # 'Additional property \'z\' found but was invalid.' }, { 'valid' => false, # not in spec @@ -107,7 +107,7 @@ def test_output_formats_match_specification_examples 'keywordLocation' => '/items/$ref/additionalProperties', 'absoluteKeywordLocation' => 'https://example.com/polygon#/$defs/point/additionalProperties', 'instanceLocation' => '/1/z', - 'error' => 'object property at `/1/z` is not defined and schema does not allow additional properties' # 'Additional property \'z\' found but was invalid.' + 'error' => 'object property at `/1/z` is a disallowed additional property' # 'Additional property \'z\' found but was invalid.' }, { 'valid' => false, From a72473dc84199107ddedc8998950e5b82273232a Mon Sep 17 00:00:00 2001 From: David Harsha Date: Fri, 19 Jan 2024 19:46:52 -0800 Subject: [PATCH 12/32] Add symbol option to `insert_property_defaults` This allows default properties to be inserted using symbol keys. I didn't think about this when adding symbol key support everywhere. I don't love overloading `insert_property_defaults` like this, but it seems slightly better than adding another option (or `property_default_resolver: :symbol` or whatever). Addresses: https://github.com/davishmcclurg/json_schemer/issues/166 --- README.md | 3 ++- lib/json_schemer/schema.rb | 11 +++++++++-- test/hooks_test.rb | 22 ++++++++++++++++++++++ 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fca5266..7f1276f 100644 --- a/README.md +++ b/README.md @@ -212,7 +212,8 @@ JSONSchemer.schema( }, # insert default property values during validation - # true/false + # string keys by default (use `:symbol` to insert symbol keys) + # true/false/:symbol # default: false insert_property_defaults: true, diff --git a/lib/json_schemer/schema.rb b/lib/json_schemer/schema.rb index 21d5fcd..b851efc 100644 --- a/lib/json_schemer/schema.rb +++ b/lib/json_schemer/schema.rb @@ -46,10 +46,13 @@ def original_instance(instance_location) false end end + SYMBOL_PROPERTY_DEFAULT_RESOLVER = proc do |instance, property, results_with_tree_validity| + DEFAULT_PROPERTY_DEFAULT_RESOLVER.call(instance, property.to_sym, results_with_tree_validity) + end attr_accessor :base_uri, :meta_schema, :keywords, :keyword_order attr_reader :value, :parent, :root, :parsed - attr_reader :vocabulary, :format, :formats, :content_encodings, :content_media_types, :custom_keywords, :before_property_validation, :after_property_validation, :insert_property_defaults, :property_default_resolver + attr_reader :vocabulary, :format, :formats, :content_encodings, :content_media_types, :custom_keywords, :before_property_validation, :after_property_validation, :insert_property_defaults def initialize( value, @@ -67,7 +70,7 @@ def initialize( before_property_validation: DEFAULT_BEFORE_PROPERTY_VALIDATION, after_property_validation: DEFAULT_AFTER_PROPERTY_VALIDATION, insert_property_defaults: false, - property_default_resolver: DEFAULT_PROPERTY_DEFAULT_RESOLVER, + property_default_resolver: nil, ref_resolver: DEFAULT_REF_RESOLVER, regexp_resolver: 'ruby', output_format: 'classic', @@ -401,6 +404,10 @@ def root_keyword_location @root_keyword_location ||= Location.root end + def property_default_resolver + @property_default_resolver ||= insert_property_defaults == :symbol ? SYMBOL_PROPERTY_DEFAULT_RESOLVER : DEFAULT_PROPERTY_DEFAULT_RESOLVER + end + def ref_resolver @ref_resolver ||= @original_ref_resolver == 'net/http' ? CachedResolver.new(&NET_HTTP_REF_RESOLVER) : @original_ref_resolver end diff --git a/test/hooks_test.rb b/test/hooks_test.rb index 033a1c3..530e7a1 100644 --- a/test/hooks_test.rb +++ b/test/hooks_test.rb @@ -100,6 +100,28 @@ def test_it_inserts_defaults_in_symbol_keys assert_equal('x', instance.dig(:a, :b, 'c')) end + def test_it_can_insert_symbol_keys + schema = { + 'properties' => { + 'a' => { + 'default' => 'x' + } + } + } + + schemer = JSONSchemer.schema(schema, insert_property_defaults: true) + instance = {} + schemer.validate(instance) + refute(instance.key?(:a)) + assert_equal('x', instance.fetch('a')) + + schemer = JSONSchemer.schema(schema, insert_property_defaults: :symbol) + instance = {} + schemer.validate(instance) + refute(instance.key?('a')) + assert_equal('x', instance.fetch(:a)) + end + def test_it_does_not_fail_using_insert_defaults_when_no_properties_are_defined_by_schema schema = { '$comment' => 'Mostly empty schema' From 1a4c685cdaaa8235eecc650426553226d5e4e4cf Mon Sep 17 00:00:00 2001 From: David Harsha Date: Sat, 20 Jan 2024 11:00:53 -0800 Subject: [PATCH 13/32] Only parse `$schema` during schema validation Parsing the whole schema can lead to errors for malformed keyword values, eg: ``` >> JSONSchemer.schema({ 'properties' => '' }) /Users/dharsha/repos/json_schemer/lib/json_schemer/draft202012/vocab/applicator.rb:224:in `parse': undefined method `each_with_object' for an instance of String (NoMethodError) value.each_with_object({}) do |(property, subschema), out| ^^^^^^^^^^^^^^^^^ from /Users/dharsha/repos/json_schemer/lib/json_schemer/keyword.rb:14:in `initialize' ``` Instead, this creates a minimal parseable schema with just the `$schema` value, if it's present and a string. That way the meta schema can be determined as usual and then used to validate the provided schema. Addresses: https://github.com/davishmcclurg/json_schemer/issues/167 --- lib/json_schemer.rb | 15 ++++++-- test/json_schemer_test.rb | 75 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 2 deletions(-) diff --git a/lib/json_schemer.rb b/lib/json_schemer.rb index 49ad144..a5d314d 100644 --- a/lib/json_schemer.rb +++ b/lib/json_schemer.rb @@ -135,11 +135,11 @@ def schema(schema, meta_schema: draft202012, **options) end def valid_schema?(schema, **options) - schema(schema, **options).valid_schema? + meta_schema(schema, options).valid?(schema) end def validate_schema(schema, **options) - schema(schema, **options).validate_schema + meta_schema(schema, options).validate(schema) end def draft202012 @@ -245,6 +245,17 @@ def openapi30_document def openapi(document, **options) OpenAPI.new(document, **options) end + + private + + def meta_schema(schema, options) + parseable_schema = {} + if schema.is_a?(Hash) + meta_schema = schema['$schema'] || schema[:'$schema'] + parseable_schema['$schema'] = meta_schema if meta_schema.is_a?(String) + end + schema(parseable_schema, **options).meta_schema + end end META_SCHEMA_CALLABLES_BY_BASE_URI_STR = { diff --git a/test/json_schemer_test.rb b/test/json_schemer_test.rb index 22e31ca..4a40661 100644 --- a/test/json_schemer_test.rb +++ b/test/json_schemer_test.rb @@ -449,6 +449,81 @@ def test_it_allows_validating_schemas assert_equal([required_error], JSONSchemer.validate_schema(invalid_detected_draft4_schema).to_a) end + def test_schema_validation_invalid_meta_schema + refute(JSONSchemer.valid_schema?({ '$schema' => {} })) + end + + def test_schema_validation_parse_error + refute(JSONSchemer.valid_schema?({ 'properties' => '' })) + assert(JSONSchemer.valid_schema?({ 'properties' => {} })) + assert(JSONSchemer.valid_schema?({ 'items' => {} })) + refute(JSONSchemer.valid_schema?({ 'items' => [{}] })) + assert(JSONSchemer.valid_schema?({ 'items' => [{}] }, :meta_schema => JSONSchemer.draft201909)) + assert(JSONSchemer.valid_schema?({ '$schema' => 'https://json-schema.org/draft/2019-09/schema', 'items' => [{}] })) + assert(JSONSchemer.valid_schema?({ '$schema': 'https://json-schema.org/draft/2019-09/schema', 'items' => [{}] })) + + refute_empty(JSONSchemer.validate_schema({ 'properties' => '' }).to_a) + assert_empty(JSONSchemer.validate_schema({ 'properties' => {} }).to_a) + assert_empty(JSONSchemer.validate_schema({ 'items' => {} }).to_a) + refute_empty(JSONSchemer.validate_schema({ 'items' => [{}] }).to_a) + assert_empty(JSONSchemer.validate_schema({ 'items' => [{}] }, :meta_schema => JSONSchemer.draft201909).to_a) + assert_empty(JSONSchemer.validate_schema({ '$schema' => 'https://json-schema.org/draft/2019-09/schema', 'items' => [{}] }).to_a) + assert_empty(JSONSchemer.validate_schema({ '$schema': 'https://json-schema.org/draft/2019-09/schema', 'items' => [{}] }).to_a) + end + + def test_schema_validation_parse_error_with_custom_meta_schema + custom_meta_schema = { + '$vocabulary' => {}, + 'oneOf' => [ + { 'required' => ['$id'] }, + { 'required' => ['items'] } + ], + 'properties' => { + 'items' => { + 'type' => 'string' + } + } + } + custom_meta_schemer = JSONSchemer.schema(custom_meta_schema) + ref_resolver = { + URI('https://example.com/custom-meta-schema') => custom_meta_schema + }.to_proc + + assert(JSONSchemer.valid_schema?({})) + refute(JSONSchemer.valid_schema?({}, meta_schema: custom_meta_schemer)) + refute(JSONSchemer.valid_schema?({ '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver)) + refute(JSONSchemer.valid_schema?({ '$schema': 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver)) + refute(JSONSchemer.valid_schema?({ '$id' => {} })) + assert(JSONSchemer.valid_schema?({ '$id' => {} }, meta_schema: custom_meta_schemer)) + assert(JSONSchemer.valid_schema?({ '$id' => {}, '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver)) + assert(JSONSchemer.valid_schema?({ '$id' => {}, '$schema': 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver)) + assert(JSONSchemer.valid_schema?({ 'items' => {} })) + refute(JSONSchemer.valid_schema?({ 'items' => 'yah' })) + refute(JSONSchemer.valid_schema?({ 'items' => {} }, meta_schema: custom_meta_schemer)) + assert(JSONSchemer.valid_schema?({ 'items' => 'yah' }, meta_schema: custom_meta_schemer)) + refute(JSONSchemer.valid_schema?({ 'items' => {}, '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver)) + assert(JSONSchemer.valid_schema?({ 'items' => 'yah', '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver)) + refute(JSONSchemer.valid_schema?({ 'items' => {}, '$schema': 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver)) + assert(JSONSchemer.valid_schema?({ 'items' => 'yah', '$schema': 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver)) + + assert_empty(JSONSchemer.validate_schema({}).to_a) + refute_empty(JSONSchemer.validate_schema({}, meta_schema: custom_meta_schemer).to_a) + refute_empty(JSONSchemer.validate_schema({ '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) + refute_empty(JSONSchemer.validate_schema({ '$schema': 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) + refute_empty(JSONSchemer.validate_schema({ '$id' => {} }).to_a) + assert_empty(JSONSchemer.validate_schema({ '$id' => {} }, meta_schema: custom_meta_schemer).to_a) + assert_empty(JSONSchemer.validate_schema({ '$id' => {}, '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) + assert_empty(JSONSchemer.validate_schema({ '$id' => {}, '$schema': 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) + assert_empty(JSONSchemer.validate_schema({ 'items' => {} }).to_a) + refute_empty(JSONSchemer.validate_schema({ 'items' => 'yah' }).to_a) + refute_empty(JSONSchemer.validate_schema({ 'items' => {} }, meta_schema: custom_meta_schemer).to_a) + assert_empty(JSONSchemer.validate_schema({ 'items' => 'yah' }, meta_schema: custom_meta_schemer).to_a) + refute_empty(JSONSchemer.validate_schema({ 'items' => {}, '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) + assert_empty(JSONSchemer.validate_schema({ 'items' => 'yah', '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) + refute_empty(JSONSchemer.validate_schema({ 'items' => {}, '$schema': 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) + assert_empty(JSONSchemer.validate_schema({ 'items' => 'yah', '$schema': 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) + end + def test_non_string_keys schemer = JSONSchemer.schema({ properties: { From bbcd0cea20cbaa61cf2bdae5f53840861cae54b8 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Sat, 20 Jan 2024 15:14:20 -0800 Subject: [PATCH 14/32] Support String and Pathname schema validation This aligns the schema generation (`JSONSchemer.schema`) and schema validation (`valid_schema?` and `validate_schema`) method interfaces, so that they all take the same schema object types. --- lib/json_schemer.rb | 36 ++++++++++++++++----------- test/json_schemer_test.rb | 33 ++++++++++++++++++++++++ test/schemas/$schema_invalid.json | 3 +++ test/schemas/$schema_items_array.json | 4 +++ test/schemas/items_array.json | 3 +++ test/schemas/items_object.json | 3 +++ 6 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 test/schemas/$schema_invalid.json create mode 100644 test/schemas/$schema_items_array.json create mode 100644 test/schemas/items_array.json create mode 100644 test/schemas/items_object.json diff --git a/lib/json_schemer.rb b/lib/json_schemer.rb index a5d314d..8b48846 100644 --- a/lib/json_schemer.rb +++ b/lib/json_schemer.rb @@ -114,20 +114,7 @@ class InvalidEcmaRegexp < StandardError; end class << self def schema(schema, meta_schema: draft202012, **options) - case schema - when String - schema = JSON.parse(schema) - when Pathname - base_uri = URI.parse(File.join('file:', URI::DEFAULT_PARSER.escape(schema.realpath.to_s))) - options[:base_uri] = base_uri - schema = if options.key?(:ref_resolver) - FILE_URI_REF_RESOLVER.call(base_uri) - else - ref_resolver = CachedResolver.new(&FILE_URI_REF_RESOLVER) - options[:ref_resolver] = ref_resolver - ref_resolver.call(base_uri) - end - end + schema = resolve(schema, options) unless meta_schema.is_a?(Schema) meta_schema = META_SCHEMAS_BY_BASE_URI_STR[meta_schema] || raise(UnsupportedMetaSchema, meta_schema) end @@ -135,10 +122,12 @@ def schema(schema, meta_schema: draft202012, **options) end def valid_schema?(schema, **options) + schema = resolve(schema, options) meta_schema(schema, options).valid?(schema) end def validate_schema(schema, **options) + schema = resolve(schema, options) meta_schema(schema, options).validate(schema) end @@ -248,6 +237,25 @@ def openapi(document, **options) private + def resolve(schema, options) + case schema + when String + JSON.parse(schema) + when Pathname + base_uri = URI.parse(File.join('file:', URI::DEFAULT_PARSER.escape(schema.realpath.to_s))) + options[:base_uri] = base_uri + if options.key?(:ref_resolver) + FILE_URI_REF_RESOLVER.call(base_uri) + else + ref_resolver = CachedResolver.new(&FILE_URI_REF_RESOLVER) + options[:ref_resolver] = ref_resolver + ref_resolver.call(base_uri) + end + else + schema + end + end + def meta_schema(schema, options) parseable_schema = {} if schema.is_a?(Hash) diff --git a/test/json_schemer_test.rb b/test/json_schemer_test.rb index 4a40661..0998ee6 100644 --- a/test/json_schemer_test.rb +++ b/test/json_schemer_test.rb @@ -524,6 +524,39 @@ def test_schema_validation_parse_error_with_custom_meta_schema assert_empty(JSONSchemer.validate_schema({ 'items' => 'yah', '$schema': 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) end + def test_schema_validation_json + refute(JSONSchemer.valid_schema?('{"$schema":{}}')) + assert(JSONSchemer.valid_schema?('{"items":{}}')) + refute(JSONSchemer.valid_schema?('{"items":[{}]}')) + assert(JSONSchemer.valid_schema?('{"items":[{}]}', :meta_schema => JSONSchemer.draft201909)) + assert(JSONSchemer.valid_schema?('{"items":[{}],"$schema":"https://json-schema.org/draft/2019-09/schema"}')) + + refute_empty(JSONSchemer.validate_schema('{"$schema":{}}').to_a) + assert_empty(JSONSchemer.validate_schema('{"items":{}}').to_a) + refute_empty(JSONSchemer.validate_schema('{"items":[{}]}').to_a) + assert_empty(JSONSchemer.validate_schema('{"items":[{}]}', :meta_schema => JSONSchemer.draft201909).to_a) + assert_empty(JSONSchemer.validate_schema('{"items":[{}],"$schema":"https://json-schema.org/draft/2019-09/schema"}').to_a) + end + + def test_schema_validation_pathname + schema_invalid = Pathname.new(__dir__).join('schemas', '$schema_invalid.json') + items_object = Pathname.new(__dir__).join('schemas', 'items_object.json') + items_array = Pathname.new(__dir__).join('schemas', 'items_array.json') + schema_items_array = Pathname.new(__dir__).join('schemas', '$schema_items_array.json') + + refute(JSONSchemer.valid_schema?(schema_invalid)) + assert(JSONSchemer.valid_schema?(items_object)) + refute(JSONSchemer.valid_schema?(items_array)) + assert(JSONSchemer.valid_schema?(items_array, :meta_schema => JSONSchemer.draft201909)) + assert(JSONSchemer.valid_schema?(schema_items_array)) + + refute_empty(JSONSchemer.validate_schema(schema_invalid).to_a) + assert_empty(JSONSchemer.validate_schema(items_object).to_a) + refute_empty(JSONSchemer.validate_schema(items_array).to_a) + assert_empty(JSONSchemer.validate_schema(items_array, :meta_schema => JSONSchemer.draft201909).to_a) + assert_empty(JSONSchemer.validate_schema(schema_items_array).to_a) + end + def test_non_string_keys schemer = JSONSchemer.schema({ properties: { diff --git a/test/schemas/$schema_invalid.json b/test/schemas/$schema_invalid.json new file mode 100644 index 0000000..81d4146 --- /dev/null +++ b/test/schemas/$schema_invalid.json @@ -0,0 +1,3 @@ +{ + "$schema": {} +} diff --git a/test/schemas/$schema_items_array.json b/test/schemas/$schema_items_array.json new file mode 100644 index 0000000..a83ec08 --- /dev/null +++ b/test/schemas/$schema_items_array.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "items": [{}] +} diff --git a/test/schemas/items_array.json b/test/schemas/items_array.json new file mode 100644 index 0000000..3423ec0 --- /dev/null +++ b/test/schemas/items_array.json @@ -0,0 +1,3 @@ +{ + "items": [{}] +} diff --git a/test/schemas/items_object.json b/test/schemas/items_object.json new file mode 100644 index 0000000..d30afd8 --- /dev/null +++ b/test/schemas/items_object.json @@ -0,0 +1,3 @@ +{ + "items": {} +} From 2eeef77de522f127619b7d0faa51e0d7e40977ad Mon Sep 17 00:00:00 2001 From: David Harsha Date: Tue, 23 Jan 2024 13:43:15 -0800 Subject: [PATCH 15/32] Allow passing options to schema validation methods The default meta schemas don't inherit the provided options, because they're initialized with their own options and cached. To override validation-time options, they need to be passed directly to the validation methods. This is a little brittle because the validation-time options are listed separately to pull them out of the options hash. I couldn't think of a better way to split the initialization and validation options. --- lib/json_schemer.rb | 4 ++-- lib/json_schemer/schema.rb | 8 ++++---- test/json_schemer_test.rb | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/lib/json_schemer.rb b/lib/json_schemer.rb index 8b48846..4ea1aad 100644 --- a/lib/json_schemer.rb +++ b/lib/json_schemer.rb @@ -123,12 +123,12 @@ def schema(schema, meta_schema: draft202012, **options) def valid_schema?(schema, **options) schema = resolve(schema, options) - meta_schema(schema, options).valid?(schema) + meta_schema(schema, options).valid?(schema, **options.slice(:output_format, :resolve_enumerators, :access_mode)) end def validate_schema(schema, **options) schema = resolve(schema, options) - meta_schema(schema, options).validate(schema) + meta_schema(schema, options).validate(schema, **options.slice(:output_format, :resolve_enumerators, :access_mode)) end def draft202012 diff --git a/lib/json_schemer/schema.rb b/lib/json_schemer/schema.rb index b851efc..57da708 100644 --- a/lib/json_schemer/schema.rb +++ b/lib/json_schemer/schema.rb @@ -118,12 +118,12 @@ def validate(instance, output_format: @output_format, resolve_enumerators: @reso output end - def valid_schema? - meta_schema.valid?(value) + def valid_schema?(**options) + meta_schema.valid?(value, **options) end - def validate_schema - meta_schema.validate(value) + def validate_schema(**options) + meta_schema.validate(value, **options) end def ref(value) diff --git a/test/json_schemer_test.rb b/test/json_schemer_test.rb index 0998ee6..79a855b 100644 --- a/test/json_schemer_test.rb +++ b/test/json_schemer_test.rb @@ -557,6 +557,43 @@ def test_schema_validation_pathname assert_empty(JSONSchemer.validate_schema(schema_items_array).to_a) end + def test_schema_validation_options + custom_meta_schemer = JSONSchemer.schema({ + '$vocabulary' => {}, + 'properties' => { + 'yah' => { + 'readOnly' => true + } + } + }) + read_only_schemer = JSONSchemer.schema({ 'yah' => 1 }, meta_schema: custom_meta_schemer) + invalid_ref_schemer = JSONSchemer.schema({ '$ref' => {} }) + + assert(JSONSchemer.valid_schema?({ 'yah' => 1 }, meta_schema: custom_meta_schemer)) + assert(JSONSchemer.valid_schema?({ 'yah' => 1 }, meta_schema: custom_meta_schemer, access_mode: 'read')) + refute(JSONSchemer.valid_schema?({ 'yah' => 1 }, meta_schema: custom_meta_schemer, access_mode: 'write')) + + assert(read_only_schemer.valid_schema?) + assert(read_only_schemer.valid_schema?(access_mode: 'read')) + refute(read_only_schemer.valid_schema?(access_mode: 'write')) + + assert_equal(['string'], JSONSchemer.validate_schema({ '$schema' => {} }).map { |result| result.fetch('type') }) + refute(JSONSchemer.validate_schema({ '$schema' => {} }, output_format: 'basic').fetch('valid')) + assert_kind_of(Enumerator, JSONSchemer.validate_schema({ '$schema' => {} }, output_format: 'basic').fetch('errors')) + assert_kind_of(Array, JSONSchemer.validate_schema({ '$schema' => {} }, output_format: 'basic', resolve_enumerators: true).fetch('errors')) + assert_empty(JSONSchemer.validate_schema({ 'yah' => 1 }, meta_schema: custom_meta_schemer).to_a) + assert_empty(JSONSchemer.validate_schema({ 'yah' => 1 }, meta_schema: custom_meta_schemer, access_mode: 'read').to_a) + refute_empty(JSONSchemer.validate_schema({ 'yah' => 1 }, meta_schema: custom_meta_schemer, access_mode: 'write').to_a) + + assert_equal(['string'], invalid_ref_schemer.validate_schema.map { |result| result.fetch('type') }) + refute(invalid_ref_schemer.validate_schema(output_format: 'basic').fetch('valid')) + assert_kind_of(Enumerator, invalid_ref_schemer.validate_schema(output_format: 'basic').fetch('errors')) + assert_kind_of(Array, invalid_ref_schemer.validate_schema(output_format: 'basic', resolve_enumerators: true).fetch('errors')) + assert_empty(read_only_schemer.validate_schema.to_a) + assert_empty(read_only_schemer.validate_schema(access_mode: 'read').to_a) + refute_empty(read_only_schemer.validate_schema(access_mode: 'write').to_a) + end + def test_non_string_keys schemer = JSONSchemer.schema({ properties: { From f96babef3050c1eaf4fbdcebea351d0f1348f38d Mon Sep 17 00:00:00 2001 From: David Harsha Date: Sun, 25 Feb 2024 13:02:32 -0800 Subject: [PATCH 16/32] Follow refs when finding default property values This resolves any `ref_schema` keywords (`$ref`, `$dynamicRef`, `$recursiveRef`) when looking for `default` keywords for `insert_property_defaults`. It follows the keyword order defined in the vocabulary (`$ref` first, then `$dynamicRef`/`$recursiveRef` depending on the meta schema) and searches depth-first (ie, follows a `$ref` chain until a leaf schema before moving on to a sibling `$dynamicRef`). The first `default` keyword found is used, meaning a `$ref` default can be overwritten by the including schema, eg: ```json { "properties": { "example": { "$ref": "#/$defs/ref", "default": "override!" } }, "$defs": { "ref": { "default": "overridden" } } } ``` Closes: https://github.com/davishmcclurg/json_schemer/issues/173 --- lib/json_schemer/result.rb | 16 +++- test/hooks_test.rb | 187 +++++++++++++++++++++++++++++++++++++ 2 files changed, 201 insertions(+), 2 deletions(-) diff --git a/lib/json_schemer/result.rb b/lib/json_schemer/result.rb index 52b05d9..1c021e1 100644 --- a/lib/json_schemer/result.rb +++ b/lib/json_schemer/result.rb @@ -201,8 +201,8 @@ def insert_property_defaults(context) if result.source.is_a?(Schema::PROPERTIES_KEYWORD_CLASS) && result.instance.is_a?(Hash) result.source.parsed.each do |property, schema| - next if result.instance.key?(property) || !schema.parsed.key?('default') - default = schema.parsed.fetch('default') + next if result.instance.key?(property) + next unless default = default_keyword_instance(schema) instance_location = Location.join(result.instance_location, property) keyword_location = Location.join(Location.join(result.keyword_location, property), default.keyword) default_result = default.validate(nil, instance_location, keyword_location, nil) @@ -225,5 +225,17 @@ def insert_property_defaults(context) inserted end + + private + + def default_keyword_instance(schema) + schema.parsed.fetch('default') do + schema.parsed.find do |_keyword, keyword_instance| + next unless keyword_instance.respond_to?(:ref_schema) + next unless default = default_keyword_instance(keyword_instance.ref_schema) + break default + end + end + end end end diff --git a/test/hooks_test.rb b/test/hooks_test.rb index 530e7a1..8a79ec0 100644 --- a/test/hooks_test.rb +++ b/test/hooks_test.rb @@ -481,4 +481,191 @@ def test_it_does_not_modify_passed_hooks_array insert_property_defaults: true ).valid?(data)) end + + def test_insert_property_defaults_refs + schema = { + 'properties' => { + 'inline' => { + 'default' => 'a' + }, + 'ref-inline' => { + '$ref' => '#/$defs/default-b' + }, + 'ref-inherit' => { + '$ref' => '#/$defs/inherit-default-b' + }, + 'ref-inline-override' => { + '$ref' => '#/$defs/default-b', + 'default' => 'c' + }, + 'ref-inherit-override' => { + '$ref' => '#/$defs/inherit-default-b', + 'default' => 'd' + }, + 'ref-override' => { + '$ref' => '#/$defs/override-default-e' + } + }, + '$defs' => { + 'default-b' => { + 'default' => 'b' + }, + 'inherit-default-b' => { + '$ref' => '#/$defs/default-b' + }, + 'override-default-e' => { + '$ref' => '#/$defs/default-b', + 'default' => 'e' + } + } + } + data = {} + assert(JSONSchemer.schema(schema, insert_property_defaults: true).valid?(data)) + assert_equal('a', data.fetch('inline')) + assert_equal('b', data.fetch('ref-inline')) + assert_equal('b', data.fetch('ref-inherit')) + assert_equal('c', data.fetch('ref-inline-override')) + assert_equal('d', data.fetch('ref-inherit-override')) + assert_equal('e', data.fetch('ref-override')) + end + + def test_insert_property_defaults_dynamic_refs + schema = { + 'properties' => { + 'dynamic-ref-inline' => { + '$dynamicRef' => '#default-b' + }, + 'dynamic-ref-inline-override' => { + '$dynamicRef' => '#default-b', + 'default' => 'c' + }, + 'dynamic-ref-and-ref' => { + '$dynamicRef' => '#default-b', + '$ref' => '#/$defs/default-a' + } + }, + '$defs' => { + 'default-a' => { + 'default' => 'a' + }, + 'foo' => { + '$dynamicAnchor' => 'default-b', + 'default' => 'b' + } + } + } + data = {} + assert(JSONSchemer.schema(schema, insert_property_defaults: true).valid?(data)) + assert_equal('b', data.fetch('dynamic-ref-inline')) + assert_equal('c', data.fetch('dynamic-ref-inline-override')) + assert_equal('a', data.fetch('dynamic-ref-and-ref')) + end + + def test_insert_property_defaults_recursive_refs + schema = { + '$recursiveAnchor' => true, + 'default' => 'b', + 'properties' => { + 'recursive-ref-inline' => { + '$recursiveRef' => '#' + }, + 'recursive-ref-inline-override' => { + '$recursiveRef' => '#', + 'default' => 'c' + }, + 'recursive-ref-and-ref' => { + '$recursiveRef' => '#', + '$ref' => '#/$defs/default-a' + } + }, + '$defs' => { + 'default-a' => { + 'default' => 'a' + } + } + } + data = {} + assert(JSONSchemer.schema(schema, meta_schema: JSONSchemer.draft201909, insert_property_defaults: true).valid?(data)) + assert_equal('b', data.fetch('recursive-ref-inline')) + assert_equal('c', data.fetch('recursive-ref-inline-override')) + assert_equal('a', data.fetch('recursive-ref-and-ref')) + end + + def test_insert_property_defaults_non_ref_schema_keywords + schema = { + 'properties' => { + 'x' => { + '$anchor' => 'x', # parsed before `$ref` + '$ref' => '#/$defs/y', + 'type' => 'string' # parsed after `$ref` + } + }, + '$defs' => { + 'y' => { + 'default' => 'z' + } + } + } + data = {} + assert(JSONSchemer.schema(schema, insert_property_defaults: true).valid?(data)) + assert_equal('z', data.fetch('x')) + refute(JSONSchemer.schema(schema, insert_property_defaults: true).valid?({ 'x' => 1 })) + end + + def test_insert_property_defaults_ref_no_default + schema = { + 'properties' => { + 'x' => { + '$ref' => '#/$defs/y', + '$dynamicRef' => '#z' + } + }, + '$defs' => { + 'y' => { + 'type' => 'string' + }, + 'foo' => { + '$dynamicAnchor' => 'z', + 'default' => 'dynamic-ref' + } + } + } + data = {} + assert(JSONSchemer.schema(schema, insert_property_defaults: true).valid?(data)) + assert_equal('dynamic-ref', data.fetch('x')) + refute(JSONSchemer.schema(schema, insert_property_defaults: true).valid?({ 'x' => 1 })) + end + + def test_insert_property_defaults_ref_depth_first + schema = { + 'properties' => { + 'x' => { + '$ref' => '#/$defs/ref1', + '$dynamicRef' => '#dynamic-ref1' + } + }, + '$defs' => { + 'ref1' => { + '$ref' => '#/$defs/ref2' + }, + 'ref2' => { + '$ref' => '#/$defs/ref3' + }, + 'ref3' => { + 'default' => 'ref' + }, + 'foo' => { + '$dynamicAnchor' => 'dynamic-ref1', + '$dynamicRef' => '#dynamic-ref2' + }, + 'bar' => { + '$dynamicAnchor' => 'dynamic-ref2', + 'default' => 'dynamic-ref' + } + } + } + data = {} + assert(JSONSchemer.schema(schema, insert_property_defaults: true).valid?(data)) + assert_equal('ref', data.fetch('x')) + end end From c4af89554af7877cd814c692cdad7e30abac8fef Mon Sep 17 00:00:00 2001 From: David Harsha Date: Fri, 1 Mar 2024 13:25:01 -0800 Subject: [PATCH 17/32] Drop option checks Don't want to introduce new behavior. --- lib/json_schemer.rb | 2 -- lib/json_schemer/configuration.rb | 34 +++++-------------------------- test/configuration_test.rb | 30 --------------------------- 3 files changed, 5 insertions(+), 61 deletions(-) diff --git a/lib/json_schemer.rb b/lib/json_schemer.rb index e1236cf..ee639ef 100644 --- a/lib/json_schemer.rb +++ b/lib/json_schemer.rb @@ -71,8 +71,6 @@ module JSONSchemer UnknownContentEncoding = Class.new(StandardError) UnknownContentMediaType = Class.new(StandardError) UnknownOutputFormat = Class.new(StandardError) - UnknownRegexpResolver = Class.new(StandardError) - UnknownAccessMode = Class.new(StandardError) InvalidRefResolution = Class.new(StandardError) InvalidRefPointer = Class.new(StandardError) InvalidRegexpResolution = Class.new(StandardError) diff --git a/lib/json_schemer/configuration.rb b/lib/json_schemer/configuration.rb index 7803c42..f1701a8 100644 --- a/lib/json_schemer/configuration.rb +++ b/lib/json_schemer/configuration.rb @@ -28,15 +28,15 @@ module Defaults :insert_property_defaults, :property_default_resolver, :original_ref_resolver, - :resolve_enumerators + :original_regexp_resolver, + :output_format, + :resolve_enumerators, + :access_mode ) attr_reader( :before_property_validation, - :after_property_validation, - :original_regexp_resolver, - :output_format, - :access_mode + :after_property_validation ) def initialize @@ -63,29 +63,5 @@ def before_property_validation=(validations) def after_property_validation=(validations) @after_property_validation = Array(validations) end - - def original_regexp_resolver=(resolver) - if resolver.is_a?(String) && !%w[ruby ecma].include?(resolver) - raise UnknownRegexpResolver - end - - @original_regexp_resolver = resolver - end - - def output_format=(format) - unless %[classic flag basic detailed verbose].include?(format) - raise UnknownOutputFormat - end - - @output_format = format - end - - def access_mode=(mode) - if mode.is_a?(String) && !%w[read write].include?(mode) - raise UnknownAccessMode - end - - @access_mode = mode - end end end diff --git a/test/configuration_test.rb b/test/configuration_test.rb index 6e81af5..567e56f 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -142,16 +142,6 @@ def test_original_regexp_resolver ) end - def test_original_regexp_resolver_invalid_string - assert_raises(JSONSchemer::UnknownRegexpResolver) do - run_configuration_test( - :original_regexp_resolver, - default: JSONSchemer::Configuration::Defaults::ORIGINAL_REGEXP_RESOLVER, - test: 'invalid' - ) - end - end - def test_output_format run_configuration_test( :output_format, @@ -160,16 +150,6 @@ def test_output_format ) end - def test_output_format_invalid - assert_raises(JSONSchemer::UnknownOutputFormat) do - run_configuration_test( - :output_format, - default: JSONSchemer::Configuration::Defaults::OUTPUT_FORMAT, - test: 'invalid' - ) - end - end - def test_resolve_enumerators run_configuration_test( :resolve_enumerators, @@ -185,14 +165,4 @@ def test_access_mode test: "write" ) end - - def test_access_mode_invalid_string - assert_raises(JSONSchemer::UnknownAccessMode) do - run_configuration_test( - :access_mode, - default: JSONSchemer::Configuration::Defaults::ACCESS_MODE, - test: "invalid" - ) - end - end end From 227eae93a5e31d795b96e41546fefdc7a60d4c2f Mon Sep 17 00:00:00 2001 From: David Harsha Date: Fri, 1 Mar 2024 13:26:08 -0800 Subject: [PATCH 18/32] Use regular class format for error classes I don't think there's a good reason to change this. --- lib/json_schemer.rb | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/json_schemer.rb b/lib/json_schemer.rb index ee639ef..b5cfd57 100644 --- a/lib/json_schemer.rb +++ b/lib/json_schemer.rb @@ -63,19 +63,19 @@ require 'json_schemer/schema' module JSONSchemer - UnsupportedMetaSchema = Class.new(StandardError) - UnsupportedOpenAPIVersion = Class.new(StandardError) - UnknownRef = Class.new(StandardError) - UnknownFormat = Class.new(StandardError) - UnknownVocabulary = Class.new(StandardError) - UnknownContentEncoding = Class.new(StandardError) - UnknownContentMediaType = Class.new(StandardError) - UnknownOutputFormat = Class.new(StandardError) - InvalidRefResolution = Class.new(StandardError) - InvalidRefPointer = Class.new(StandardError) - InvalidRegexpResolution = Class.new(StandardError) - InvalidFileURI = Class.new(StandardError) - InvalidEcmaRegexp = Class.new(StandardError) + class UnsupportedMetaSchema < StandardError; end + class UnsupportedOpenAPIVersion < StandardError; end + class UnknownRef < StandardError; end + class UnknownFormat < StandardError; end + class UnknownVocabulary < StandardError; end + class UnknownContentEncoding < StandardError; end + class UnknownContentMediaType < StandardError; end + class UnknownOutputFormat < StandardError; end + class InvalidRefResolution < StandardError; end + class InvalidRefPointer < StandardError; end + class InvalidRegexpResolution < StandardError; end + class InvalidFileURI < StandardError; end + class InvalidEcmaRegexp < StandardError; end VOCABULARIES = { 'https://json-schema.org/draft/2020-12/vocab/core' => Draft202012::Vocab::CORE, From 61a4b23bff3385ec82a550bdb2b407d7d1d43cec Mon Sep 17 00:00:00 2001 From: David Harsha Date: Fri, 1 Mar 2024 13:28:54 -0800 Subject: [PATCH 19/32] Drop `original` prefix from config options It doesn't make sense in the context of the configuration object. --- lib/json_schemer/configuration.rb | 12 ++++++------ lib/json_schemer/schema.rb | 4 ++-- test/configuration_test.rb | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/json_schemer/configuration.rb b/lib/json_schemer/configuration.rb index f1701a8..edc19d3 100644 --- a/lib/json_schemer/configuration.rb +++ b/lib/json_schemer/configuration.rb @@ -12,8 +12,8 @@ module Defaults AFTER_PROPERTY_VALIDATION = [].freeze INSERT_PROPERTY_DEFAULTS = false PROPERTY_RESOLVER = nil - ORIGINAL_REF_RESOLVER = proc { |uri| raise UnknownRef, uri.to_s } - ORIGINAL_REGEXP_RESOLVER = 'ruby' + REF_RESOLVER = proc { |uri| raise UnknownRef, uri.to_s } + REGEXP_RESOLVER = 'ruby' OUTPUT_FORMAT = 'classic' RESOLVE_ENUMERATORS = false ACCESS_MODE = nil @@ -27,8 +27,8 @@ module Defaults :custom_keywords, :insert_property_defaults, :property_default_resolver, - :original_ref_resolver, - :original_regexp_resolver, + :ref_resolver, + :regexp_resolver, :output_format, :resolve_enumerators, :access_mode @@ -49,8 +49,8 @@ def initialize @after_property_validation = Defaults::AFTER_PROPERTY_VALIDATION @insert_property_defaults = Defaults::INSERT_PROPERTY_DEFAULTS @property_default_resolver = Defaults::PROPERTY_RESOLVER - @original_ref_resolver = Defaults::ORIGINAL_REF_RESOLVER - @original_regexp_resolver = Defaults::ORIGINAL_REGEXP_RESOLVER + @ref_resolver = Defaults::REF_RESOLVER + @regexp_resolver = Defaults::REGEXP_RESOLVER @output_format = Defaults::OUTPUT_FORMAT @resolve_enumerators = Defaults::RESOLVE_ENUMERATORS @access_mode = Defaults::ACCESS_MODE diff --git a/lib/json_schemer/schema.rb b/lib/json_schemer/schema.rb index 78e90cf..d7ffc4a 100644 --- a/lib/json_schemer/schema.rb +++ b/lib/json_schemer/schema.rb @@ -64,8 +64,8 @@ def initialize( after_property_validation: JSONSchemer.configuration.after_property_validation, insert_property_defaults: JSONSchemer.configuration.insert_property_defaults, property_default_resolver: JSONSchemer.configuration.property_default_resolver, - ref_resolver: JSONSchemer.configuration.original_ref_resolver, - regexp_resolver: JSONSchemer.configuration.original_regexp_resolver, + ref_resolver: JSONSchemer.configuration.ref_resolver, + regexp_resolver: JSONSchemer.configuration.regexp_resolver, output_format: JSONSchemer.configuration.output_format, resolve_enumerators: JSONSchemer.configuration.resolve_enumerators, access_mode: JSONSchemer.configuration.access_mode diff --git a/test/configuration_test.rb b/test/configuration_test.rb index 567e56f..faedae0 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -126,18 +126,18 @@ def test_property_default_resolver ) end - def test_original_ref_resolver + def test_ref_resolver run_configuration_test( - :original_ref_resolver, - default: JSONSchemer::Configuration::Defaults::ORIGINAL_REF_RESOLVER, + :ref_resolver, + default: JSONSchemer::Configuration::Defaults::REF_RESOLVER, test: lambda { |uri| { 'type' => 'string' } } ) end - def test_original_regexp_resolver + def test_regexp_resolver run_configuration_test( - :original_regexp_resolver, - default: JSONSchemer::Configuration::Defaults::ORIGINAL_REGEXP_RESOLVER, + :regexp_resolver, + default: JSONSchemer::Configuration::Defaults::REGEXP_RESOLVER, test: 'ecma' ) end From 255fb9e506533ae38d91a740ac1c00e6c37e266a Mon Sep 17 00:00:00 2001 From: David Harsha Date: Fri, 1 Mar 2024 13:30:22 -0800 Subject: [PATCH 20/32] Consistent configuration option names Match the option names from `JSONSchemer.schema` and `Schema.new`. --- lib/json_schemer/configuration.rb | 10 +++++----- lib/json_schemer/schema.rb | 2 +- test/configuration_test.rb | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/json_schemer/configuration.rb b/lib/json_schemer/configuration.rb index edc19d3..38988e9 100644 --- a/lib/json_schemer/configuration.rb +++ b/lib/json_schemer/configuration.rb @@ -7,11 +7,11 @@ module Defaults FORMATS = {}.freeze CONTENT_ENCODINGS = {}.freeze CONTENT_MEDIA_TYPES = {}.freeze - CUSTOM_KEYWORDS = {}.freeze + KEYWORDS = {}.freeze BEFORE_PROPERTY_VALIDATION = [].freeze AFTER_PROPERTY_VALIDATION = [].freeze INSERT_PROPERTY_DEFAULTS = false - PROPERTY_RESOLVER = nil + PROPERTY_DEFAULT_RESOLVER = nil REF_RESOLVER = proc { |uri| raise UnknownRef, uri.to_s } REGEXP_RESOLVER = 'ruby' OUTPUT_FORMAT = 'classic' @@ -24,7 +24,7 @@ module Defaults :formats, :content_encodings, :content_media_types, - :custom_keywords, + :keywords, :insert_property_defaults, :property_default_resolver, :ref_resolver, @@ -44,11 +44,11 @@ def initialize @formats = Defaults::FORMATS @content_encodings = Defaults::CONTENT_ENCODINGS @content_media_types = Defaults::CONTENT_MEDIA_TYPES - @custom_keywords = Defaults::CUSTOM_KEYWORDS + @keywords = Defaults::KEYWORDS @before_property_validation = Defaults::BEFORE_PROPERTY_VALIDATION @after_property_validation = Defaults::AFTER_PROPERTY_VALIDATION @insert_property_defaults = Defaults::INSERT_PROPERTY_DEFAULTS - @property_default_resolver = Defaults::PROPERTY_RESOLVER + @property_default_resolver = Defaults::PROPERTY_DEFAULT_RESOLVER @ref_resolver = Defaults::REF_RESOLVER @regexp_resolver = Defaults::REGEXP_RESOLVER @output_format = Defaults::OUTPUT_FORMAT diff --git a/lib/json_schemer/schema.rb b/lib/json_schemer/schema.rb index d7ffc4a..1b49d1f 100644 --- a/lib/json_schemer/schema.rb +++ b/lib/json_schemer/schema.rb @@ -59,7 +59,7 @@ def initialize( formats: JSONSchemer.configuration.formats, content_encodings: JSONSchemer.configuration.content_encodings, content_media_types: JSONSchemer.configuration.content_media_types, - keywords: JSONSchemer.configuration.custom_keywords, + keywords: JSONSchemer.configuration.keywords, before_property_validation: JSONSchemer.configuration.before_property_validation, after_property_validation: JSONSchemer.configuration.after_property_validation, insert_property_defaults: JSONSchemer.configuration.insert_property_defaults, diff --git a/test/configuration_test.rb b/test/configuration_test.rb index faedae0..3a1bb7c 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -68,8 +68,8 @@ def test_content_media_types def test_keywords run_configuration_test( - :custom_keywords, - default: JSONSchemer::Configuration::Defaults::CUSTOM_KEYWORDS, + :keywords, + default: JSONSchemer::Configuration::Defaults::KEYWORDS, test: { 'even' => lambda { |data, curr_schema, _pointer| curr_schema.fetch('even') == data.to_i.even? } } @@ -121,7 +121,7 @@ def test_insert_property_defaults def test_property_default_resolver run_configuration_test( :property_default_resolver, - default: JSONSchemer::Configuration::Defaults::PROPERTY_RESOLVER, + default: JSONSchemer::Configuration::Defaults::PROPERTY_DEFAULT_RESOLVER, test: lambda { |instance, property, results_with_tree_validity| true } ) end From 2b4b2e71a460498aeed5294e9c6e4661ab6004ff Mon Sep 17 00:00:00 2001 From: David Harsha Date: Fri, 1 Mar 2024 13:35:16 -0800 Subject: [PATCH 21/32] Drop `parallelize_me!` I want to introduce this separately and think about using it elsewhere. --- test/configuration_test.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/configuration_test.rb b/test/configuration_test.rb index 3a1bb7c..763f770 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -1,8 +1,6 @@ require 'test_helper' class ConfigurationTest < Minitest::Test - parallelize_me! - def run_configuration_test(option, default:, test:, expectation: test) if default.nil? assert_nil(JSONSchemer.configuration.public_send(option)) From 0a6f1c508b12850821fbe1631bbef28246b35bef Mon Sep 17 00:00:00 2001 From: David Harsha Date: Fri, 1 Mar 2024 13:39:47 -0800 Subject: [PATCH 22/32] Drop array wrap for property validation options This is already handled in `Schema#initialize`. --- lib/json_schemer/configuration.rb | 15 ++------------- test/configuration_test.rb | 18 ------------------ 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/lib/json_schemer/configuration.rb b/lib/json_schemer/configuration.rb index 38988e9..1316884 100644 --- a/lib/json_schemer/configuration.rb +++ b/lib/json_schemer/configuration.rb @@ -25,6 +25,8 @@ module Defaults :content_encodings, :content_media_types, :keywords, + :before_property_validation, + :after_property_validation, :insert_property_defaults, :property_default_resolver, :ref_resolver, @@ -34,11 +36,6 @@ module Defaults :access_mode ) - attr_reader( - :before_property_validation, - :after_property_validation - ) - def initialize @base_uri = Defaults::BASE_URI @formats = Defaults::FORMATS @@ -55,13 +52,5 @@ def initialize @resolve_enumerators = Defaults::RESOLVE_ENUMERATORS @access_mode = Defaults::ACCESS_MODE end - - def before_property_validation=(validations) - @before_property_validation = Array(validations) - end - - def after_property_validation=(validations) - @after_property_validation = Array(validations) - end end end diff --git a/test/configuration_test.rb b/test/configuration_test.rb index 763f770..5e8437d 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -82,15 +82,6 @@ def test_before_property_validation ) end - def test_before_property_validation_without_array - run_configuration_test( - :before_property_validation, - default: JSONSchemer::Configuration::Defaults::BEFORE_PROPERTY_VALIDATION, - test: 'something', - expectation: ['something'] - ) - end - def test_after_property_validation run_configuration_test( :after_property_validation, @@ -99,15 +90,6 @@ def test_after_property_validation ) end - def test_after_property_validation_without_array - run_configuration_test( - :after_property_validation, - default: JSONSchemer::Configuration::Defaults::AFTER_PROPERTY_VALIDATION, - test: 'something', - expectation: ['something'] - ) - end - def test_insert_property_defaults run_configuration_test( :insert_property_defaults, From dea3e8069cc1a42c99e74c230eb36d178826bf53 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Fri, 1 Mar 2024 13:47:01 -0800 Subject: [PATCH 23/32] Add remaining options to configuration object `meta_schema` is a little wrong at this point because `JSONSchemer.schema` processes strings and the configuration object only allows `Schema` objects. --- lib/json_schemer/configuration.rb | 9 +++++++++ lib/json_schemer/schema.rb | 6 +++--- test/configuration_test.rb | 24 ++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/lib/json_schemer/configuration.rb b/lib/json_schemer/configuration.rb index 1316884..aeb4af8 100644 --- a/lib/json_schemer/configuration.rb +++ b/lib/json_schemer/configuration.rb @@ -4,6 +4,9 @@ module JSONSchemer class Configuration module Defaults BASE_URI = URI('json-schemer://schema').freeze + META_SCHEMA = nil + VOCABULARY = nil + FORMAT = true FORMATS = {}.freeze CONTENT_ENCODINGS = {}.freeze CONTENT_MEDIA_TYPES = {}.freeze @@ -21,6 +24,9 @@ module Defaults attr_accessor( :base_uri, + :meta_schema, + :vocabulary, + :format, :formats, :content_encodings, :content_media_types, @@ -38,6 +44,9 @@ module Defaults def initialize @base_uri = Defaults::BASE_URI + @meta_schema = Defaults::META_SCHEMA + @vocabulary = Defaults::VOCABULARY + @format = Defaults::FORMAT @formats = Defaults::FORMATS @content_encodings = Defaults::CONTENT_ENCODINGS @content_media_types = Defaults::CONTENT_MEDIA_TYPES diff --git a/lib/json_schemer/schema.rb b/lib/json_schemer/schema.rb index 1b49d1f..d088d62 100644 --- a/lib/json_schemer/schema.rb +++ b/lib/json_schemer/schema.rb @@ -53,9 +53,9 @@ def initialize( root = self, keyword = nil, base_uri: JSONSchemer.configuration.base_uri, - meta_schema: nil, - vocabulary: nil, - format: true, + meta_schema: JSONSchemer.configuration.meta_schema, + vocabulary: JSONSchemer.configuration.vocabulary, + format: JSONSchemer.configuration.format, formats: JSONSchemer.configuration.formats, content_encodings: JSONSchemer.configuration.content_encodings, content_media_types: JSONSchemer.configuration.content_media_types, diff --git a/test/configuration_test.rb b/test/configuration_test.rb index 5e8437d..441b6ec 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -30,6 +30,30 @@ def test_base_uri ) end + def test_meta_schema + run_configuration_test( + :meta_schema, + default: JSONSchemer::Configuration::Defaults::META_SCHEMA, + test: JSONSchemer.draft201909 + ) + end + + def test_vocabulary + run_configuration_test( + :vocabulary, + default: JSONSchemer::Configuration::Defaults::VOCABULARY, + test: { 'json-schemer://draft4' => true } + ) + end + + def test_format + run_configuration_test( + :format, + default: JSONSchemer::Configuration::Defaults::FORMAT, + test: false + ) + end + def test_formats run_configuration_test( :formats, From 93a3cb294e7abf16945ee06b8c57401ed8ee0a2b Mon Sep 17 00:00:00 2001 From: David Harsha Date: Fri, 1 Mar 2024 16:13:17 -0800 Subject: [PATCH 24/32] Parse string meta schemas in `Schema` class This allows string values in `Configuration#meta_schema` in order to be consistent with `JSONSchemer.schema`. There's a slight behavior change in that unknown `meta_schema` values will be passed to the provided ref resolver. I think this is good because it better matches the behavior of the `$schema` keyword. `UnsupportedMetaSchema` is gone; `UnknownRef` will be raised instead. It was necessary to add `$schema` in `test_schema_validation_parse_error_with_custom_meta_schema` because `ref_resolver` schemas inherit the provided `meta_schema`, which meant the custom meta schema was using itself as a meta schema when provided as a string. --- lib/json_schemer.rb | 8 ++------ lib/json_schemer/configuration.rb | 2 +- lib/json_schemer/openapi.rb | 6 ++---- lib/json_schemer/schema.rb | 5 ++--- test/configuration_test.rb | 33 +++++++++++++++++++++++++------ test/json_schemer_test.rb | 11 ++++++++++- test/open_api_test.rb | 2 +- 7 files changed, 45 insertions(+), 22 deletions(-) diff --git a/lib/json_schemer.rb b/lib/json_schemer.rb index b5cfd57..0123cf5 100644 --- a/lib/json_schemer.rb +++ b/lib/json_schemer.rb @@ -63,7 +63,6 @@ require 'json_schemer/schema' module JSONSchemer - class UnsupportedMetaSchema < StandardError; end class UnsupportedOpenAPIVersion < StandardError; end class UnknownRef < StandardError; end class UnknownFormat < StandardError; end @@ -114,12 +113,9 @@ class InvalidEcmaRegexp < StandardError; end end class << self - def schema(schema, meta_schema: draft202012, **options) + def schema(schema, **options) schema = resolve(schema, options) - unless meta_schema.is_a?(Schema) - meta_schema = META_SCHEMAS_BY_BASE_URI_STR[meta_schema] || raise(UnsupportedMetaSchema, meta_schema) - end - Schema.new(schema, :meta_schema => meta_schema, **options) + Schema.new(schema, **options) end def valid_schema?(schema, **options) diff --git a/lib/json_schemer/configuration.rb b/lib/json_schemer/configuration.rb index aeb4af8..db57a86 100644 --- a/lib/json_schemer/configuration.rb +++ b/lib/json_schemer/configuration.rb @@ -4,7 +4,7 @@ module JSONSchemer class Configuration module Defaults BASE_URI = URI('json-schemer://schema').freeze - META_SCHEMA = nil + META_SCHEMA = Draft202012::BASE_URI.to_s.freeze VOCABULARY = nil FORMAT = true FORMATS = {}.freeze diff --git a/lib/json_schemer/openapi.rb b/lib/json_schemer/openapi.rb index 359ccb4..125993f 100644 --- a/lib/json_schemer/openapi.rb +++ b/lib/json_schemer/openapi.rb @@ -8,16 +8,14 @@ def initialize(document, **options) case version when /\A3\.1\.\d+\z/ @document_schema = JSONSchemer.openapi31_document - json_schema_dialect = document.fetch('jsonSchemaDialect') { OpenAPI31::BASE_URI.to_s } + meta_schema = document.fetch('jsonSchemaDialect') { OpenAPI31::BASE_URI.to_s } when /\A3\.0\.\d+\z/ @document_schema = JSONSchemer.openapi30_document - json_schema_dialect = OpenAPI30::BASE_URI.to_s + meta_schema = OpenAPI30::BASE_URI.to_s else raise UnsupportedOpenAPIVersion, version end - meta_schema = META_SCHEMAS_BY_BASE_URI_STR[json_schema_dialect] || raise(UnsupportedMetaSchema, json_schema_dialect) - @schema = JSONSchemer.schema(@document, :meta_schema => meta_schema, **options) end diff --git a/lib/json_schemer/schema.rb b/lib/json_schemer/schema.rb index d088d62..a462714 100644 --- a/lib/json_schemer/schema.rb +++ b/lib/json_schemer/schema.rb @@ -17,7 +17,6 @@ def original_instance(instance_location) include Output - DEFAULT_SCHEMA = Draft202012::BASE_URI.to_s.freeze SCHEMA_KEYWORD_CLASS = Draft202012::Vocab::Core::Schema VOCABULARY_KEYWORD_CLASS = Draft202012::Vocab::Core::Vocabulary ID_KEYWORD_CLASS = Draft202012::Vocab::Core::Id @@ -356,8 +355,8 @@ def parse if value.is_a?(Hash) && value.key?('$schema') @parsed['$schema'] = SCHEMA_KEYWORD_CLASS.new(value.fetch('$schema'), self, '$schema') - elsif root == self && !meta_schema - SCHEMA_KEYWORD_CLASS.new(DEFAULT_SCHEMA, self, '$schema') + elsif meta_schema.is_a?(String) + SCHEMA_KEYWORD_CLASS.new(meta_schema, self, '$schema') end if value.is_a?(Hash) && value.key?('$vocabulary') diff --git a/test/configuration_test.rb b/test/configuration_test.rb index 441b6ec..881167b 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -1,19 +1,23 @@ require 'test_helper' class ConfigurationTest < Minitest::Test - def run_configuration_test(option, default:, test:, expectation: test) + def run_configuration_test(option, default: (skip_default = true), test:) + original = JSONSchemer.configuration.public_send(option) + if default.nil? - assert_nil(JSONSchemer.configuration.public_send(option)) - else - assert_equal(default, JSONSchemer.configuration.public_send(option)) + assert_nil(original) + elsif !skip_default + assert_equal(default, original) end JSONSchemer.configure { |config| config.public_send("#{option}=", test) } - assert_equal(expectation, JSONSchemer.configuration.public_send(option)) + yield if block_given? + + assert_equal(test, JSONSchemer.configuration.public_send(option)) # We need to reset the configuration to avoid "polluting" other tests. - JSONSchemer.configure { |config| config.public_send("#{option}=", default) } + JSONSchemer.configure { |config| config.public_send("#{option}=", original) } end def test_configure @@ -38,6 +42,23 @@ def test_meta_schema ) end + def test_string_meta_schema + run_configuration_test(:meta_schema, test: 'https://json-schema.org/draft/2019-09/schema') do + assert_equal(JSONSchemer.draft201909, JSONSchemer.schema({ 'maximum' => 1 }).meta_schema) + assert(JSONSchemer.schema({ 'maximum' => 1 }).valid?(1)) + refute(JSONSchemer.schema({ 'exclusiveMaximum' => 1 }).valid?(1)) + assert(JSONSchemer.valid_schema?({ 'exclusiveMaximum' => 1 })) + refute(JSONSchemer.valid_schema?({ 'maximum' => 1, 'exclusiveMaximum' => true })) + end + run_configuration_test(:meta_schema, test: 'http://json-schema.org/draft-04/schema#') do + assert_equal(JSONSchemer.draft4, JSONSchemer.schema({ 'maximum' => 1 }).meta_schema) + assert(JSONSchemer.schema({ 'maximum' => 1 }).valid?(1)) + refute(JSONSchemer.schema({ 'maximum' => 1, 'exclusiveMaximum' => true }).valid?(1)) + refute(JSONSchemer.valid_schema?({ 'exclusiveMaximum' => 1 })) + assert(JSONSchemer.valid_schema?({ 'maximum' => 1, 'exclusiveMaximum' => true })) + end + end + def test_vocabulary run_configuration_test( :vocabulary, diff --git a/test/json_schemer_test.rb b/test/json_schemer_test.rb index e8d4830..79a0a2e 100644 --- a/test/json_schemer_test.rb +++ b/test/json_schemer_test.rb @@ -300,7 +300,7 @@ def test_it_raises_for_unknown_output_format end def test_it_raises_for_unsupported_meta_schema - assert_raises(JSONSchemer::UnsupportedMetaSchema) { JSONSchemer.schema({}, :meta_schema => 'unsupported') } + assert_raises(JSONSchemer::UnknownRef) { JSONSchemer.schema({}, :meta_schema => 'unsupported') } end def test_string_meta_schema @@ -476,6 +476,7 @@ def test_schema_validation_parse_error def test_schema_validation_parse_error_with_custom_meta_schema custom_meta_schema = { + '$schema' => 'https://json-schema.org/draft/2020-12/schema', '$vocabulary' => {}, 'oneOf' => [ { 'required' => ['$id'] }, @@ -494,16 +495,20 @@ def test_schema_validation_parse_error_with_custom_meta_schema assert(JSONSchemer.valid_schema?({})) refute(JSONSchemer.valid_schema?({}, meta_schema: custom_meta_schemer)) + refute(JSONSchemer.valid_schema?({}, meta_schema: 'https://example.com/custom-meta-schema', ref_resolver: ref_resolver)) refute(JSONSchemer.valid_schema?({ '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver)) refute(JSONSchemer.valid_schema?({ '$schema': 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver)) refute(JSONSchemer.valid_schema?({ '$id' => {} })) assert(JSONSchemer.valid_schema?({ '$id' => {} }, meta_schema: custom_meta_schemer)) + assert(JSONSchemer.valid_schema?({ '$id' => {} }, meta_schema: 'https://example.com/custom-meta-schema', ref_resolver: ref_resolver)) assert(JSONSchemer.valid_schema?({ '$id' => {}, '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver)) assert(JSONSchemer.valid_schema?({ '$id' => {}, '$schema': 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver)) assert(JSONSchemer.valid_schema?({ 'items' => {} })) refute(JSONSchemer.valid_schema?({ 'items' => 'yah' })) refute(JSONSchemer.valid_schema?({ 'items' => {} }, meta_schema: custom_meta_schemer)) + refute(JSONSchemer.valid_schema?({ 'items' => {} }, meta_schema: 'https://example.com/custom-meta-schema', ref_resolver: ref_resolver)) assert(JSONSchemer.valid_schema?({ 'items' => 'yah' }, meta_schema: custom_meta_schemer)) + assert(JSONSchemer.valid_schema?({ 'items' => 'yah' }, meta_schema: 'https://example.com/custom-meta-schema', ref_resolver: ref_resolver)) refute(JSONSchemer.valid_schema?({ 'items' => {}, '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver)) assert(JSONSchemer.valid_schema?({ 'items' => 'yah', '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver)) refute(JSONSchemer.valid_schema?({ 'items' => {}, '$schema': 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver)) @@ -511,16 +516,20 @@ def test_schema_validation_parse_error_with_custom_meta_schema assert_empty(JSONSchemer.validate_schema({}).to_a) refute_empty(JSONSchemer.validate_schema({}, meta_schema: custom_meta_schemer).to_a) + refute_empty(JSONSchemer.validate_schema({}, meta_schema: 'https://example.com/custom-meta-schema', ref_resolver: ref_resolver).to_a) refute_empty(JSONSchemer.validate_schema({ '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) refute_empty(JSONSchemer.validate_schema({ '$schema': 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) refute_empty(JSONSchemer.validate_schema({ '$id' => {} }).to_a) assert_empty(JSONSchemer.validate_schema({ '$id' => {} }, meta_schema: custom_meta_schemer).to_a) + assert_empty(JSONSchemer.validate_schema({ '$id' => {} }, meta_schema: 'https://example.com/custom-meta-schema', ref_resolver: ref_resolver).to_a) assert_empty(JSONSchemer.validate_schema({ '$id' => {}, '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) assert_empty(JSONSchemer.validate_schema({ '$id' => {}, '$schema': 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) assert_empty(JSONSchemer.validate_schema({ 'items' => {} }).to_a) refute_empty(JSONSchemer.validate_schema({ 'items' => 'yah' }).to_a) refute_empty(JSONSchemer.validate_schema({ 'items' => {} }, meta_schema: custom_meta_schemer).to_a) + refute_empty(JSONSchemer.validate_schema({ 'items' => {} }, meta_schema: 'https://example.com/custom-meta-schema', ref_resolver: ref_resolver).to_a) assert_empty(JSONSchemer.validate_schema({ 'items' => 'yah' }, meta_schema: custom_meta_schemer).to_a) + assert_empty(JSONSchemer.validate_schema({ 'items' => 'yah' }, meta_schema: 'https://example.com/custom-meta-schema', ref_resolver: ref_resolver).to_a) refute_empty(JSONSchemer.validate_schema({ 'items' => {}, '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) assert_empty(JSONSchemer.validate_schema({ 'items' => 'yah', '$schema' => 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) refute_empty(JSONSchemer.validate_schema({ 'items' => {}, '$schema': 'https://example.com/custom-meta-schema' }, ref_resolver: ref_resolver).to_a) diff --git a/test/open_api_test.rb b/test/open_api_test.rb index 5b472fa..fcdc36c 100644 --- a/test/open_api_test.rb +++ b/test/open_api_test.rb @@ -769,7 +769,7 @@ def test_unsupported_openapi_version end def test_unsupported_json_schema_dialect - assert_raises(JSONSchemer::UnsupportedMetaSchema) { JSONSchemer.openapi({ 'openapi' => '3.1.0', 'jsonSchemaDialect' => 'unsupported' }) } + assert_raises(JSONSchemer::UnknownRef) { JSONSchemer.openapi({ 'openapi' => '3.1.0', 'jsonSchemaDialect' => 'unsupported' }) } end def test_openapi_documents From 3323ef48df1a47eceef201e944a5c44a9d83f8a4 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Fri, 1 Mar 2024 17:15:13 -0800 Subject: [PATCH 25/32] Add `configuration` argument This makes it easy to pass in an existing configuration object and override multiple arguments without modifying the global configuration. It also provides a simpler way to pass configuration to subschemas (and ref schemas). `base_uri`, `meta_schema`, `ref_resolver`, and `regexp_resolver` still need to be passed separately because they're parsed and modified in the schema object (not reflected in the configuration object). --- lib/json_schemer/keyword.rb | 3 ++ lib/json_schemer/schema.rb | 77 +++++++++++++++++-------------------- test/configuration_test.rb | 11 ++++++ 3 files changed, 50 insertions(+), 41 deletions(-) diff --git a/lib/json_schemer/keyword.rb b/lib/json_schemer/keyword.rb index f61ea99..a1c0970 100644 --- a/lib/json_schemer/keyword.rb +++ b/lib/json_schemer/keyword.rb @@ -45,8 +45,11 @@ def parse end def subschema(value, keyword = nil, **options) + options[:configuration] ||= schema.configuration options[:base_uri] ||= schema.base_uri options[:meta_schema] ||= schema.meta_schema + options[:ref_resolver] ||= schema.ref_resolver + options[:regexp_resolver] ||= schema.regexp_resolver Schema.new(value, self, root, keyword, **options) end end diff --git a/lib/json_schemer/schema.rb b/lib/json_schemer/schema.rb index a462714..259e241 100644 --- a/lib/json_schemer/schema.rb +++ b/lib/json_schemer/schema.rb @@ -43,7 +43,7 @@ def original_instance(instance_location) end attr_accessor :base_uri, :meta_schema, :keywords, :keyword_order - attr_reader :value, :parent, :root, :parsed + attr_reader :value, :parent, :root, :configuration, :parsed attr_reader :vocabulary, :format, :formats, :content_encodings, :content_media_types, :custom_keywords, :before_property_validation, :after_property_validation, :insert_property_defaults def initialize( @@ -51,29 +51,31 @@ def initialize( parent = nil, root = self, keyword = nil, - base_uri: JSONSchemer.configuration.base_uri, - meta_schema: JSONSchemer.configuration.meta_schema, - vocabulary: JSONSchemer.configuration.vocabulary, - format: JSONSchemer.configuration.format, - formats: JSONSchemer.configuration.formats, - content_encodings: JSONSchemer.configuration.content_encodings, - content_media_types: JSONSchemer.configuration.content_media_types, - keywords: JSONSchemer.configuration.keywords, - before_property_validation: JSONSchemer.configuration.before_property_validation, - after_property_validation: JSONSchemer.configuration.after_property_validation, - insert_property_defaults: JSONSchemer.configuration.insert_property_defaults, - property_default_resolver: JSONSchemer.configuration.property_default_resolver, - ref_resolver: JSONSchemer.configuration.ref_resolver, - regexp_resolver: JSONSchemer.configuration.regexp_resolver, - output_format: JSONSchemer.configuration.output_format, - resolve_enumerators: JSONSchemer.configuration.resolve_enumerators, - access_mode: JSONSchemer.configuration.access_mode + configuration: JSONSchemer.configuration, + base_uri: configuration.base_uri, + meta_schema: configuration.meta_schema, + vocabulary: configuration.vocabulary, + format: configuration.format, + formats: configuration.formats, + content_encodings: configuration.content_encodings, + content_media_types: configuration.content_media_types, + keywords: configuration.keywords, + before_property_validation: configuration.before_property_validation, + after_property_validation: configuration.after_property_validation, + insert_property_defaults: configuration.insert_property_defaults, + property_default_resolver: configuration.property_default_resolver, + ref_resolver: configuration.ref_resolver, + regexp_resolver: configuration.regexp_resolver, + output_format: configuration.output_format, + resolve_enumerators: configuration.resolve_enumerators, + access_mode: configuration.access_mode ) @value = deep_stringify_keys(value) @parent = parent @root = root @keyword = keyword @schema = self + @configuration = configuration @base_uri = base_uri @meta_schema = meta_schema @vocabulary = vocabulary @@ -186,16 +188,9 @@ def resolve_ref(uri) uri.fragment = nil remote_schema = JSONSchemer.schema( ref_resolver.call(uri) || raise(InvalidRefResolution, uri.to_s), + :configuration => configuration, :base_uri => uri, :meta_schema => meta_schema, - :format => format, - :formats => formats, - :content_encodings => content_encodings, - :content_media_types => content_media_types, - :keywords => custom_keywords, - :before_property_validation => before_property_validation, - :after_property_validation => after_property_validation, - :property_default_resolver => property_default_resolver, :ref_resolver => ref_resolver, :regexp_resolver => regexp_resolver ) @@ -344,6 +339,21 @@ def error(formatted_instance_location:, **options) end end + def ref_resolver + @ref_resolver ||= @original_ref_resolver == 'net/http' ? CachedResolver.new(&NET_HTTP_REF_RESOLVER) : @original_ref_resolver + end + + def regexp_resolver + @regexp_resolver ||= case @original_regexp_resolver + when 'ecma' + CachedResolver.new(&ECMA_REGEXP_RESOLVER) + when 'ruby' + CachedResolver.new(&RUBY_REGEXP_RESOLVER) + else + @original_regexp_resolver + end + end + def inspect "#<#{self.class.name} @value=#{@value.inspect} @parent=#{@parent.inspect} @keyword=#{@keyword.inspect}>" end @@ -400,21 +410,6 @@ def property_default_resolver @property_default_resolver ||= insert_property_defaults == :symbol ? SYMBOL_PROPERTY_DEFAULT_RESOLVER : DEFAULT_PROPERTY_DEFAULT_RESOLVER end - def ref_resolver - @ref_resolver ||= @original_ref_resolver == 'net/http' ? CachedResolver.new(&NET_HTTP_REF_RESOLVER) : @original_ref_resolver - end - - def regexp_resolver - @regexp_resolver ||= case @original_regexp_resolver - when 'ecma' - CachedResolver.new(&ECMA_REGEXP_RESOLVER) - when 'ruby' - CachedResolver.new(&RUBY_REGEXP_RESOLVER) - else - @original_regexp_resolver - end - end - def resolve_enumerators!(output) case output when Hash diff --git a/test/configuration_test.rb b/test/configuration_test.rb index 881167b..cb0d516 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -190,4 +190,15 @@ def test_access_mode test: "write" ) end + + def test_configuration_option_and_override + configuration = JSONSchemer::Configuration.new + configuration.format = false + assert(JSONSchemer.schema({ 'format' => 'time' }).valid?('08:30:06Z')) + refute(JSONSchemer.schema({ 'format' => 'time' }).valid?('X')) + assert(JSONSchemer.schema({ 'format' => 'time' }, configuration: configuration).valid?('08:30:06Z')) + assert(JSONSchemer.schema({ 'format' => 'time' }, configuration: configuration).valid?('X')) + assert(JSONSchemer.schema({ 'format' => 'time' }, configuration: configuration, format: true).valid?('08:30:06Z')) + refute(JSONSchemer.schema({ 'format' => 'time' }, configuration: configuration, format: true).valid?('X')) + end end From 16d008b3e121cb42b421e086e472d999d948fe99 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Fri, 1 Mar 2024 17:33:09 -0800 Subject: [PATCH 26/32] Drop defined check for class variable in i18n test simplecov is complaining about this now for some reason. Previously, `errors_test.rb` wasn't showing up at all on the coverage report... --- test/errors_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/errors_test.rb b/test/errors_test.rb index 6a57bd9..38ee7dd 100644 --- a/test/errors_test.rb +++ b/test/errors_test.rb @@ -266,7 +266,7 @@ def i18n(errors) I18n.load_path -= [file.path] end ensure - JSONSchemer.remove_class_variable(:@@i18n) if JSONSchemer.class_variable_defined?(:@@i18n) + JSONSchemer.remove_class_variable(:@@i18n) # I18n::Debug.on_lookup {} end end From c1507fed62ba6b78cf23312745b129debeba13d1 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Fri, 1 Mar 2024 17:50:12 -0800 Subject: [PATCH 27/32] Simplify `Configuration` This makes `Configuration` a struct and overrides its `initialize` method to provide defaults. It simplifies things a bit and allows passing options during initialization using keyword arguments. --- lib/json_schemer/configuration.rb | 85 ++++++++++--------------------- test/configuration_test.rb | 46 ++++++++++------- test/json_schemer_test.rb | 2 +- 3 files changed, 56 insertions(+), 77 deletions(-) diff --git a/lib/json_schemer/configuration.rb b/lib/json_schemer/configuration.rb index db57a86..b90cd60 100644 --- a/lib/json_schemer/configuration.rb +++ b/lib/json_schemer/configuration.rb @@ -1,65 +1,32 @@ # frozen_string_literal: true module JSONSchemer - class Configuration - module Defaults - BASE_URI = URI('json-schemer://schema').freeze - META_SCHEMA = Draft202012::BASE_URI.to_s.freeze - VOCABULARY = nil - FORMAT = true - FORMATS = {}.freeze - CONTENT_ENCODINGS = {}.freeze - CONTENT_MEDIA_TYPES = {}.freeze - KEYWORDS = {}.freeze - BEFORE_PROPERTY_VALIDATION = [].freeze - AFTER_PROPERTY_VALIDATION = [].freeze - INSERT_PROPERTY_DEFAULTS = false - PROPERTY_DEFAULT_RESOLVER = nil - REF_RESOLVER = proc { |uri| raise UnknownRef, uri.to_s } - REGEXP_RESOLVER = 'ruby' - OUTPUT_FORMAT = 'classic' - RESOLVE_ENUMERATORS = false - ACCESS_MODE = nil - end - - attr_accessor( - :base_uri, - :meta_schema, - :vocabulary, - :format, - :formats, - :content_encodings, - :content_media_types, - :keywords, - :before_property_validation, - :after_property_validation, - :insert_property_defaults, - :property_default_resolver, - :ref_resolver, - :regexp_resolver, - :output_format, - :resolve_enumerators, - :access_mode - ) - - def initialize - @base_uri = Defaults::BASE_URI - @meta_schema = Defaults::META_SCHEMA - @vocabulary = Defaults::VOCABULARY - @format = Defaults::FORMAT - @formats = Defaults::FORMATS - @content_encodings = Defaults::CONTENT_ENCODINGS - @content_media_types = Defaults::CONTENT_MEDIA_TYPES - @keywords = Defaults::KEYWORDS - @before_property_validation = Defaults::BEFORE_PROPERTY_VALIDATION - @after_property_validation = Defaults::AFTER_PROPERTY_VALIDATION - @insert_property_defaults = Defaults::INSERT_PROPERTY_DEFAULTS - @property_default_resolver = Defaults::PROPERTY_DEFAULT_RESOLVER - @ref_resolver = Defaults::REF_RESOLVER - @regexp_resolver = Defaults::REGEXP_RESOLVER - @output_format = Defaults::OUTPUT_FORMAT - @resolve_enumerators = Defaults::RESOLVE_ENUMERATORS - @access_mode = Defaults::ACCESS_MODE + Configuration = Struct.new( + :base_uri, :meta_schema, :vocabulary, :format, :formats, :content_encodings, :content_media_types, :keywords, + :before_property_validation, :after_property_validation, :insert_property_defaults, :property_default_resolver, + :ref_resolver, :regexp_resolver, :output_format, :resolve_enumerators, :access_mode, + keyword_init: true + ) do + def initialize( + base_uri: URI('json-schemer://schema'), + meta_schema: Draft202012::BASE_URI.to_s, + vocabulary: nil, + format: true, + formats: {}, + content_encodings: {}, + content_media_types: {}, + keywords: {}, + before_property_validation: [], + after_property_validation: [], + insert_property_defaults: false, + property_default_resolver: nil, + ref_resolver: proc { |uri| raise UnknownRef, uri.to_s }, + regexp_resolver: 'ruby', + output_format: 'classic', + resolve_enumerators: false, + access_mode: nil + ) + super end end end diff --git a/test/configuration_test.rb b/test/configuration_test.rb index cb0d516..33b11cf 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -6,6 +6,8 @@ def run_configuration_test(option, default: (skip_default = true), test:) if default.nil? assert_nil(original) + elsif default.respond_to?(:call) + default.call(original) elsif !skip_default assert_equal(default, original) end @@ -29,7 +31,7 @@ def test_configure def test_base_uri run_configuration_test( :base_uri, - default: JSONSchemer::Configuration::Defaults::BASE_URI, + default: URI('json-schemer://schema'), test: URI('some-other://schema') ) end @@ -37,7 +39,7 @@ def test_base_uri def test_meta_schema run_configuration_test( :meta_schema, - default: JSONSchemer::Configuration::Defaults::META_SCHEMA, + default: 'https://json-schema.org/draft/2020-12/schema', test: JSONSchemer.draft201909 ) end @@ -62,7 +64,7 @@ def test_string_meta_schema def test_vocabulary run_configuration_test( :vocabulary, - default: JSONSchemer::Configuration::Defaults::VOCABULARY, + default: nil, test: { 'json-schemer://draft4' => true } ) end @@ -70,7 +72,7 @@ def test_vocabulary def test_format run_configuration_test( :format, - default: JSONSchemer::Configuration::Defaults::FORMAT, + default: true, test: false ) end @@ -78,7 +80,7 @@ def test_format def test_formats run_configuration_test( :formats, - default: JSONSchemer::Configuration::Defaults::FORMATS, + default: {}, test: { 'some-format' => lambda { |instance, _format| true } } @@ -88,7 +90,7 @@ def test_formats def test_content_encodings run_configuration_test( :content_encodings, - default: JSONSchemer::Configuration::Defaults::CONTENT_ENCODINGS, + default: {}, test: { 'lowercase' => lambda { |instance| [true, instance&.downcase] } } @@ -98,7 +100,7 @@ def test_content_encodings def test_content_media_types run_configuration_test( :content_media_types, - default: JSONSchemer::Configuration::Defaults::CONTENT_MEDIA_TYPES, + default: {}, test: { 'text/csv' => lambda do |instance| [true, CSV.parse(instance)] @@ -112,7 +114,7 @@ def test_content_media_types def test_keywords run_configuration_test( :keywords, - default: JSONSchemer::Configuration::Defaults::KEYWORDS, + default: {}, test: { 'even' => lambda { |data, curr_schema, _pointer| curr_schema.fetch('even') == data.to_i.even? } } @@ -122,7 +124,7 @@ def test_keywords def test_before_property_validation run_configuration_test( :before_property_validation, - default: JSONSchemer::Configuration::Defaults::BEFORE_PROPERTY_VALIDATION, + default: [], test: ['something'] ) end @@ -130,7 +132,7 @@ def test_before_property_validation def test_after_property_validation run_configuration_test( :after_property_validation, - default: JSONSchemer::Configuration::Defaults::AFTER_PROPERTY_VALIDATION, + default: [], test: ['something'] ) end @@ -138,7 +140,7 @@ def test_after_property_validation def test_insert_property_defaults run_configuration_test( :insert_property_defaults, - default: JSONSchemer::Configuration::Defaults::INSERT_PROPERTY_DEFAULTS, + default: false, test: true ) end @@ -146,7 +148,7 @@ def test_insert_property_defaults def test_property_default_resolver run_configuration_test( :property_default_resolver, - default: JSONSchemer::Configuration::Defaults::PROPERTY_DEFAULT_RESOLVER, + default: nil, test: lambda { |instance, property, results_with_tree_validity| true } ) end @@ -154,7 +156,11 @@ def test_property_default_resolver def test_ref_resolver run_configuration_test( :ref_resolver, - default: JSONSchemer::Configuration::Defaults::REF_RESOLVER, + default: lambda do |ref_resolver| + assert_raises(JSONSchemer::UnknownRef) do + ref_resolver.call(URI('example')) + end + end, test: lambda { |uri| { 'type' => 'string' } } ) end @@ -162,7 +168,7 @@ def test_ref_resolver def test_regexp_resolver run_configuration_test( :regexp_resolver, - default: JSONSchemer::Configuration::Defaults::REGEXP_RESOLVER, + default: 'ruby', test: 'ecma' ) end @@ -170,7 +176,7 @@ def test_regexp_resolver def test_output_format run_configuration_test( :output_format, - default: JSONSchemer::Configuration::Defaults::OUTPUT_FORMAT, + default: 'classic', test: 'basic' ) end @@ -178,7 +184,7 @@ def test_output_format def test_resolve_enumerators run_configuration_test( :resolve_enumerators, - default: JSONSchemer::Configuration::Defaults::RESOLVE_ENUMERATORS, + default: false, test: true ) end @@ -186,7 +192,7 @@ def test_resolve_enumerators def test_access_mode run_configuration_test( :access_mode, - default: JSONSchemer::Configuration::Defaults::ACCESS_MODE, + default: nil, test: "write" ) end @@ -201,4 +207,10 @@ def test_configuration_option_and_override assert(JSONSchemer.schema({ 'format' => 'time' }, configuration: configuration, format: true).valid?('08:30:06Z')) refute(JSONSchemer.schema({ 'format' => 'time' }, configuration: configuration, format: true).valid?('X')) end + + def test_configuration_keyword_init + configuration = JSONSchemer::Configuration.new(:format => false) + refute(JSONSchemer.schema({ 'format' => 'time' }).valid?('X')) + assert(JSONSchemer.schema({ 'format' => 'time' }, configuration: configuration).valid?('X')) + end end diff --git a/test/json_schemer_test.rb b/test/json_schemer_test.rb index 79a0a2e..df6f7df 100644 --- a/test/json_schemer_test.rb +++ b/test/json_schemer_test.rb @@ -313,7 +313,7 @@ def test_default_meta_schema def test_draft4_default_id assert_equal( - JSONSchemer::Configuration::Defaults::BASE_URI, + URI('json-schemer://schema'), JSONSchemer.schema(true, :meta_schema => JSONSchemer::Draft4::BASE_URI.to_s).base_uri ) end From 6b536e8311022f02db3220696cfa8e3b1a6c26aa Mon Sep 17 00:00:00 2001 From: David Harsha Date: Sat, 2 Mar 2024 10:19:11 -0800 Subject: [PATCH 28/32] Add `Configuration` functionality tests Make sure the options are actually getting applied properly. --- test/configuration_test.rb | 137 +++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/test/configuration_test.rb b/test/configuration_test.rb index 33b11cf..a4248bf 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -213,4 +213,141 @@ def test_configuration_keyword_init refute(JSONSchemer.schema({ 'format' => 'time' }).valid?('X')) assert(JSONSchemer.schema({ 'format' => 'time' }, configuration: configuration).valid?('X')) end + + def test_configuration_behavior + before_property_validation = false + after_property_validation = false + + configuration = JSONSchemer::Configuration.new( + base_uri: URI('json-schemer://testschema'), + meta_schema: 'http://json-schema.org/draft-07/schema#', + formats: { + 'custom-format' => proc do |instance, _value| + instance == 'valid-format' + end + }, + content_encodings: { + 'custom-content-encoding' => proc do |instance| + [instance == 'valid-content-encoding', 'valid-content-encoding'] + end + }, + content_media_types: { + 'custom-media-type' => proc do |instance| + [instance == 'valid-media-type', 'valid-media-type'] + end + }, + keywords: { + 'custom-keyword' => proc do |instance, _schema, _instance_location| + instance == 'valid-keyword' + end + }, + before_property_validation: proc { before_property_validation = true }, + after_property_validation: [proc { after_property_validation = true }], + insert_property_defaults: true, + property_default_resolver: proc do |instance, property, _results_with_tree_validity| + instance[property] = 'custom-default' + end, + ref_resolver: { + URI('json-schemer://testschema/const-ref') => { 'const' => 'valid-const' } + }.to_proc, + regexp_resolver: 'ecma', + output_format: 'basic', + resolve_enumerators: true, + access_mode: 'read' + ) + + schema = { + 'type' => 'object', + 'properties' => { + 'meta-schema' => { + '$ref' => 'const-ref', + 'const' => 'ignored' + }, + 'custom-format-test' => { + 'format' => 'custom-format' + }, + 'custom-content-encoding-test' => { + 'contentEncoding' => 'custom-content-encoding' + }, + 'custom-media-type-test' => { + 'contentMediaType' => 'custom-media-type' + }, + 'custom-keyword-test' => { + 'custom-keyword' => true + }, + 'custom-default-test' => { + 'default' => 'ignored' + }, + 'ref-test' => { + '$ref' => 'const-ref' + }, + 'regexp-test' => { + 'pattern' => '^valid-regexp$' + }, + 'access-mode-test-read' => { + 'readOnly' => true + }, + 'access-mode-test-write' => { + 'writeOnly' => true + } + } + } + schemer = JSONSchemer.schema(schema, configuration: configuration) + + assert_equal(URI('json-schemer://testschema'), schemer.base_uri) + refute(before_property_validation) + refute(after_property_validation) + + valid_draft7_schema = { 'meta-schema' => 'valid-const' } + assert(schemer.valid?(valid_draft7_schema)) + refute(JSONSchemer.schema(schema, configuration: configuration, meta_schema: JSONSchemer.draft201909).valid?(valid_draft7_schema)) + + custom_meta_schema = JSONSchemer.schema( + { + '$schema' => 'http://example.com/schema', + 'maximum' => 1, + 'exclusiveMaximum' => true + }, + configuration: JSONSchemer::Configuration.new(vocabulary: { 'json-schemer://draft4' => true }), + base_uri: URI('http://example.com/schema') + ) + assert(JSONSchemer.valid_schema?(0, meta_schema: custom_meta_schema)) + refute(JSONSchemer.valid_schema?(1, meta_schema: custom_meta_schema)) + + refute(JSONSchemer.schema({ 'format' => 'email' }).valid?('invalid')) + assert(JSONSchemer.schema({ 'format' => 'email' }, configuration: JSONSchemer::Configuration.new(format: false)).valid?('invalid')) + + assert(schemer.valid?({ 'custom-format-test' => 'valid-format' })) + refute(schemer.valid?({ 'custom-format-test' => 'invalid' })) + + assert(schemer.valid?({ 'custom-content-encoding-test' => 'valid-content-encoding' })) + refute(schemer.valid?({ 'custom-content-encoding-test' => 'invalid' })) + + assert(schemer.valid?({ 'custom-media-type-test' => 'valid-media-type' })) + refute(schemer.valid?({ 'custom-media-type-test' => 'invalid' })) + + assert(schemer.valid?({ 'custom-keyword-test' => 'valid-keyword' })) + refute(schemer.valid?({ 'custom-keyword-test' => 'invalid' })) + + assert(before_property_validation) + assert(after_property_validation) + + data = {} + assert(schemer.valid?(data)) + assert_equal('custom-default', data.fetch('custom-default-test')) + + assert(schemer.valid?({ 'ref-test' => 'valid-const' })) + refute(schemer.valid?({ 'ref-test' => 'invalid' })) + + assert(schemer.valid?({ 'regexp-test' => 'valid-regexp' })) + refute(schemer.valid?({ 'regexp-test' => "\nvalid-regexp\n" })) + + assert(schemer.validate({}).fetch('valid')) + assert_kind_of(Array, schemer.validate('invalid').fetch('errors')) + + assert(schemer.valid?({ 'access-mode-test-read' => '?' })) + refute(schemer.valid?({ 'access-mode-test-read' => '?' }, access_mode: 'write')) + refute(schemer.valid?({ 'access-mode-test-write' => '?' })) + assert(schemer.valid?({ 'access-mode-test-write' => '?' }, access_mode: 'write')) + end end From f3f81e356cc3fe0236efe3929888286ec53cfe73 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Sat, 2 Mar 2024 10:36:45 -0800 Subject: [PATCH 29/32] Squashed 'JSON-Schema-Test-Suite/' changes from d38ddd54..bf0360f4 bf0360f4 add $recursiveAnchor to 2019-09 meta-schemas 0519d1f0 add $dynamicAnchor to meta-schemas b41167c7 Merge pull request #714 from json-schema-org/more-not 4221a55a Add tests for not: {} schemas for all values. c499d1d2 Merge pull request #713 from spacether/patch-1 24a471bd Update README.md 544f7c3d Merge pull request #712 from otto-ifak/main 9dad3ebe Add tests for enum with array of bool 589a0858 Merge pull request #706 from marksparkza/unevaluated-before-ref 64d5cab9 Merge pull request #710 from spacether/patch-1 418cdbd6 Removes idea folder e0a9e066 Updates all other tests to mention grapheme/graphemes 217bf81b Merge pull request #701 from json-schema-org/ether/dynamicRef-boolean 7a3d06d7 I remove a test that doesn't make sense. e8bf453d Move tests with ids in non-schemas to optional 69136952 Update minLength.json d545be21 Fix duplidate identifiers in recently added tests 4e9640c8 test when $dynamicRef references a boolean schema 3dab98ca Merge pull request #705 from json-schema-org/gregsdennis/remove-contains-objects-tests 1d3aa495 remove more maxContains 4a2c61e8 Test unevaluatedItems|Properties before $ref ec553d76 contains no longer applies to objects 0433a2bf Merge pull request #704 from big-andy-coates/clarify-format-requirements c685195f Merge pull request #703 from big-andy-coates/link-to-creek-validator-comprison-site a46174b0 Add more detail around test runner requirements for `format` tests bb1de8a9 The site linked to is a data-driven functional and performance benchmark of JVM based validator implementations. git-subtree-dir: JSON-Schema-Test-Suite git-subtree-split: bf0360f4b7c51b8f968aabe7f3f49e12b120fc85 --- README.md | 11 +- .../draft-next/format-assertion-false.json | 1 + remotes/draft-next/format-assertion-true.json | 1 + .../draft-next/metaschema-no-validation.json | 1 + .../metaschema-optional-vocabulary.json | 1 + .../metaschema-no-validation.json | 1 + .../metaschema-optional-vocabulary.json | 1 + .../draft2020-12/format-assertion-false.json | 1 + .../draft2020-12/format-assertion-true.json | 1 + .../metaschema-no-validation.json | 1 + .../metaschema-optional-vocabulary.json | 1 + tests/draft-next/anchor.json | 90 ---------- tests/draft-next/contains.json | 104 ++---------- tests/draft-next/dynamicRef.json | 30 ++++ tests/draft-next/enum.json | 96 +++++++++++ tests/draft-next/id.json | 83 ---------- tests/draft-next/maxContains.json | 50 ------ tests/draft-next/maxLength.json | 2 +- tests/draft-next/minLength.json | 2 +- tests/draft-next/optional/anchor.json | 60 +++++++ tests/draft-next/optional/id.json | 53 ++++++ .../{ => optional}/unknownKeyword.json | 0 tests/draft-next/unevaluatedItems.json | 37 ++++- tests/draft-next/unevaluatedProperties.json | 95 +++++------ tests/draft2019-09/anchor.json | 90 ---------- tests/draft2019-09/enum.json | 96 +++++++++++ tests/draft2019-09/id.json | 83 ---------- tests/draft2019-09/maxLength.json | 2 +- tests/draft2019-09/minLength.json | 2 +- tests/draft2019-09/not.json | 154 +++++++++++++++++- tests/draft2019-09/optional/anchor.json | 60 +++++++ tests/draft2019-09/optional/id.json | 53 ++++++ .../{ => optional}/unknownKeyword.json | 0 tests/draft2019-09/unevaluatedItems.json | 37 ++++- tests/draft2019-09/unevaluatedProperties.json | 44 ++++- tests/draft2020-12/anchor.json | 90 ---------- tests/draft2020-12/dynamicRef.json | 30 ++++ tests/draft2020-12/enum.json | 96 +++++++++++ tests/draft2020-12/id.json | 83 ---------- tests/draft2020-12/maxLength.json | 2 +- tests/draft2020-12/minLength.json | 2 +- tests/draft2020-12/not.json | 154 +++++++++++++++++- tests/draft2020-12/optional/anchor.json | 60 +++++++ tests/draft2020-12/optional/id.json | 53 ++++++ .../{ => optional}/unknownKeyword.json | 0 tests/draft2020-12/unevaluatedItems.json | 37 ++++- tests/draft2020-12/unevaluatedProperties.json | 44 ++++- tests/draft3/maxLength.json | 2 +- tests/draft3/minLength.json | 2 +- tests/draft4/enum.json | 84 ++++++++++ tests/draft4/maxLength.json | 2 +- tests/draft4/minLength.json | 2 +- tests/draft4/not.json | 63 ++++++- tests/draft4/{ => optional}/id.json | 0 tests/draft6/enum.json | 84 ++++++++++ tests/draft6/maxLength.json | 2 +- tests/draft6/minLength.json | 2 +- tests/draft6/not.json | 152 ++++++++++++++++- tests/draft6/{ => optional}/id.json | 0 .../draft6/{ => optional}/unknownKeyword.json | 0 tests/draft7/enum.json | 84 ++++++++++ tests/draft7/maxLength.json | 2 +- tests/draft7/minLength.json | 2 +- tests/draft7/not.json | 152 ++++++++++++++++- tests/draft7/{ => optional}/id.json | 0 .../draft7/{ => optional}/unknownKeyword.json | 0 66 files changed, 1872 insertions(+), 758 deletions(-) create mode 100644 tests/draft-next/optional/anchor.json create mode 100644 tests/draft-next/optional/id.json rename tests/draft-next/{ => optional}/unknownKeyword.json (100%) create mode 100644 tests/draft2019-09/optional/anchor.json create mode 100644 tests/draft2019-09/optional/id.json rename tests/draft2019-09/{ => optional}/unknownKeyword.json (100%) create mode 100644 tests/draft2020-12/optional/anchor.json create mode 100644 tests/draft2020-12/optional/id.json rename tests/draft2020-12/{ => optional}/unknownKeyword.json (100%) rename tests/draft4/{ => optional}/id.json (100%) rename tests/draft6/{ => optional}/id.json (100%) rename tests/draft6/{ => optional}/unknownKeyword.json (100%) rename tests/draft7/{ => optional}/id.json (100%) rename tests/draft7/{ => optional}/unknownKeyword.json (100%) diff --git a/README.md b/README.md index f638315..bfdcb50 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ To test a specific version: * For 2019-09 and later published drafts, implementations that are able to detect the draft of each schema via `$schema` SHOULD be configured to do so * For draft-07 and earlier, draft-next, and implementations unable to detect via `$schema`, implementations MUST be configured to expect the draft matching the test directory name -* Load any remote references [described below](additional-assumptions) and configure your implementation to retrieve them via their URIs +* Load any remote references [described below](#additional-assumptions) and configure your implementation to retrieve them via their URIs * Walk the filesystem tree for that version's subdirectory and for each `.json` file found: * if the file is located in the root of the version directory: @@ -159,7 +159,7 @@ If your implementation supports multiple versions, run the above procedure for e ``` 2. Test cases found within [special subdirectories](#subdirectories-within-each-draft) may require additional configuration to run. - In particular, tests within the `optional/format` subdirectory may require implementations to change the way they treat the `"format"`keyword (particularly on older drafts which did not have a notion of vocabularies). + In particular, when running tests within the `optional/format` subdirectory, test runners should configure implementations to enable format validation, where the implementation supports it. ### Invariants & Guarantees @@ -254,12 +254,14 @@ This suite is being used by: ### Java +* [json-schema-validation-comparison](https://www.creekservice.org/json-schema-validation-comparison/functional) (Comparison site for JVM-based validator implementations) * [json-schema-validator](https://github.com/daveclayton/json-schema-validator) * [everit-org/json-schema](https://github.com/everit-org/json-schema) * [networknt/json-schema-validator](https://github.com/networknt/json-schema-validator) * [Justify](https://github.com/leadpony/justify) * [Snow](https://github.com/ssilverman/snowy-json) * [jsonschemafriend](https://github.com/jimblackler/jsonschemafriend) +* [OpenAPI JSON Schema Generator](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) ### JavaScript @@ -279,6 +281,10 @@ This suite is being used by: * [ajv](https://github.com/epoberezkin/ajv) * [djv](https://github.com/korzio/djv) +### Kotlin + +* [json-schema-validation-comparison](https://www.creekservice.org/json-schema-validation-comparison/functional) (Comparison site for JVM-based validator implementations) + ### Node.js For node.js developers, the suite is also available as an [npm](https://www.npmjs.com/package/@json-schema-org/tests) package. @@ -327,6 +333,7 @@ Node-specific support is maintained in a [separate repository](https://github.co ### Scala +* [json-schema-validation-comparison](https://www.creekservice.org/json-schema-validation-comparison/functional) (Comparison site for JVM-based validator implementations) * [typed-json](https://github.com/frawa/typed-json) ### Swift diff --git a/remotes/draft-next/format-assertion-false.json b/remotes/draft-next/format-assertion-false.json index 91c8669..9cbd2a1 100644 --- a/remotes/draft-next/format-assertion-false.json +++ b/remotes/draft-next/format-assertion-false.json @@ -5,6 +5,7 @@ "https://json-schema.org/draft/next/vocab/core": true, "https://json-schema.org/draft/next/vocab/format-assertion": false }, + "$dynamicAnchor": "meta", "allOf": [ { "$ref": "https://json-schema.org/draft/next/meta/core" }, { "$ref": "https://json-schema.org/draft/next/meta/format-assertion" } diff --git a/remotes/draft-next/format-assertion-true.json b/remotes/draft-next/format-assertion-true.json index a33d143..b3ff69f 100644 --- a/remotes/draft-next/format-assertion-true.json +++ b/remotes/draft-next/format-assertion-true.json @@ -5,6 +5,7 @@ "https://json-schema.org/draft/next/vocab/core": true, "https://json-schema.org/draft/next/vocab/format-assertion": true }, + "$dynamicAnchor": "meta", "allOf": [ { "$ref": "https://json-schema.org/draft/next/meta/core" }, { "$ref": "https://json-schema.org/draft/next/meta/format-assertion" } diff --git a/remotes/draft-next/metaschema-no-validation.json b/remotes/draft-next/metaschema-no-validation.json index c19c9e8..90e32a6 100644 --- a/remotes/draft-next/metaschema-no-validation.json +++ b/remotes/draft-next/metaschema-no-validation.json @@ -5,6 +5,7 @@ "https://json-schema.org/draft/next/vocab/applicator": true, "https://json-schema.org/draft/next/vocab/core": true }, + "$dynamicAnchor": "meta", "allOf": [ { "$ref": "https://json-schema.org/draft/next/meta/applicator" }, { "$ref": "https://json-schema.org/draft/next/meta/core" } diff --git a/remotes/draft-next/metaschema-optional-vocabulary.json b/remotes/draft-next/metaschema-optional-vocabulary.json index e78e531..1af0cad 100644 --- a/remotes/draft-next/metaschema-optional-vocabulary.json +++ b/remotes/draft-next/metaschema-optional-vocabulary.json @@ -6,6 +6,7 @@ "https://json-schema.org/draft/next/vocab/core": true, "http://localhost:1234/draft/next/vocab/custom": false }, + "$dynamicAnchor": "meta", "allOf": [ { "$ref": "https://json-schema.org/draft/next/meta/validation" }, { "$ref": "https://json-schema.org/draft/next/meta/core" } diff --git a/remotes/draft2019-09/metaschema-no-validation.json b/remotes/draft2019-09/metaschema-no-validation.json index 494f0ab..859006c 100644 --- a/remotes/draft2019-09/metaschema-no-validation.json +++ b/remotes/draft2019-09/metaschema-no-validation.json @@ -5,6 +5,7 @@ "https://json-schema.org/draft/2019-09/vocab/applicator": true, "https://json-schema.org/draft/2019-09/vocab/core": true }, + "$recursiveAnchor": true, "allOf": [ { "$ref": "https://json-schema.org/draft/2019-09/meta/applicator" }, { "$ref": "https://json-schema.org/draft/2019-09/meta/core" } diff --git a/remotes/draft2019-09/metaschema-optional-vocabulary.json b/remotes/draft2019-09/metaschema-optional-vocabulary.json index 968597c..3a7502a 100644 --- a/remotes/draft2019-09/metaschema-optional-vocabulary.json +++ b/remotes/draft2019-09/metaschema-optional-vocabulary.json @@ -6,6 +6,7 @@ "https://json-schema.org/draft/2019-09/vocab/core": true, "http://localhost:1234/draft/2019-09/vocab/custom": false }, + "$recursiveAnchor": true, "allOf": [ { "$ref": "https://json-schema.org/draft/2019-09/meta/validation" }, { "$ref": "https://json-schema.org/draft/2019-09/meta/core" } diff --git a/remotes/draft2020-12/format-assertion-false.json b/remotes/draft2020-12/format-assertion-false.json index d6dd645..43a711c 100644 --- a/remotes/draft2020-12/format-assertion-false.json +++ b/remotes/draft2020-12/format-assertion-false.json @@ -5,6 +5,7 @@ "https://json-schema.org/draft/2020-12/vocab/core": true, "https://json-schema.org/draft/2020-12/vocab/format-assertion": false }, + "$dynamicAnchor": "meta", "allOf": [ { "$ref": "https://json-schema.org/draft/2020-12/meta/core" }, { "$ref": "https://json-schema.org/draft/2020-12/meta/format-assertion" } diff --git a/remotes/draft2020-12/format-assertion-true.json b/remotes/draft2020-12/format-assertion-true.json index bb16d58..39c6b0a 100644 --- a/remotes/draft2020-12/format-assertion-true.json +++ b/remotes/draft2020-12/format-assertion-true.json @@ -5,6 +5,7 @@ "https://json-schema.org/draft/2020-12/vocab/core": true, "https://json-schema.org/draft/2020-12/vocab/format-assertion": true }, + "$dynamicAnchor": "meta", "allOf": [ { "$ref": "https://json-schema.org/draft/2020-12/meta/core" }, { "$ref": "https://json-schema.org/draft/2020-12/meta/format-assertion" } diff --git a/remotes/draft2020-12/metaschema-no-validation.json b/remotes/draft2020-12/metaschema-no-validation.json index 85d74b2..71be8b5 100644 --- a/remotes/draft2020-12/metaschema-no-validation.json +++ b/remotes/draft2020-12/metaschema-no-validation.json @@ -5,6 +5,7 @@ "https://json-schema.org/draft/2020-12/vocab/applicator": true, "https://json-schema.org/draft/2020-12/vocab/core": true }, + "$dynamicAnchor": "meta", "allOf": [ { "$ref": "https://json-schema.org/draft/2020-12/meta/applicator" }, { "$ref": "https://json-schema.org/draft/2020-12/meta/core" } diff --git a/remotes/draft2020-12/metaschema-optional-vocabulary.json b/remotes/draft2020-12/metaschema-optional-vocabulary.json index f38ec28..a6963e5 100644 --- a/remotes/draft2020-12/metaschema-optional-vocabulary.json +++ b/remotes/draft2020-12/metaschema-optional-vocabulary.json @@ -6,6 +6,7 @@ "https://json-schema.org/draft/2020-12/vocab/core": true, "http://localhost:1234/draft/2020-12/vocab/custom": false }, + "$dynamicAnchor": "meta", "allOf": [ { "$ref": "https://json-schema.org/draft/2020-12/meta/validation" }, { "$ref": "https://json-schema.org/draft/2020-12/meta/core" } diff --git a/tests/draft-next/anchor.json b/tests/draft-next/anchor.json index 321d844..a0c4c51 100644 --- a/tests/draft-next/anchor.json +++ b/tests/draft-next/anchor.json @@ -81,64 +81,6 @@ } ] }, - { - "description": "$anchor inside an enum is not a real identifier", - "comment": "the implementation must not be confused by an $anchor buried in the enum", - "schema": { - "$schema": "https://json-schema.org/draft/next/schema", - "$defs": { - "anchor_in_enum": { - "enum": [ - { - "$anchor": "my_anchor", - "type": "null" - } - ] - }, - "real_identifier_in_schema": { - "$anchor": "my_anchor", - "type": "string" - }, - "zzz_anchor_in_const": { - "const": { - "$anchor": "my_anchor", - "type": "null" - } - } - }, - "anyOf": [ - { "$ref": "#/$defs/anchor_in_enum" }, - { "$ref": "#my_anchor" } - ] - }, - "tests": [ - { - "description": "exact match to enum, and type matches", - "data": { - "$anchor": "my_anchor", - "type": "null" - }, - "valid": true - }, - { - "description": "in implementations that strip $anchor, this may match either $def", - "data": { - "type": "null" - }, - "valid": false - }, - { - "description": "match $ref to $anchor", - "data": "a string to match #/$defs/anchor_in_enum", - "valid": true - }, - { - "description": "no match on enum or $ref to $anchor", - "data": 1, - "valid": false - } - ] - }, { "description": "same $anchor with different base uri", "schema": { @@ -175,38 +117,6 @@ } ] }, - { - "description": "non-schema object containing an $anchor property", - "schema": { - "$schema": "https://json-schema.org/draft/next/schema", - "$defs": { - "const_not_anchor": { - "const": { - "$anchor": "not_a_real_anchor" - } - } - }, - "if": { - "const": "skip not_a_real_anchor" - }, - "then": true, - "else" : { - "$ref": "#/$defs/const_not_anchor" - } - }, - "tests": [ - { - "description": "skip traversing definition for a valid result", - "data": "skip not_a_real_anchor", - "valid": true - }, - { - "description": "const at const_not_anchor does not match", - "data": 1, - "valid": false - } - ] - }, { "description": "invalid anchors", "schema": { diff --git a/tests/draft-next/contains.json b/tests/draft-next/contains.json index c17f55e..8539a53 100644 --- a/tests/draft-next/contains.json +++ b/tests/draft-next/contains.json @@ -31,31 +31,6 @@ "data": [], "valid": false }, - { - "description": "object with property matching schema (5) is valid", - "data": { "a": 3, "b": 4, "c": 5 }, - "valid": true - }, - { - "description": "object with property matching schema (6) is valid", - "data": { "a": 3, "b": 4, "c": 6 }, - "valid": true - }, - { - "description": "object with two properties matching schema (5, 6) is valid", - "data": { "a": 3, "b": 4, "c": 5, "d": 6 }, - "valid": true - }, - { - "description": "object without properties matching schema is invalid", - "data": { "a": 2, "b": 3, "c": 4 }, - "valid": false - }, - { - "description": "empty object is invalid", - "data": {}, - "valid": false - }, { "description": "not array or object is valid", "data": 42, @@ -84,21 +59,6 @@ "description": "array without item 5 is invalid", "data": [1, 2, 3, 4], "valid": false - }, - { - "description": "object with property 5 is valid", - "data": { "a": 3, "b": 4, "c": 5 }, - "valid": true - }, - { - "description": "object with two properties 5 is valid", - "data": { "a": 3, "b": 4, "c": 5, "d": 5 }, - "valid": true - }, - { - "description": "object without property 5 is invalid", - "data": { "a": 1, "b": 2, "c": 3, "d": 4 }, - "valid": false } ] }, @@ -118,16 +78,6 @@ "description": "empty array is invalid", "data": [], "valid": false - }, - { - "description": "any non-empty object is valid", - "data": { "a": "foo" }, - "valid": true - }, - { - "description": "empty object is invalid", - "data": {}, - "valid": false } ] }, @@ -149,18 +99,28 @@ "valid": false }, { - "description": "any non-empty object is invalid", - "data": ["foo"], - "valid": false + "description": "non-arrays are valid - string", + "data": "contains does not apply to strings", + "valid": true }, { - "description": "empty object is invalid", + "description": "non-arrays are valid - object", "data": {}, - "valid": false + "valid": true }, { - "description": "non-arrays/objects are valid", - "data": "contains does not apply to strings", + "description": "non-arrays are valid - number", + "data": 42, + "valid": true + }, + { + "description": "non-arrays are valid - boolean", + "data": false, + "valid": true + }, + { + "description": "non-arrays are valid - null", + "data": null, "valid": true } ] @@ -193,26 +153,6 @@ "description": "matches neither items nor contains", "data": [1, 5], "valid": false - }, - { - "description": "matches additionalProperties, does not match contains", - "data": { "a": 2, "b": 4, "c": 8 }, - "valid": false - }, - { - "description": "does not match additionalProperties, matches contains", - "data": { "a": 3, "b": 6, "c": 9 }, - "valid": false - }, - { - "description": "matches both additionalProperties and contains", - "data": { "a": 6, "b": 12 }, - "valid": true - }, - { - "description": "matches neither additionalProperties nor contains", - "data": { "a": 1, "b": 5 }, - "valid": false } ] }, @@ -235,16 +175,6 @@ "description": "empty array is invalid", "data": [], "valid": false - }, - { - "description": "any non-empty object is valid", - "data": { "a": "foo" }, - "valid": true - }, - { - "description": "empty object is invalid", - "data": {}, - "valid": false } ] }, diff --git a/tests/draft-next/dynamicRef.json b/tests/draft-next/dynamicRef.json index 428c83b..94124ff 100644 --- a/tests/draft-next/dynamicRef.json +++ b/tests/draft-next/dynamicRef.json @@ -612,5 +612,35 @@ "valid": false } ] + }, + { + "description": "$dynamicRef points to a boolean schema", + "schema": { + "$schema": "https://json-schema.org/draft/next/schema", + "$defs": { + "true": true, + "false": false + }, + "properties": { + "true": { + "$dynamicRef": "#/$defs/true" + }, + "false": { + "$dynamicRef": "#/$defs/false" + } + } + }, + "tests": [ + { + "description": "follow $dynamicRef to a true schema", + "data": { "true": 1 }, + "valid": true + }, + { + "description": "follow $dynamicRef to a false schema", + "data": { "false": 1 }, + "valid": false + } + ] } ] diff --git a/tests/draft-next/enum.json b/tests/draft-next/enum.json index 32e5af0..e263f39 100644 --- a/tests/draft-next/enum.json +++ b/tests/draft-next/enum.json @@ -168,6 +168,30 @@ } ] }, + { + "description": "enum with [false] does not match [0]", + "schema": { + "$schema": "https://json-schema.org/draft/next/schema", + "enum": [[false]] + }, + "tests": [ + { + "description": "[false] is valid", + "data": [false], + "valid": true + }, + { + "description": "[0] is invalid", + "data": [0], + "valid": false + }, + { + "description": "[0.0] is invalid", + "data": [0.0], + "valid": false + } + ] + }, { "description": "enum with true does not match 1", "schema": { @@ -192,6 +216,30 @@ } ] }, + { + "description": "enum with [true] does not match [1]", + "schema": { + "$schema": "https://json-schema.org/draft/next/schema", + "enum": [[true]] + }, + "tests": [ + { + "description": "[true] is valid", + "data": [true], + "valid": true + }, + { + "description": "[1] is invalid", + "data": [1], + "valid": false + }, + { + "description": "[1.0] is invalid", + "data": [1.0], + "valid": false + } + ] + }, { "description": "enum with 0 does not match false", "schema": { @@ -216,6 +264,30 @@ } ] }, + { + "description": "enum with [0] does not match [false]", + "schema": { + "$schema": "https://json-schema.org/draft/next/schema", + "enum": [[0]] + }, + "tests": [ + { + "description": "[false] is invalid", + "data": [false], + "valid": false + }, + { + "description": "[0] is valid", + "data": [0], + "valid": true + }, + { + "description": "[0.0] is valid", + "data": [0.0], + "valid": true + } + ] + }, { "description": "enum with 1 does not match true", "schema": { @@ -240,6 +312,30 @@ } ] }, + { + "description": "enum with [1] does not match [true]", + "schema": { + "$schema": "https://json-schema.org/draft/next/schema", + "enum": [[1]] + }, + "tests": [ + { + "description": "[true] is invalid", + "data": [true], + "valid": false + }, + { + "description": "[1] is valid", + "data": [1], + "valid": true + }, + { + "description": "[1.0] is valid", + "data": [1.0], + "valid": true + } + ] + }, { "description": "nul characters in strings", "schema": { diff --git a/tests/draft-next/id.json b/tests/draft-next/id.json index 9b3a591..fe74c6b 100644 --- a/tests/draft-next/id.json +++ b/tests/draft-next/id.json @@ -207,88 +207,5 @@ "valid": true } ] - }, - { - "description": "$id inside an enum is not a real identifier", - "comment": "the implementation must not be confused by an $id buried in the enum", - "schema": { - "$schema": "https://json-schema.org/draft/next/schema", - "$defs": { - "id_in_enum": { - "enum": [ - { - "$id": "https://localhost:1234/draft-next/id/my_identifier.json", - "type": "null" - } - ] - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft-next/id/my_identifier.json", - "type": "string" - }, - "zzz_id_in_const": { - "const": { - "$id": "https://localhost:1234/draft-next/id/my_identifier.json", - "type": "null" - } - } - }, - "anyOf": [ - { "$ref": "#/$defs/id_in_enum" }, - { "$ref": "https://localhost:1234/draft-next/id/my_identifier.json" } - ] - }, - "tests": [ - { - "description": "exact match to enum, and type matches", - "data": { - "$id": "https://localhost:1234/draft-next/id/my_identifier.json", - "type": "null" - }, - "valid": true - }, - { - "description": "match $ref to $id", - "data": "a string to match #/$defs/id_in_enum", - "valid": true - }, - { - "description": "no match on enum or $ref to $id", - "data": 1, - "valid": false - } - ] - }, - { - "description": "non-schema object containing an $id property", - "schema": { - "$schema": "https://json-schema.org/draft/next/schema", - "$defs": { - "const_not_id": { - "const": { - "$id": "not_a_real_id" - } - } - }, - "if": { - "const": "skip not_a_real_id" - }, - "then": true, - "else" : { - "$ref": "#/$defs/const_not_id" - } - }, - "tests": [ - { - "description": "skip traversing definition for a valid result", - "data": "skip not_a_real_id", - "valid": true - }, - { - "description": "const at const_not_id does not match", - "data": 1, - "valid": false - } - ] } ] diff --git a/tests/draft-next/maxContains.json b/tests/draft-next/maxContains.json index 7c15157..5af6e4c 100644 --- a/tests/draft-next/maxContains.json +++ b/tests/draft-next/maxContains.json @@ -15,16 +15,6 @@ "description": "two items still valid against lone maxContains", "data": [1, 2], "valid": true - }, - { - "description": "one property valid against lone maxContains", - "data": { "a": 1 }, - "valid": true - }, - { - "description": "two properties still valid against lone maxContains", - "data": { "a": 1, "b": 2 }, - "valid": true } ] }, @@ -60,31 +50,6 @@ "description": "some elements match, invalid maxContains", "data": [1, 2, 1], "valid": false - }, - { - "description": "empty object", - "data": {}, - "valid": false - }, - { - "description": "all properties match, valid maxContains", - "data": { "a": 1 }, - "valid": true - }, - { - "description": "all properties match, invalid maxContains", - "data": { "a": 1, "b": 1 }, - "valid": false - }, - { - "description": "some properties match, valid maxContains", - "data": { "a": 1, "b": 2 }, - "valid": true - }, - { - "description": "some properties match, invalid maxContains", - "data": { "a": 1, "b": 2, "c": 1 }, - "valid": false } ] }, @@ -131,21 +96,6 @@ "description": "array with minContains < maxContains < actual", "data": [1, 1, 1, 1], "valid": false - }, - { - "description": "object with actual < minContains < maxContains", - "data": {}, - "valid": false - }, - { - "description": "object with minContains < actual < maxContains", - "data": { "a": 1, "b": 1 }, - "valid": true - }, - { - "description": "object with minContains < maxContains < actual", - "data": { "a": 1, "b": 1, "c": 1, "d": 1 }, - "valid": false } ] } diff --git a/tests/draft-next/maxLength.json b/tests/draft-next/maxLength.json index e09e44a..c88f604 100644 --- a/tests/draft-next/maxLength.json +++ b/tests/draft-next/maxLength.json @@ -27,7 +27,7 @@ "valid": true }, { - "description": "two supplementary Unicode code points is long enough", + "description": "two graphemes is long enough", "data": "\uD83D\uDCA9\uD83D\uDCA9", "valid": true } diff --git a/tests/draft-next/minLength.json b/tests/draft-next/minLength.json index 16022ac..52c9c9a 100644 --- a/tests/draft-next/minLength.json +++ b/tests/draft-next/minLength.json @@ -27,7 +27,7 @@ "valid": true }, { - "description": "one supplementary Unicode code point is not long enough", + "description": "one grapheme is not long enough", "data": "\uD83D\uDCA9", "valid": false } diff --git a/tests/draft-next/optional/anchor.json b/tests/draft-next/optional/anchor.json new file mode 100644 index 0000000..1de0b7a --- /dev/null +++ b/tests/draft-next/optional/anchor.json @@ -0,0 +1,60 @@ +[ + { + "description": "$anchor inside an enum is not a real identifier", + "comment": "the implementation must not be confused by an $anchor buried in the enum", + "schema": { + "$schema": "https://json-schema.org/draft/next/schema", + "$defs": { + "anchor_in_enum": { + "enum": [ + { + "$anchor": "my_anchor", + "type": "null" + } + ] + }, + "real_identifier_in_schema": { + "$anchor": "my_anchor", + "type": "string" + }, + "zzz_anchor_in_const": { + "const": { + "$anchor": "my_anchor", + "type": "null" + } + } + }, + "anyOf": [ + { "$ref": "#/$defs/anchor_in_enum" }, + { "$ref": "#my_anchor" } + ] + }, + "tests": [ + { + "description": "exact match to enum, and type matches", + "data": { + "$anchor": "my_anchor", + "type": "null" + }, + "valid": true + }, + { + "description": "in implementations that strip $anchor, this may match either $def", + "data": { + "type": "null" + }, + "valid": false + }, + { + "description": "match $ref to $anchor", + "data": "a string to match #/$defs/anchor_in_enum", + "valid": true + }, + { + "description": "no match on enum or $ref to $anchor", + "data": 1, + "valid": false + } + ] + } +] diff --git a/tests/draft-next/optional/id.json b/tests/draft-next/optional/id.json new file mode 100644 index 0000000..fc26f26 --- /dev/null +++ b/tests/draft-next/optional/id.json @@ -0,0 +1,53 @@ +[ + { + "description": "$id inside an enum is not a real identifier", + "comment": "the implementation must not be confused by an $id buried in the enum", + "schema": { + "$schema": "https://json-schema.org/draft/next/schema", + "$defs": { + "id_in_enum": { + "enum": [ + { + "$id": "https://localhost:1234/draft-next/id/my_identifier.json", + "type": "null" + } + ] + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/draft-next/id/my_identifier.json", + "type": "string" + }, + "zzz_id_in_const": { + "const": { + "$id": "https://localhost:1234/draft-next/id/my_identifier.json", + "type": "null" + } + } + }, + "anyOf": [ + { "$ref": "#/$defs/id_in_enum" }, + { "$ref": "https://localhost:1234/draft-next/id/my_identifier.json" } + ] + }, + "tests": [ + { + "description": "exact match to enum, and type matches", + "data": { + "$id": "https://localhost:1234/draft-next/id/my_identifier.json", + "type": "null" + }, + "valid": true + }, + { + "description": "match $ref to $id", + "data": "a string to match #/$defs/id_in_enum", + "valid": true + }, + { + "description": "no match on enum or $ref to $id", + "data": 1, + "valid": false + } + ] + } +] diff --git a/tests/draft-next/unknownKeyword.json b/tests/draft-next/optional/unknownKeyword.json similarity index 100% rename from tests/draft-next/unknownKeyword.json rename to tests/draft-next/optional/unknownKeyword.json diff --git a/tests/draft-next/unevaluatedItems.json b/tests/draft-next/unevaluatedItems.json index 8dda001..08f6ef1 100644 --- a/tests/draft-next/unevaluatedItems.json +++ b/tests/draft-next/unevaluatedItems.json @@ -461,13 +461,44 @@ } ] }, + { + "description": "unevaluatedItems before $ref", + "schema": { + "$schema": "https://json-schema.org/draft/next/schema", + "unevaluatedItems": false, + "prefixItems": [ + { "type": "string" } + ], + "$ref": "#/$defs/bar", + "$defs": { + "bar": { + "prefixItems": [ + true, + { "type": "string" } + ] + } + } + }, + "tests": [ + { + "description": "with no unevaluated items", + "data": ["foo", "bar"], + "valid": true + }, + { + "description": "with unevaluated items", + "data": ["foo", "bar", "baz"], + "valid": false + } + ] + }, { "description": "unevaluatedItems with $dynamicRef", "schema": { "$schema": "https://json-schema.org/draft/next/schema", - "$id": "https://example.com/derived", + "$id": "https://example.com/unevaluated-items-with-dynamic-ref/derived", - "$ref": "/baseSchema", + "$ref": "./baseSchema", "$defs": { "derived": { @@ -478,7 +509,7 @@ ] }, "baseSchema": { - "$id": "/baseSchema", + "$id": "./baseSchema", "$comment": "unevaluatedItems comes first so it's more likely to catch bugs with implementations that are sensitive to keyword ordering", "unevaluatedItems": false, diff --git a/tests/draft-next/unevaluatedProperties.json b/tests/draft-next/unevaluatedProperties.json index 4fe7986..d0d5350 100644 --- a/tests/draft-next/unevaluatedProperties.json +++ b/tests/draft-next/unevaluatedProperties.json @@ -715,13 +715,51 @@ } ] }, + { + "description": "unevaluatedProperties before $ref", + "schema": { + "$schema": "https://json-schema.org/draft/next/schema", + "type": "object", + "unevaluatedProperties": false, + "properties": { + "foo": { "type": "string" } + }, + "$ref": "#/$defs/bar", + "$defs": { + "bar": { + "properties": { + "bar": { "type": "string" } + } + } + } + }, + "tests": [ + { + "description": "with no unevaluated properties", + "data": { + "foo": "foo", + "bar": "bar" + }, + "valid": true + }, + { + "description": "with unevaluated properties", + "data": { + "foo": "foo", + "bar": "bar", + "baz": "baz" + }, + "valid": false + } + ] + }, { "description": "unevaluatedProperties with $dynamicRef", "schema": { "$schema": "https://json-schema.org/draft/next/schema", - "$id": "https://example.com/derived", + "$id": "https://example.com/unevaluated-properties-with-dynamic-ref/derived", - "$ref": "/baseSchema", + "$ref": "./baseSchema", "$defs": { "derived": { @@ -731,7 +769,7 @@ } }, "baseSchema": { - "$id": "/baseSchema", + "$id": "./baseSchema", "$comment": "unevaluatedProperties comes first so it's more likely to catch bugs with implementations that are sensitive to keyword ordering", "unevaluatedProperties": false, @@ -1413,57 +1451,6 @@ } ] }, - { - "description": "unevaluatedProperties depends on adjacent contains", - "schema": { - "$schema": "https://json-schema.org/draft/next/schema", - "properties": { - "foo": { "type": "number" } - }, - "contains": { "type": "string" }, - "unevaluatedProperties": false - }, - "tests": [ - { - "description": "bar is evaluated by contains", - "data": { "foo": 1, "bar": "foo" }, - "valid": true - }, - { - "description": "contains fails, bar is not evaluated", - "data": { "foo": 1, "bar": 2 }, - "valid": false - }, - { - "description": "contains passes, bar is not evaluated", - "data": { "foo": 1, "bar": 2, "baz": "foo" }, - "valid": false - } - ] - }, - { - "description": "unevaluatedProperties depends on multiple nested contains", - "schema": { - "$schema": "https://json-schema.org/draft/next/schema", - "allOf": [ - { "contains": { "multipleOf": 2 } }, - { "contains": { "multipleOf": 3 } } - ], - "unevaluatedProperties": { "multipleOf": 5 } - }, - "tests": [ - { - "description": "5 not evaluated, passes unevaluatedItems", - "data": { "a": 2, "b": 3, "c": 4, "d": 5, "e": 6 }, - "valid": true - }, - { - "description": "7 not evaluated, fails unevaluatedItems", - "data": { "a": 2, "b": 3, "c": 4, "d": 7, "e": 8 }, - "valid": false - } - ] - }, { "description": "non-object instances are valid", "schema": { diff --git a/tests/draft2019-09/anchor.json b/tests/draft2019-09/anchor.json index 5d8c86f..eb0a969 100644 --- a/tests/draft2019-09/anchor.json +++ b/tests/draft2019-09/anchor.json @@ -81,64 +81,6 @@ } ] }, - { - "description": "$anchor inside an enum is not a real identifier", - "comment": "the implementation must not be confused by an $anchor buried in the enum", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "anchor_in_enum": { - "enum": [ - { - "$anchor": "my_anchor", - "type": "null" - } - ] - }, - "real_identifier_in_schema": { - "$anchor": "my_anchor", - "type": "string" - }, - "zzz_anchor_in_const": { - "const": { - "$anchor": "my_anchor", - "type": "null" - } - } - }, - "anyOf": [ - { "$ref": "#/$defs/anchor_in_enum" }, - { "$ref": "#my_anchor" } - ] - }, - "tests": [ - { - "description": "exact match to enum, and type matches", - "data": { - "$anchor": "my_anchor", - "type": "null" - }, - "valid": true - }, - { - "description": "in implementations that strip $anchor, this may match either $def", - "data": { - "type": "null" - }, - "valid": false - }, - { - "description": "match $ref to $anchor", - "data": "a string to match #/$defs/anchor_in_enum", - "valid": true - }, - { - "description": "no match on enum or $ref to $anchor", - "data": 1, - "valid": false - } - ] - }, { "description": "same $anchor with different base uri", "schema": { @@ -175,38 +117,6 @@ } ] }, - { - "description": "non-schema object containing an $anchor property", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "const_not_anchor": { - "const": { - "$anchor": "not_a_real_anchor" - } - } - }, - "if": { - "const": "skip not_a_real_anchor" - }, - "then": true, - "else" : { - "$ref": "#/$defs/const_not_anchor" - } - }, - "tests": [ - { - "description": "skip traversing definition for a valid result", - "data": "skip not_a_real_anchor", - "valid": true - }, - { - "description": "const at const_not_anchor does not match", - "data": 1, - "valid": false - } - ] - }, { "description": "invalid anchors", "comment": "Section 8.2.3", diff --git a/tests/draft2019-09/enum.json b/tests/draft2019-09/enum.json index f9a44a6..1315211 100644 --- a/tests/draft2019-09/enum.json +++ b/tests/draft2019-09/enum.json @@ -168,6 +168,30 @@ } ] }, + { + "description": "enum with [false] does not match [0]", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [[false]] + }, + "tests": [ + { + "description": "[false] is valid", + "data": [false], + "valid": true + }, + { + "description": "[0] is invalid", + "data": [0], + "valid": false + }, + { + "description": "[0.0] is invalid", + "data": [0.0], + "valid": false + } + ] + }, { "description": "enum with true does not match 1", "schema": { @@ -192,6 +216,30 @@ } ] }, + { + "description": "enum with [true] does not match [1]", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [[true]] + }, + "tests": [ + { + "description": "[true] is valid", + "data": [true], + "valid": true + }, + { + "description": "[1] is invalid", + "data": [1], + "valid": false + }, + { + "description": "[1.0] is invalid", + "data": [1.0], + "valid": false + } + ] + }, { "description": "enum with 0 does not match false", "schema": { @@ -216,6 +264,30 @@ } ] }, + { + "description": "enum with [0] does not match [false]", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [[0]] + }, + "tests": [ + { + "description": "[false] is invalid", + "data": [false], + "valid": false + }, + { + "description": "[0] is valid", + "data": [0], + "valid": true + }, + { + "description": "[0.0] is valid", + "data": [0.0], + "valid": true + } + ] + }, { "description": "enum with 1 does not match true", "schema": { @@ -240,6 +312,30 @@ } ] }, + { + "description": "enum with [1] does not match [true]", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [[1]] + }, + "tests": [ + { + "description": "[true] is invalid", + "data": [true], + "valid": false + }, + { + "description": "[1] is valid", + "data": [1], + "valid": true + }, + { + "description": "[1.0] is valid", + "data": [1.0], + "valid": true + } + ] + }, { "description": "nul characters in strings", "schema": { diff --git a/tests/draft2019-09/id.json b/tests/draft2019-09/id.json index e2e403f..0ba3138 100644 --- a/tests/draft2019-09/id.json +++ b/tests/draft2019-09/id.json @@ -207,88 +207,5 @@ "valid": true } ] - }, - { - "description": "$id inside an enum is not a real identifier", - "comment": "the implementation must not be confused by an $id buried in the enum", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "id_in_enum": { - "enum": [ - { - "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", - "type": "null" - } - ] - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", - "type": "string" - }, - "zzz_id_in_const": { - "const": { - "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", - "type": "null" - } - } - }, - "anyOf": [ - { "$ref": "#/$defs/id_in_enum" }, - { "$ref": "https://localhost:1234/draft2019-09/id/my_identifier.json" } - ] - }, - "tests": [ - { - "description": "exact match to enum, and type matches", - "data": { - "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", - "type": "null" - }, - "valid": true - }, - { - "description": "match $ref to $id", - "data": "a string to match #/$defs/id_in_enum", - "valid": true - }, - { - "description": "no match on enum or $ref to $id", - "data": 1, - "valid": false - } - ] - }, - { - "description": "non-schema object containing an $id property", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "const_not_id": { - "const": { - "$id": "not_a_real_id" - } - } - }, - "if": { - "const": "skip not_a_real_id" - }, - "then": true, - "else" : { - "$ref": "#/$defs/const_not_id" - } - }, - "tests": [ - { - "description": "skip traversing definition for a valid result", - "data": "skip not_a_real_id", - "valid": true - }, - { - "description": "const at const_not_id does not match", - "data": 1, - "valid": false - } - ] } ] diff --git a/tests/draft2019-09/maxLength.json b/tests/draft2019-09/maxLength.json index f242c3e..a0cc7d9 100644 --- a/tests/draft2019-09/maxLength.json +++ b/tests/draft2019-09/maxLength.json @@ -27,7 +27,7 @@ "valid": true }, { - "description": "two supplementary Unicode code points is long enough", + "description": "two graphemes is long enough", "data": "\uD83D\uDCA9\uD83D\uDCA9", "valid": true } diff --git a/tests/draft2019-09/minLength.json b/tests/draft2019-09/minLength.json index 19dec2c..1278266 100644 --- a/tests/draft2019-09/minLength.json +++ b/tests/draft2019-09/minLength.json @@ -27,7 +27,7 @@ "valid": true }, { - "description": "one supplementary Unicode code point is not long enough", + "description": "one grapheme is not long enough", "data": "\uD83D\uDCA9", "valid": false } diff --git a/tests/draft2019-09/not.json b/tests/draft2019-09/not.json index 62c9af9..d90728c 100644 --- a/tests/draft2019-09/not.json +++ b/tests/draft2019-09/not.json @@ -97,25 +97,173 @@ ] }, { - "description": "not with boolean schema true", + "description": "forbid everything with empty schema", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "not": {} + }, + "tests": [ + { + "description": "number is invalid", + "data": 1, + "valid": false + }, + { + "description": "string is invalid", + "data": "foo", + "valid": false + }, + { + "description": "boolean true is invalid", + "data": true, + "valid": false + }, + { + "description": "boolean false is invalid", + "data": false, + "valid": false + }, + { + "description": "null is invalid", + "data": null, + "valid": false + }, + { + "description": "object is invalid", + "data": {"foo": "bar"}, + "valid": false + }, + { + "description": "empty object is invalid", + "data": {}, + "valid": false + }, + { + "description": "array is invalid", + "data": ["foo"], + "valid": false + }, + { + "description": "empty array is invalid", + "data": [], + "valid": false + } + ] + }, + { + "description": "forbid everything with boolean schema true", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "not": true }, "tests": [ { - "description": "any value is invalid", + "description": "number is invalid", + "data": 1, + "valid": false + }, + { + "description": "string is invalid", "data": "foo", "valid": false + }, + { + "description": "boolean true is invalid", + "data": true, + "valid": false + }, + { + "description": "boolean false is invalid", + "data": false, + "valid": false + }, + { + "description": "null is invalid", + "data": null, + "valid": false + }, + { + "description": "object is invalid", + "data": {"foo": "bar"}, + "valid": false + }, + { + "description": "empty object is invalid", + "data": {}, + "valid": false + }, + { + "description": "array is invalid", + "data": ["foo"], + "valid": false + }, + { + "description": "empty array is invalid", + "data": [], + "valid": false } ] }, { - "description": "not with boolean schema false", + "description": "allow everything with boolean schema false", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "not": false }, + "tests": [ + { + "description": "number is valid", + "data": 1, + "valid": true + }, + { + "description": "string is valid", + "data": "foo", + "valid": true + }, + { + "description": "boolean true is valid", + "data": true, + "valid": true + }, + { + "description": "boolean false is valid", + "data": false, + "valid": true + }, + { + "description": "null is valid", + "data": null, + "valid": true + }, + { + "description": "object is valid", + "data": {"foo": "bar"}, + "valid": true + }, + { + "description": "empty object is valid", + "data": {}, + "valid": true + }, + { + "description": "array is valid", + "data": ["foo"], + "valid": true + }, + { + "description": "empty array is valid", + "data": [], + "valid": true + } + ] + }, + { + "description": "double negation", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "not": { "not": {} } + }, "tests": [ { "description": "any value is valid", diff --git a/tests/draft2019-09/optional/anchor.json b/tests/draft2019-09/optional/anchor.json new file mode 100644 index 0000000..45951d0 --- /dev/null +++ b/tests/draft2019-09/optional/anchor.json @@ -0,0 +1,60 @@ +[ + { + "description": "$anchor inside an enum is not a real identifier", + "comment": "the implementation must not be confused by an $anchor buried in the enum", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$defs": { + "anchor_in_enum": { + "enum": [ + { + "$anchor": "my_anchor", + "type": "null" + } + ] + }, + "real_identifier_in_schema": { + "$anchor": "my_anchor", + "type": "string" + }, + "zzz_anchor_in_const": { + "const": { + "$anchor": "my_anchor", + "type": "null" + } + } + }, + "anyOf": [ + { "$ref": "#/$defs/anchor_in_enum" }, + { "$ref": "#my_anchor" } + ] + }, + "tests": [ + { + "description": "exact match to enum, and type matches", + "data": { + "$anchor": "my_anchor", + "type": "null" + }, + "valid": true + }, + { + "description": "in implementations that strip $anchor, this may match either $def", + "data": { + "type": "null" + }, + "valid": false + }, + { + "description": "match $ref to $anchor", + "data": "a string to match #/$defs/anchor_in_enum", + "valid": true + }, + { + "description": "no match on enum or $ref to $anchor", + "data": 1, + "valid": false + } + ] + } +] diff --git a/tests/draft2019-09/optional/id.json b/tests/draft2019-09/optional/id.json new file mode 100644 index 0000000..4daa8f5 --- /dev/null +++ b/tests/draft2019-09/optional/id.json @@ -0,0 +1,53 @@ +[ + { + "description": "$id inside an enum is not a real identifier", + "comment": "the implementation must not be confused by an $id buried in the enum", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$defs": { + "id_in_enum": { + "enum": [ + { + "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", + "type": "null" + } + ] + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", + "type": "string" + }, + "zzz_id_in_const": { + "const": { + "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", + "type": "null" + } + } + }, + "anyOf": [ + { "$ref": "#/$defs/id_in_enum" }, + { "$ref": "https://localhost:1234/draft2019-09/id/my_identifier.json" } + ] + }, + "tests": [ + { + "description": "exact match to enum, and type matches", + "data": { + "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", + "type": "null" + }, + "valid": true + }, + { + "description": "match $ref to $id", + "data": "a string to match #/$defs/id_in_enum", + "valid": true + }, + { + "description": "no match on enum or $ref to $id", + "data": 1, + "valid": false + } + ] + } +] diff --git a/tests/draft2019-09/unknownKeyword.json b/tests/draft2019-09/optional/unknownKeyword.json similarity index 100% rename from tests/draft2019-09/unknownKeyword.json rename to tests/draft2019-09/optional/unknownKeyword.json diff --git a/tests/draft2019-09/unevaluatedItems.json b/tests/draft2019-09/unevaluatedItems.json index 9c115ab..8e2ee4b 100644 --- a/tests/draft2019-09/unevaluatedItems.json +++ b/tests/draft2019-09/unevaluatedItems.json @@ -480,15 +480,46 @@ } ] }, + { + "description": "unevaluatedItems before $ref", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "unevaluatedItems": false, + "items": [ + { "type": "string" } + ], + "$ref": "#/$defs/bar", + "$defs": { + "bar": { + "items": [ + true, + { "type": "string" } + ] + } + } + }, + "tests": [ + { + "description": "with no unevaluated items", + "data": ["foo", "bar"], + "valid": true + }, + { + "description": "with unevaluated items", + "data": ["foo", "bar", "baz"], + "valid": false + } + ] + }, { "description": "unevaluatedItems with $recursiveRef", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://example.com/extended-tree", + "$id": "https://example.com/unevaluated-items-with-recursive-ref/extended-tree", "$recursiveAnchor": true, - "$ref": "/tree", + "$ref": "./tree", "items": [ true, true, @@ -497,7 +528,7 @@ "$defs": { "tree": { - "$id": "/tree", + "$id": "./tree", "$recursiveAnchor": true, "type": "array", diff --git a/tests/draft2019-09/unevaluatedProperties.json b/tests/draft2019-09/unevaluatedProperties.json index 4e0d3ec..71c36df 100644 --- a/tests/draft2019-09/unevaluatedProperties.json +++ b/tests/draft2019-09/unevaluatedProperties.json @@ -715,22 +715,60 @@ } ] }, + { + "description": "unevaluatedProperties before $ref", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "unevaluatedProperties": false, + "properties": { + "foo": { "type": "string" } + }, + "$ref": "#/$defs/bar", + "$defs": { + "bar": { + "properties": { + "bar": { "type": "string" } + } + } + } + }, + "tests": [ + { + "description": "with no unevaluated properties", + "data": { + "foo": "foo", + "bar": "bar" + }, + "valid": true + }, + { + "description": "with unevaluated properties", + "data": { + "foo": "foo", + "bar": "bar", + "baz": "baz" + }, + "valid": false + } + ] + }, { "description": "unevaluatedProperties with $recursiveRef", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://example.com/extended-tree", + "$id": "https://example.com/unevaluated-properties-with-recursive-ref/extended-tree", "$recursiveAnchor": true, - "$ref": "/tree", + "$ref": "./tree", "properties": { "name": { "type": "string" } }, "$defs": { "tree": { - "$id": "/tree", + "$id": "./tree", "$recursiveAnchor": true, "type": "object", diff --git a/tests/draft2020-12/anchor.json b/tests/draft2020-12/anchor.json index 423835d..83a7166 100644 --- a/tests/draft2020-12/anchor.json +++ b/tests/draft2020-12/anchor.json @@ -81,64 +81,6 @@ } ] }, - { - "description": "$anchor inside an enum is not a real identifier", - "comment": "the implementation must not be confused by an $anchor buried in the enum", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "anchor_in_enum": { - "enum": [ - { - "$anchor": "my_anchor", - "type": "null" - } - ] - }, - "real_identifier_in_schema": { - "$anchor": "my_anchor", - "type": "string" - }, - "zzz_anchor_in_const": { - "const": { - "$anchor": "my_anchor", - "type": "null" - } - } - }, - "anyOf": [ - { "$ref": "#/$defs/anchor_in_enum" }, - { "$ref": "#my_anchor" } - ] - }, - "tests": [ - { - "description": "exact match to enum, and type matches", - "data": { - "$anchor": "my_anchor", - "type": "null" - }, - "valid": true - }, - { - "description": "in implementations that strip $anchor, this may match either $def", - "data": { - "type": "null" - }, - "valid": false - }, - { - "description": "match $ref to $anchor", - "data": "a string to match #/$defs/anchor_in_enum", - "valid": true - }, - { - "description": "no match on enum or $ref to $anchor", - "data": 1, - "valid": false - } - ] - }, { "description": "same $anchor with different base uri", "schema": { @@ -175,38 +117,6 @@ } ] }, - { - "description": "non-schema object containing an $anchor property", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "const_not_anchor": { - "const": { - "$anchor": "not_a_real_anchor" - } - } - }, - "if": { - "const": "skip not_a_real_anchor" - }, - "then": true, - "else" : { - "$ref": "#/$defs/const_not_anchor" - } - }, - "tests": [ - { - "description": "skip traversing definition for a valid result", - "data": "skip not_a_real_anchor", - "valid": true - }, - { - "description": "const at const_not_anchor does not match", - "data": 1, - "valid": false - } - ] - }, { "description": "invalid anchors", "comment": "Section 8.2.2", diff --git a/tests/draft2020-12/dynamicRef.json b/tests/draft2020-12/dynamicRef.json index c1c56cb..bff26ad 100644 --- a/tests/draft2020-12/dynamicRef.json +++ b/tests/draft2020-12/dynamicRef.json @@ -726,5 +726,35 @@ "valid": false } ] + }, + { + "description": "$dynamicRef points to a boolean schema", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$defs": { + "true": true, + "false": false + }, + "properties": { + "true": { + "$dynamicRef": "#/$defs/true" + }, + "false": { + "$dynamicRef": "#/$defs/false" + } + } + }, + "tests": [ + { + "description": "follow $dynamicRef to a true schema", + "data": { "true": 1 }, + "valid": true + }, + { + "description": "follow $dynamicRef to a false schema", + "data": { "false": 1 }, + "valid": false + } + ] } ] diff --git a/tests/draft2020-12/enum.json b/tests/draft2020-12/enum.json index 0d780b2..c8f35ea 100644 --- a/tests/draft2020-12/enum.json +++ b/tests/draft2020-12/enum.json @@ -168,6 +168,30 @@ } ] }, + { + "description": "enum with [false] does not match [0]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [[false]] + }, + "tests": [ + { + "description": "[false] is valid", + "data": [false], + "valid": true + }, + { + "description": "[0] is invalid", + "data": [0], + "valid": false + }, + { + "description": "[0.0] is invalid", + "data": [0.0], + "valid": false + } + ] + }, { "description": "enum with true does not match 1", "schema": { @@ -192,6 +216,30 @@ } ] }, + { + "description": "enum with [true] does not match [1]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [[true]] + }, + "tests": [ + { + "description": "[true] is valid", + "data": [true], + "valid": true + }, + { + "description": "[1] is invalid", + "data": [1], + "valid": false + }, + { + "description": "[1.0] is invalid", + "data": [1.0], + "valid": false + } + ] + }, { "description": "enum with 0 does not match false", "schema": { @@ -216,6 +264,30 @@ } ] }, + { + "description": "enum with [0] does not match [false]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [[0]] + }, + "tests": [ + { + "description": "[false] is invalid", + "data": [false], + "valid": false + }, + { + "description": "[0] is valid", + "data": [0], + "valid": true + }, + { + "description": "[0.0] is valid", + "data": [0.0], + "valid": true + } + ] + }, { "description": "enum with 1 does not match true", "schema": { @@ -240,6 +312,30 @@ } ] }, + { + "description": "enum with [1] does not match [true]", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [[1]] + }, + "tests": [ + { + "description": "[true] is invalid", + "data": [true], + "valid": false + }, + { + "description": "[1] is valid", + "data": [1], + "valid": true + }, + { + "description": "[1.0] is valid", + "data": [1.0], + "valid": true + } + ] + }, { "description": "nul characters in strings", "schema": { diff --git a/tests/draft2020-12/id.json b/tests/draft2020-12/id.json index 0ae5fe6..59265c4 100644 --- a/tests/draft2020-12/id.json +++ b/tests/draft2020-12/id.json @@ -207,88 +207,5 @@ "valid": true } ] - }, - { - "description": "$id inside an enum is not a real identifier", - "comment": "the implementation must not be confused by an $id buried in the enum", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "id_in_enum": { - "enum": [ - { - "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", - "type": "null" - } - ] - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", - "type": "string" - }, - "zzz_id_in_const": { - "const": { - "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", - "type": "null" - } - } - }, - "anyOf": [ - { "$ref": "#/$defs/id_in_enum" }, - { "$ref": "https://localhost:1234/draft2020-12/id/my_identifier.json" } - ] - }, - "tests": [ - { - "description": "exact match to enum, and type matches", - "data": { - "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", - "type": "null" - }, - "valid": true - }, - { - "description": "match $ref to $id", - "data": "a string to match #/$defs/id_in_enum", - "valid": true - }, - { - "description": "no match on enum or $ref to $id", - "data": 1, - "valid": false - } - ] - }, - { - "description": "non-schema object containing an $id property", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "const_not_id": { - "const": { - "$id": "not_a_real_id" - } - } - }, - "if": { - "const": "skip not_a_real_id" - }, - "then": true, - "else" : { - "$ref": "#/$defs/const_not_id" - } - }, - "tests": [ - { - "description": "skip traversing definition for a valid result", - "data": "skip not_a_real_id", - "valid": true - }, - { - "description": "const at const_not_id does not match", - "data": 1, - "valid": false - } - ] } ] diff --git a/tests/draft2020-12/maxLength.json b/tests/draft2020-12/maxLength.json index b6eb034..7462726 100644 --- a/tests/draft2020-12/maxLength.json +++ b/tests/draft2020-12/maxLength.json @@ -27,7 +27,7 @@ "valid": true }, { - "description": "two supplementary Unicode code points is long enough", + "description": "two graphemes is long enough", "data": "\uD83D\uDCA9\uD83D\uDCA9", "valid": true } diff --git a/tests/draft2020-12/minLength.json b/tests/draft2020-12/minLength.json index e0930b6..5076c5a 100644 --- a/tests/draft2020-12/minLength.json +++ b/tests/draft2020-12/minLength.json @@ -27,7 +27,7 @@ "valid": true }, { - "description": "one supplementary Unicode code point is not long enough", + "description": "one grapheme is not long enough", "data": "\uD83D\uDCA9", "valid": false } diff --git a/tests/draft2020-12/not.json b/tests/draft2020-12/not.json index 57e45ba..d0f2b6e 100644 --- a/tests/draft2020-12/not.json +++ b/tests/draft2020-12/not.json @@ -97,25 +97,173 @@ ] }, { - "description": "not with boolean schema true", + "description": "forbid everything with empty schema", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "not": {} + }, + "tests": [ + { + "description": "number is invalid", + "data": 1, + "valid": false + }, + { + "description": "string is invalid", + "data": "foo", + "valid": false + }, + { + "description": "boolean true is invalid", + "data": true, + "valid": false + }, + { + "description": "boolean false is invalid", + "data": false, + "valid": false + }, + { + "description": "null is invalid", + "data": null, + "valid": false + }, + { + "description": "object is invalid", + "data": {"foo": "bar"}, + "valid": false + }, + { + "description": "empty object is invalid", + "data": {}, + "valid": false + }, + { + "description": "array is invalid", + "data": ["foo"], + "valid": false + }, + { + "description": "empty array is invalid", + "data": [], + "valid": false + } + ] + }, + { + "description": "forbid everything with boolean schema true", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "not": true }, "tests": [ { - "description": "any value is invalid", + "description": "number is invalid", + "data": 1, + "valid": false + }, + { + "description": "string is invalid", "data": "foo", "valid": false + }, + { + "description": "boolean true is invalid", + "data": true, + "valid": false + }, + { + "description": "boolean false is invalid", + "data": false, + "valid": false + }, + { + "description": "null is invalid", + "data": null, + "valid": false + }, + { + "description": "object is invalid", + "data": {"foo": "bar"}, + "valid": false + }, + { + "description": "empty object is invalid", + "data": {}, + "valid": false + }, + { + "description": "array is invalid", + "data": ["foo"], + "valid": false + }, + { + "description": "empty array is invalid", + "data": [], + "valid": false } ] }, { - "description": "not with boolean schema false", + "description": "allow everything with boolean schema false", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "not": false }, + "tests": [ + { + "description": "number is valid", + "data": 1, + "valid": true + }, + { + "description": "string is valid", + "data": "foo", + "valid": true + }, + { + "description": "boolean true is valid", + "data": true, + "valid": true + }, + { + "description": "boolean false is valid", + "data": false, + "valid": true + }, + { + "description": "null is valid", + "data": null, + "valid": true + }, + { + "description": "object is valid", + "data": {"foo": "bar"}, + "valid": true + }, + { + "description": "empty object is valid", + "data": {}, + "valid": true + }, + { + "description": "array is valid", + "data": ["foo"], + "valid": true + }, + { + "description": "empty array is valid", + "data": [], + "valid": true + } + ] + }, + { + "description": "double negation", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "not": { "not": {} } + }, "tests": [ { "description": "any value is valid", diff --git a/tests/draft2020-12/optional/anchor.json b/tests/draft2020-12/optional/anchor.json new file mode 100644 index 0000000..6d6713b --- /dev/null +++ b/tests/draft2020-12/optional/anchor.json @@ -0,0 +1,60 @@ +[ + { + "description": "$anchor inside an enum is not a real identifier", + "comment": "the implementation must not be confused by an $anchor buried in the enum", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$defs": { + "anchor_in_enum": { + "enum": [ + { + "$anchor": "my_anchor", + "type": "null" + } + ] + }, + "real_identifier_in_schema": { + "$anchor": "my_anchor", + "type": "string" + }, + "zzz_anchor_in_const": { + "const": { + "$anchor": "my_anchor", + "type": "null" + } + } + }, + "anyOf": [ + { "$ref": "#/$defs/anchor_in_enum" }, + { "$ref": "#my_anchor" } + ] + }, + "tests": [ + { + "description": "exact match to enum, and type matches", + "data": { + "$anchor": "my_anchor", + "type": "null" + }, + "valid": true + }, + { + "description": "in implementations that strip $anchor, this may match either $def", + "data": { + "type": "null" + }, + "valid": false + }, + { + "description": "match $ref to $anchor", + "data": "a string to match #/$defs/anchor_in_enum", + "valid": true + }, + { + "description": "no match on enum or $ref to $anchor", + "data": 1, + "valid": false + } + ] + } +] diff --git a/tests/draft2020-12/optional/id.json b/tests/draft2020-12/optional/id.json new file mode 100644 index 0000000..0b7df4e --- /dev/null +++ b/tests/draft2020-12/optional/id.json @@ -0,0 +1,53 @@ +[ + { + "description": "$id inside an enum is not a real identifier", + "comment": "the implementation must not be confused by an $id buried in the enum", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$defs": { + "id_in_enum": { + "enum": [ + { + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", + "type": "null" + } + ] + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", + "type": "string" + }, + "zzz_id_in_const": { + "const": { + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", + "type": "null" + } + } + }, + "anyOf": [ + { "$ref": "#/$defs/id_in_enum" }, + { "$ref": "https://localhost:1234/draft2020-12/id/my_identifier.json" } + ] + }, + "tests": [ + { + "description": "exact match to enum, and type matches", + "data": { + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", + "type": "null" + }, + "valid": true + }, + { + "description": "match $ref to $id", + "data": "a string to match #/$defs/id_in_enum", + "valid": true + }, + { + "description": "no match on enum or $ref to $id", + "data": 1, + "valid": false + } + ] + } +] diff --git a/tests/draft2020-12/unknownKeyword.json b/tests/draft2020-12/optional/unknownKeyword.json similarity index 100% rename from tests/draft2020-12/unknownKeyword.json rename to tests/draft2020-12/optional/unknownKeyword.json diff --git a/tests/draft2020-12/unevaluatedItems.json b/tests/draft2020-12/unevaluatedItems.json index ddc35da..ee0cb65 100644 --- a/tests/draft2020-12/unevaluatedItems.json +++ b/tests/draft2020-12/unevaluatedItems.json @@ -461,13 +461,44 @@ } ] }, + { + "description": "unevaluatedItems before $ref", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "unevaluatedItems": false, + "prefixItems": [ + { "type": "string" } + ], + "$ref": "#/$defs/bar", + "$defs": { + "bar": { + "prefixItems": [ + true, + { "type": "string" } + ] + } + } + }, + "tests": [ + { + "description": "with no unevaluated items", + "data": ["foo", "bar"], + "valid": true + }, + { + "description": "with unevaluated items", + "data": ["foo", "bar", "baz"], + "valid": false + } + ] + }, { "description": "unevaluatedItems with $dynamicRef", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/derived", + "$id": "https://example.com/unevaluated-items-with-dynamic-ref/derived", - "$ref": "/baseSchema", + "$ref": "./baseSchema", "$defs": { "derived": { @@ -478,7 +509,7 @@ ] }, "baseSchema": { - "$id": "/baseSchema", + "$id": "./baseSchema", "$comment": "unevaluatedItems comes first so it's more likely to catch bugs with implementations that are sensitive to keyword ordering", "unevaluatedItems": false, diff --git a/tests/draft2020-12/unevaluatedProperties.json b/tests/draft2020-12/unevaluatedProperties.json index 023e84a..b8a2306 100644 --- a/tests/draft2020-12/unevaluatedProperties.json +++ b/tests/draft2020-12/unevaluatedProperties.json @@ -715,13 +715,51 @@ } ] }, + { + "description": "unevaluatedProperties before $ref", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "unevaluatedProperties": false, + "properties": { + "foo": { "type": "string" } + }, + "$ref": "#/$defs/bar", + "$defs": { + "bar": { + "properties": { + "bar": { "type": "string" } + } + } + } + }, + "tests": [ + { + "description": "with no unevaluated properties", + "data": { + "foo": "foo", + "bar": "bar" + }, + "valid": true + }, + { + "description": "with unevaluated properties", + "data": { + "foo": "foo", + "bar": "bar", + "baz": "baz" + }, + "valid": false + } + ] + }, { "description": "unevaluatedProperties with $dynamicRef", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/derived", + "$id": "https://example.com/unevaluated-properties-with-dynamic-ref/derived", - "$ref": "/baseSchema", + "$ref": "./baseSchema", "$defs": { "derived": { @@ -731,7 +769,7 @@ } }, "baseSchema": { - "$id": "/baseSchema", + "$id": "./baseSchema", "$comment": "unevaluatedProperties comes first so it's more likely to catch bugs with implementations that are sensitive to keyword ordering", "unevaluatedProperties": false, diff --git a/tests/draft3/maxLength.json b/tests/draft3/maxLength.json index 4de42bc..b0a9ea5 100644 --- a/tests/draft3/maxLength.json +++ b/tests/draft3/maxLength.json @@ -24,7 +24,7 @@ "valid": true }, { - "description": "two supplementary Unicode code points is long enough", + "description": "two graphemes is long enough", "data": "\uD83D\uDCA9\uD83D\uDCA9", "valid": true } diff --git a/tests/draft3/minLength.json b/tests/draft3/minLength.json index 3f09158..6652c75 100644 --- a/tests/draft3/minLength.json +++ b/tests/draft3/minLength.json @@ -24,7 +24,7 @@ "valid": true }, { - "description": "one supplementary Unicode code point is not long enough", + "description": "one grapheme is not long enough", "data": "\uD83D\uDCA9", "valid": false } diff --git a/tests/draft4/enum.json b/tests/draft4/enum.json index f085097..ce43acc 100644 --- a/tests/draft4/enum.json +++ b/tests/draft4/enum.json @@ -154,6 +154,27 @@ } ] }, + { + "description": "enum with [false] does not match [0]", + "schema": {"enum": [[false]]}, + "tests": [ + { + "description": "[false] is valid", + "data": [false], + "valid": true + }, + { + "description": "[0] is invalid", + "data": [0], + "valid": false + }, + { + "description": "[0.0] is invalid", + "data": [0.0], + "valid": false + } + ] + }, { "description": "enum with true does not match 1", "schema": {"enum": [true]}, @@ -175,6 +196,27 @@ } ] }, + { + "description": "enum with [true] does not match [1]", + "schema": {"enum": [[true]]}, + "tests": [ + { + "description": "[true] is valid", + "data": [true], + "valid": true + }, + { + "description": "[1] is invalid", + "data": [1], + "valid": false + }, + { + "description": "[1.0] is invalid", + "data": [1.0], + "valid": false + } + ] + }, { "description": "enum with 0 does not match false", "schema": {"enum": [0]}, @@ -196,6 +238,27 @@ } ] }, + { + "description": "enum with [0] does not match [false]", + "schema": {"enum": [[0]]}, + "tests": [ + { + "description": "[false] is invalid", + "data": [false], + "valid": false + }, + { + "description": "[0] is valid", + "data": [0], + "valid": true + }, + { + "description": "[0.0] is valid", + "data": [0.0], + "valid": true + } + ] + }, { "description": "enum with 1 does not match true", "schema": {"enum": [1]}, @@ -217,6 +280,27 @@ } ] }, + { + "description": "enum with [1] does not match [true]", + "schema": {"enum": [[1]]}, + "tests": [ + { + "description": "[true] is invalid", + "data": [true], + "valid": false + }, + { + "description": "[1] is valid", + "data": [1], + "valid": true + }, + { + "description": "[1.0] is valid", + "data": [1.0], + "valid": true + } + ] + }, { "description": "nul characters in strings", "schema": { "enum": [ "hello\u0000there" ] }, diff --git a/tests/draft4/maxLength.json b/tests/draft4/maxLength.json index 811d35b..3387959 100644 --- a/tests/draft4/maxLength.json +++ b/tests/draft4/maxLength.json @@ -24,7 +24,7 @@ "valid": true }, { - "description": "two supplementary Unicode code points is long enough", + "description": "two graphemes is long enough", "data": "\uD83D\uDCA9\uD83D\uDCA9", "valid": true } diff --git a/tests/draft4/minLength.json b/tests/draft4/minLength.json index 3f09158..6652c75 100644 --- a/tests/draft4/minLength.json +++ b/tests/draft4/minLength.json @@ -24,7 +24,7 @@ "valid": true }, { - "description": "one supplementary Unicode code point is not long enough", + "description": "one grapheme is not long enough", "data": "\uD83D\uDCA9", "valid": false } diff --git a/tests/draft4/not.json b/tests/draft4/not.json index cbb7f46..525219c 100644 --- a/tests/draft4/not.json +++ b/tests/draft4/not.json @@ -91,6 +91,67 @@ "valid": true } ] + }, + { + "description": "forbid everything with empty schema", + "schema": { "not": {} }, + "tests": [ + { + "description": "number is invalid", + "data": 1, + "valid": false + }, + { + "description": "string is invalid", + "data": "foo", + "valid": false + }, + { + "description": "boolean true is invalid", + "data": true, + "valid": false + }, + { + "description": "boolean false is invalid", + "data": false, + "valid": false + }, + { + "description": "null is invalid", + "data": null, + "valid": false + }, + { + "description": "object is invalid", + "data": {"foo": "bar"}, + "valid": false + }, + { + "description": "empty object is invalid", + "data": {}, + "valid": false + }, + { + "description": "array is invalid", + "data": ["foo"], + "valid": false + }, + { + "description": "empty array is invalid", + "data": [], + "valid": false + } + ] + }, + { + "description": "double negation", + "schema": { "not": { "not": {} } }, + "tests": [ + { + "description": "any value is valid", + "data": "foo", + "valid": true + } + ] } - ] diff --git a/tests/draft4/id.json b/tests/draft4/optional/id.json similarity index 100% rename from tests/draft4/id.json rename to tests/draft4/optional/id.json diff --git a/tests/draft6/enum.json b/tests/draft6/enum.json index f085097..ce43acc 100644 --- a/tests/draft6/enum.json +++ b/tests/draft6/enum.json @@ -154,6 +154,27 @@ } ] }, + { + "description": "enum with [false] does not match [0]", + "schema": {"enum": [[false]]}, + "tests": [ + { + "description": "[false] is valid", + "data": [false], + "valid": true + }, + { + "description": "[0] is invalid", + "data": [0], + "valid": false + }, + { + "description": "[0.0] is invalid", + "data": [0.0], + "valid": false + } + ] + }, { "description": "enum with true does not match 1", "schema": {"enum": [true]}, @@ -175,6 +196,27 @@ } ] }, + { + "description": "enum with [true] does not match [1]", + "schema": {"enum": [[true]]}, + "tests": [ + { + "description": "[true] is valid", + "data": [true], + "valid": true + }, + { + "description": "[1] is invalid", + "data": [1], + "valid": false + }, + { + "description": "[1.0] is invalid", + "data": [1.0], + "valid": false + } + ] + }, { "description": "enum with 0 does not match false", "schema": {"enum": [0]}, @@ -196,6 +238,27 @@ } ] }, + { + "description": "enum with [0] does not match [false]", + "schema": {"enum": [[0]]}, + "tests": [ + { + "description": "[false] is invalid", + "data": [false], + "valid": false + }, + { + "description": "[0] is valid", + "data": [0], + "valid": true + }, + { + "description": "[0.0] is valid", + "data": [0.0], + "valid": true + } + ] + }, { "description": "enum with 1 does not match true", "schema": {"enum": [1]}, @@ -217,6 +280,27 @@ } ] }, + { + "description": "enum with [1] does not match [true]", + "schema": {"enum": [[1]]}, + "tests": [ + { + "description": "[true] is invalid", + "data": [true], + "valid": false + }, + { + "description": "[1] is valid", + "data": [1], + "valid": true + }, + { + "description": "[1.0] is valid", + "data": [1.0], + "valid": true + } + ] + }, { "description": "nul characters in strings", "schema": { "enum": [ "hello\u0000there" ] }, diff --git a/tests/draft6/maxLength.json b/tests/draft6/maxLength.json index 748b4da..be60c54 100644 --- a/tests/draft6/maxLength.json +++ b/tests/draft6/maxLength.json @@ -24,7 +24,7 @@ "valid": true }, { - "description": "two supplementary Unicode code points is long enough", + "description": "two graphemes is long enough", "data": "\uD83D\uDCA9\uD83D\uDCA9", "valid": true } diff --git a/tests/draft6/minLength.json b/tests/draft6/minLength.json index 64db948..23c68fe 100644 --- a/tests/draft6/minLength.json +++ b/tests/draft6/minLength.json @@ -24,7 +24,7 @@ "valid": true }, { - "description": "one supplementary Unicode code point is not long enough", + "description": "one grapheme is not long enough", "data": "\uD83D\uDCA9", "valid": false } diff --git a/tests/draft6/not.json b/tests/draft6/not.json index 98de0ed..b46c4ed 100644 --- a/tests/draft6/not.json +++ b/tests/draft6/not.json @@ -93,19 +93,161 @@ ] }, { - "description": "not with boolean schema true", - "schema": {"not": true}, + "description": "forbid everything with empty schema", + "schema": { "not": {} }, "tests": [ { - "description": "any value is invalid", + "description": "number is invalid", + "data": 1, + "valid": false + }, + { + "description": "string is invalid", "data": "foo", "valid": false + }, + { + "description": "boolean true is invalid", + "data": true, + "valid": false + }, + { + "description": "boolean false is invalid", + "data": false, + "valid": false + }, + { + "description": "null is invalid", + "data": null, + "valid": false + }, + { + "description": "object is invalid", + "data": {"foo": "bar"}, + "valid": false + }, + { + "description": "empty object is invalid", + "data": {}, + "valid": false + }, + { + "description": "array is invalid", + "data": ["foo"], + "valid": false + }, + { + "description": "empty array is invalid", + "data": [], + "valid": false + } + ] + }, + { + "description": "forbid everything with boolean schema true", + "schema": { "not": true }, + "tests": [ + { + "description": "number is invalid", + "data": 1, + "valid": false + }, + { + "description": "string is invalid", + "data": "foo", + "valid": false + }, + { + "description": "boolean true is invalid", + "data": true, + "valid": false + }, + { + "description": "boolean false is invalid", + "data": false, + "valid": false + }, + { + "description": "null is invalid", + "data": null, + "valid": false + }, + { + "description": "object is invalid", + "data": {"foo": "bar"}, + "valid": false + }, + { + "description": "empty object is invalid", + "data": {}, + "valid": false + }, + { + "description": "array is invalid", + "data": ["foo"], + "valid": false + }, + { + "description": "empty array is invalid", + "data": [], + "valid": false + } + ] + }, + { + "description": "allow everything with boolean schema false", + "schema": { "not": false }, + "tests": [ + { + "description": "number is valid", + "data": 1, + "valid": true + }, + { + "description": "string is valid", + "data": "foo", + "valid": true + }, + { + "description": "boolean true is valid", + "data": true, + "valid": true + }, + { + "description": "boolean false is valid", + "data": false, + "valid": true + }, + { + "description": "null is valid", + "data": null, + "valid": true + }, + { + "description": "object is valid", + "data": {"foo": "bar"}, + "valid": true + }, + { + "description": "empty object is valid", + "data": {}, + "valid": true + }, + { + "description": "array is valid", + "data": ["foo"], + "valid": true + }, + { + "description": "empty array is valid", + "data": [], + "valid": true } ] }, { - "description": "not with boolean schema false", - "schema": {"not": false}, + "description": "double negation", + "schema": { "not": { "not": {} } }, "tests": [ { "description": "any value is valid", diff --git a/tests/draft6/id.json b/tests/draft6/optional/id.json similarity index 100% rename from tests/draft6/id.json rename to tests/draft6/optional/id.json diff --git a/tests/draft6/unknownKeyword.json b/tests/draft6/optional/unknownKeyword.json similarity index 100% rename from tests/draft6/unknownKeyword.json rename to tests/draft6/optional/unknownKeyword.json diff --git a/tests/draft7/enum.json b/tests/draft7/enum.json index f085097..ce43acc 100644 --- a/tests/draft7/enum.json +++ b/tests/draft7/enum.json @@ -154,6 +154,27 @@ } ] }, + { + "description": "enum with [false] does not match [0]", + "schema": {"enum": [[false]]}, + "tests": [ + { + "description": "[false] is valid", + "data": [false], + "valid": true + }, + { + "description": "[0] is invalid", + "data": [0], + "valid": false + }, + { + "description": "[0.0] is invalid", + "data": [0.0], + "valid": false + } + ] + }, { "description": "enum with true does not match 1", "schema": {"enum": [true]}, @@ -175,6 +196,27 @@ } ] }, + { + "description": "enum with [true] does not match [1]", + "schema": {"enum": [[true]]}, + "tests": [ + { + "description": "[true] is valid", + "data": [true], + "valid": true + }, + { + "description": "[1] is invalid", + "data": [1], + "valid": false + }, + { + "description": "[1.0] is invalid", + "data": [1.0], + "valid": false + } + ] + }, { "description": "enum with 0 does not match false", "schema": {"enum": [0]}, @@ -196,6 +238,27 @@ } ] }, + { + "description": "enum with [0] does not match [false]", + "schema": {"enum": [[0]]}, + "tests": [ + { + "description": "[false] is invalid", + "data": [false], + "valid": false + }, + { + "description": "[0] is valid", + "data": [0], + "valid": true + }, + { + "description": "[0.0] is valid", + "data": [0.0], + "valid": true + } + ] + }, { "description": "enum with 1 does not match true", "schema": {"enum": [1]}, @@ -217,6 +280,27 @@ } ] }, + { + "description": "enum with [1] does not match [true]", + "schema": {"enum": [[1]]}, + "tests": [ + { + "description": "[true] is invalid", + "data": [true], + "valid": false + }, + { + "description": "[1] is valid", + "data": [1], + "valid": true + }, + { + "description": "[1.0] is valid", + "data": [1.0], + "valid": true + } + ] + }, { "description": "nul characters in strings", "schema": { "enum": [ "hello\u0000there" ] }, diff --git a/tests/draft7/maxLength.json b/tests/draft7/maxLength.json index 748b4da..be60c54 100644 --- a/tests/draft7/maxLength.json +++ b/tests/draft7/maxLength.json @@ -24,7 +24,7 @@ "valid": true }, { - "description": "two supplementary Unicode code points is long enough", + "description": "two graphemes is long enough", "data": "\uD83D\uDCA9\uD83D\uDCA9", "valid": true } diff --git a/tests/draft7/minLength.json b/tests/draft7/minLength.json index 64db948..23c68fe 100644 --- a/tests/draft7/minLength.json +++ b/tests/draft7/minLength.json @@ -24,7 +24,7 @@ "valid": true }, { - "description": "one supplementary Unicode code point is not long enough", + "description": "one grapheme is not long enough", "data": "\uD83D\uDCA9", "valid": false } diff --git a/tests/draft7/not.json b/tests/draft7/not.json index 98de0ed..b46c4ed 100644 --- a/tests/draft7/not.json +++ b/tests/draft7/not.json @@ -93,19 +93,161 @@ ] }, { - "description": "not with boolean schema true", - "schema": {"not": true}, + "description": "forbid everything with empty schema", + "schema": { "not": {} }, "tests": [ { - "description": "any value is invalid", + "description": "number is invalid", + "data": 1, + "valid": false + }, + { + "description": "string is invalid", "data": "foo", "valid": false + }, + { + "description": "boolean true is invalid", + "data": true, + "valid": false + }, + { + "description": "boolean false is invalid", + "data": false, + "valid": false + }, + { + "description": "null is invalid", + "data": null, + "valid": false + }, + { + "description": "object is invalid", + "data": {"foo": "bar"}, + "valid": false + }, + { + "description": "empty object is invalid", + "data": {}, + "valid": false + }, + { + "description": "array is invalid", + "data": ["foo"], + "valid": false + }, + { + "description": "empty array is invalid", + "data": [], + "valid": false + } + ] + }, + { + "description": "forbid everything with boolean schema true", + "schema": { "not": true }, + "tests": [ + { + "description": "number is invalid", + "data": 1, + "valid": false + }, + { + "description": "string is invalid", + "data": "foo", + "valid": false + }, + { + "description": "boolean true is invalid", + "data": true, + "valid": false + }, + { + "description": "boolean false is invalid", + "data": false, + "valid": false + }, + { + "description": "null is invalid", + "data": null, + "valid": false + }, + { + "description": "object is invalid", + "data": {"foo": "bar"}, + "valid": false + }, + { + "description": "empty object is invalid", + "data": {}, + "valid": false + }, + { + "description": "array is invalid", + "data": ["foo"], + "valid": false + }, + { + "description": "empty array is invalid", + "data": [], + "valid": false + } + ] + }, + { + "description": "allow everything with boolean schema false", + "schema": { "not": false }, + "tests": [ + { + "description": "number is valid", + "data": 1, + "valid": true + }, + { + "description": "string is valid", + "data": "foo", + "valid": true + }, + { + "description": "boolean true is valid", + "data": true, + "valid": true + }, + { + "description": "boolean false is valid", + "data": false, + "valid": true + }, + { + "description": "null is valid", + "data": null, + "valid": true + }, + { + "description": "object is valid", + "data": {"foo": "bar"}, + "valid": true + }, + { + "description": "empty object is valid", + "data": {}, + "valid": true + }, + { + "description": "array is valid", + "data": ["foo"], + "valid": true + }, + { + "description": "empty array is valid", + "data": [], + "valid": true } ] }, { - "description": "not with boolean schema false", - "schema": {"not": false}, + "description": "double negation", + "schema": { "not": { "not": {} } }, "tests": [ { "description": "any value is valid", diff --git a/tests/draft7/id.json b/tests/draft7/optional/id.json similarity index 100% rename from tests/draft7/id.json rename to tests/draft7/optional/id.json diff --git a/tests/draft7/unknownKeyword.json b/tests/draft7/optional/unknownKeyword.json similarity index 100% rename from tests/draft7/unknownKeyword.json rename to tests/draft7/optional/unknownKeyword.json From 580742d20f0a37fca10f785b8615cc432d19afe6 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Sat, 2 Mar 2024 10:38:46 -0800 Subject: [PATCH 30/32] Update JSON-Schema-Test-Suite fixtures --- test/fixtures/draft2019-09.json | 20833 +++++++++++++++--------------- test/fixtures/draft2020-12.json | 6932 +++++----- test/fixtures/draft4.json | 520 +- test/fixtures/draft6.json | 8289 ++++++------ test/fixtures/draft7.json | 3747 +++--- 5 files changed, 21329 insertions(+), 18992 deletions(-) diff --git a/test/fixtures/draft2019-09.json b/test/fixtures/draft2019-09.json index c26481e..86bcff8 100644 --- a/test/fixtures/draft2019-09.json +++ b/test/fixtures/draft2019-09.json @@ -1457,194 +1457,6 @@ [ [ - ], - [ - { - "data": { - "type": "null" - }, - "data_pointer": "", - "schema": { - "enum": [ - { - "$anchor": "my_anchor", - "type": "null" - } - ] - }, - "schema_pointer": "/$defs/anchor_in_enum", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "anchor_in_enum": { - "enum": [ - { - "$anchor": "my_anchor", - "type": "null" - } - ] - }, - "real_identifier_in_schema": { - "$anchor": "my_anchor", - "type": "string" - }, - "zzz_anchor_in_const": { - "const": { - "$anchor": "my_anchor", - "type": "null" - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/anchor_in_enum" - }, - { - "$ref": "#my_anchor" - } - ] - }, - "type": "enum" - }, - { - "data": { - "type": "null" - }, - "data_pointer": "", - "schema": { - "$anchor": "my_anchor", - "type": "string" - }, - "schema_pointer": "/$defs/real_identifier_in_schema", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "anchor_in_enum": { - "enum": [ - { - "$anchor": "my_anchor", - "type": "null" - } - ] - }, - "real_identifier_in_schema": { - "$anchor": "my_anchor", - "type": "string" - }, - "zzz_anchor_in_const": { - "const": { - "$anchor": "my_anchor", - "type": "null" - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/anchor_in_enum" - }, - { - "$ref": "#my_anchor" - } - ] - }, - "type": "string" - } - ], - [ - - ], - [ - { - "data": 1, - "data_pointer": "", - "schema": { - "enum": [ - { - "$anchor": "my_anchor", - "type": "null" - } - ] - }, - "schema_pointer": "/$defs/anchor_in_enum", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "anchor_in_enum": { - "enum": [ - { - "$anchor": "my_anchor", - "type": "null" - } - ] - }, - "real_identifier_in_schema": { - "$anchor": "my_anchor", - "type": "string" - }, - "zzz_anchor_in_const": { - "const": { - "$anchor": "my_anchor", - "type": "null" - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/anchor_in_enum" - }, - { - "$ref": "#my_anchor" - } - ] - }, - "type": "enum" - }, - { - "data": 1, - "data_pointer": "", - "schema": { - "$anchor": "my_anchor", - "type": "string" - }, - "schema_pointer": "/$defs/real_identifier_in_schema", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "anchor_in_enum": { - "enum": [ - { - "$anchor": "my_anchor", - "type": "null" - } - ] - }, - "real_identifier_in_schema": { - "$anchor": "my_anchor", - "type": "string" - }, - "zzz_anchor_in_const": { - "const": { - "$anchor": "my_anchor", - "type": "null" - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/anchor_in_enum" - }, - { - "$ref": "#my_anchor" - } - ] - }, - "type": "string" - } - ] - ], - [ - [ - ], [ { @@ -1680,41 +1492,6 @@ } ] ], - [ - [ - - ], - [ - { - "data": 1, - "data_pointer": "", - "schema": { - "const": { - "$anchor": "not_a_real_anchor" - } - }, - "schema_pointer": "/$defs/const_not_anchor", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "const_not_anchor": { - "const": { - "$anchor": "not_a_real_anchor" - } - } - }, - "if": { - "const": "skip not_a_real_anchor" - }, - "then": true, - "else": { - "$ref": "#/$defs/const_not_anchor" - } - }, - "type": "const" - } - ] - ], [ [ { @@ -4737,19 +4514,25 @@ ], [ { - "data": 1, + "data": [ + 0 + ], "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "enum": [ - true + [ + false + ] ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "enum": [ - true + [ + false + ] ] }, "type": "enum" @@ -4757,19 +4540,25 @@ ], [ { - "data": 1.0, + "data": [ + 0.0 + ], "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "enum": [ - true + [ + false + ] ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "enum": [ - true + [ + false + ] ] }, "type": "enum" @@ -4777,42 +4566,178 @@ ] ], [ + [ + + ], [ { - "data": false, + "data": 1, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "enum": [ - 0 + true ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "enum": [ - 0 + true ] }, "type": "enum" } ], - [ - - ], - [ - - ] - ], - [ [ { - "data": true, + "data": 1.0, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "enum": [ - 1 + true + ] + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [ + true + ] + }, + "type": "enum" + } + ] + ], + [ + [ + + ], + [ + { + "data": [ + 1 + ], + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [ + [ + true + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [ + [ + true + ] + ] + }, + "type": "enum" + } + ], + [ + { + "data": [ + 1.0 + ], + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [ + [ + true + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [ + [ + true + ] + ] + }, + "type": "enum" + } + ] + ], + [ + [ + { + "data": false, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [ + 0 + ] + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [ + 0 + ] + }, + "type": "enum" + } + ], + [ + + ], + [ + + ] + ], + [ + [ + { + "data": [ + false + ], + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [ + [ + 0 + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [ + [ + 0 + ] + ] + }, + "type": "enum" + } + ], + [ + + ], + [ + + ] + ], + [ + [ + { + "data": true, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [ + 1 ] }, "schema_pointer": "", @@ -4832,6 +4757,40 @@ ] ], + [ + [ + { + "data": [ + true + ], + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [ + [ + 1 + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "enum": [ + [ + 1 + ] + ] + }, + "type": "enum" + } + ], + [ + + ], + [ + + ] + ], [ [ @@ -5858,6 +5817,24 @@ ], [ + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/if-then-else.json": [ + [ + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + ] ], [ @@ -5866,198 +5843,49 @@ ], [ + ] + ], + [ + [ + ], [ { - "data": 1, + "data": -100, "data_pointer": "", "schema": { - "enum": [ - { - "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", - "type": "null" - } - ] + "minimum": -10 }, - "schema_pointer": "/$defs/id_in_enum", + "schema_pointer": "/then", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "id_in_enum": { - "enum": [ - { - "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", - "type": "null" - } - ] - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", - "type": "string" - }, - "zzz_id_in_const": { - "const": { - "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", - "type": "null" - } - } + "if": { + "exclusiveMaximum": 0 }, - "anyOf": [ - { - "$ref": "#/$defs/id_in_enum" - }, - { - "$ref": "https://localhost:1234/draft2019-09/id/my_identifier.json" - } - ] + "then": { + "minimum": -10 + } }, - "type": "enum" - }, + "type": "minimum" + } + ], + [ + + ] + ], + [ + [ + + ], + [ + + ], + [ { - "data": 1, + "data": 3, "data_pointer": "", "schema": { - "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", - "type": "string" - }, - "schema_pointer": "/$defs/real_id_in_schema", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "id_in_enum": { - "enum": [ - { - "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", - "type": "null" - } - ] - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", - "type": "string" - }, - "zzz_id_in_const": { - "const": { - "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", - "type": "null" - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/id_in_enum" - }, - { - "$ref": "https://localhost:1234/draft2019-09/id/my_identifier.json" - } - ] - }, - "type": "string" - } - ] - ], - [ - [ - - ], - [ - { - "data": 1, - "data_pointer": "", - "schema": { - "const": { - "$id": "not_a_real_id" - } - }, - "schema_pointer": "/$defs/const_not_id", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "const_not_id": { - "const": { - "$id": "not_a_real_id" - } - } - }, - "if": { - "const": "skip not_a_real_id" - }, - "then": true, - "else": { - "$ref": "#/$defs/const_not_id" - } - }, - "type": "const" - } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/if-then-else.json": [ - [ - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - { - "data": -100, - "data_pointer": "", - "schema": { - "minimum": -10 - }, - "schema_pointer": "/then", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "if": { - "exclusiveMaximum": 0 - }, - "then": { - "minimum": -10 - } - }, - "type": "minimum" - } - ], - [ - - ] - ], - [ - [ - - ], - [ - - ], - [ - { - "data": 3, - "data_pointer": "", - "schema": { - "multipleOf": 2 + "multipleOf": 2 }, "schema_pointer": "/else", "root_schema": { @@ -8570,512 +8398,427 @@ [ [ { - "data": "foo", + "data": 1, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "not": true + "not": { + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "not": true + "not": { + } }, "type": "not" } - ] - ], - [ - [ - - ] - ], - [ - [ - ], [ { - "data": { - "foo": 1 - }, + "data": "foo", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "not": { - "$comment": "this subschema must still produce annotations internally, even though the 'not' will ultimately discard them", - "anyOf": [ - true, - { - "properties": { - "foo": true - } - } - ], - "unevaluatedProperties": false } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "not": { - "$comment": "this subschema must still produce annotations internally, even though the 'not' will ultimately discard them", - "anyOf": [ - true, - { - "properties": { - "foo": true - } - } - ], - "unevaluatedProperties": false } }, "type": "not" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/oneOf.json": [ - [ - [ - - ], - [ - ], [ { - "data": 3, + "data": true, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, - "type": "oneOf" + "type": "not" } ], [ { - "data": 1.5, + "data": false, "data_pointer": "", "schema": { - "type": "integer" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "not": { + } }, - "schema_pointer": "/oneOf/0", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, - "type": "integer" - }, + "type": "not" + } + ], + [ { - "data": 1.5, + "data": null, "data_pointer": "", "schema": { - "minimum": 2 + "$schema": "https://json-schema.org/draft/2019-09/schema", + "not": { + } }, - "schema_pointer": "/oneOf/1", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, - "type": "minimum" + "type": "not" } - ] - ], - [ + ], [ { - "data": 3, + "data": { + "foo": "bar" + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, - "type": "oneOf" - }, + "type": "not" + } + ], + [ { - "data": 3, + "data": { + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, - "type": "string" + "type": "not" } - ], - [ - ], [ { - "data": "foo", + "data": [ + "foo" + ], "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, - "type": "oneOf" + "type": "not" } - ] - ], - [ + ], [ { - "data": "foo", + "data": [ + + ], "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "oneOf": [ - true, - true, - true - ] + "not": { + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "oneOf": [ - true, - true, - true - ] + "not": { + } }, - "type": "oneOf" + "type": "not" } ] ], - [ - [ - - ] - ], [ [ { - "data": "foo", + "data": 1, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "oneOf": [ - true, - true, - false - ] + "not": true }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "oneOf": [ - true, - true, - false - ] + "not": true }, - "type": "oneOf" + "type": "not" } - ] - ], - [ + ], [ { "data": "foo", "data_pointer": "", - "schema": false, - "schema_pointer": "/oneOf/0", - "root_schema": { + "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "oneOf": [ - false, - false, - false - ] + "not": true }, - "type": "schema" - }, - { - "data": "foo", - "data_pointer": "", - "schema": false, - "schema_pointer": "/oneOf/1", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "oneOf": [ - false, - false, - false - ] + "not": true }, - "type": "schema" - }, + "type": "not" + } + ], + [ { - "data": "foo", + "data": true, "data_pointer": "", - "schema": false, - "schema_pointer": "/oneOf/2", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "not": true + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "oneOf": [ - false, - false, - false - ] + "not": true }, - "type": "schema" + "type": "not" } - ] - ], - [ - [ - - ], - [ - ], [ { - "data": { - "foo": "baz", - "bar": 2 - }, + "data": false, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "oneOf": [ - { - "properties": { - "bar": { - "type": "integer" - } - }, - "required": [ - "bar" - ] - }, - { - "properties": { - "foo": { - "type": "string" - } - }, - "required": [ - "foo" - ] - } - ] + "not": true }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "oneOf": [ - { - "properties": { - "bar": { - "type": "integer" - } - }, - "required": [ - "bar" - ] - }, - { - "properties": { - "foo": { - "type": "string" - } - }, - "required": [ - "foo" - ] - } - ] + "not": true }, - "type": "oneOf" + "type": "not" } ], [ { - "data": "quux", - "data_pointer": "/bar", + "data": null, + "data_pointer": "", "schema": { - "type": "integer" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "not": true }, - "schema_pointer": "/oneOf/0/properties/bar", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "oneOf": [ - { - "properties": { - "bar": { - "type": "integer" - } - }, - "required": [ - "bar" - ] - }, - { - "properties": { - "foo": { - "type": "string" - } - }, - "required": [ - "foo" - ] - } - ] + "not": true }, - "type": "integer" - }, + "type": "not" + } + ], + [ { - "data": 2, - "data_pointer": "/foo", + "data": { + "foo": "bar" + }, + "data_pointer": "", "schema": { - "type": "string" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "not": true }, - "schema_pointer": "/oneOf/1/properties/foo", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "oneOf": [ - { - "properties": { - "bar": { - "type": "integer" + "not": true + }, + "type": "not" + } + ], + [ + { + "data": { + }, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "not": true + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "not": true + }, + "type": "not" + } + ], + [ + { + "data": [ + "foo" + ], + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "not": true + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "not": true + }, + "type": "not" + } + ], + [ + { + "data": [ + + ], + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "not": true + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "not": true + }, + "type": "not" + } + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ] + ], + [ + [ + + ], + [ + { + "data": { + "foo": 1 + }, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "not": { + "$comment": "this subschema must still produce annotations internally, even though the 'not' will ultimately discard them", + "anyOf": [ + true, + { + "properties": { + "foo": true } - }, - "required": [ - "bar" - ] - }, - { - "properties": { - "foo": { - "type": "string" + } + ], + "unevaluatedProperties": false + } + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "not": { + "$comment": "this subschema must still produce annotations internally, even though the 'not' will ultimately discard them", + "anyOf": [ + true, + { + "properties": { + "foo": true } - }, - "required": [ - "foo" - ] - } - ] + } + ], + "unevaluatedProperties": false + } }, - "type": "string" + "type": "not" } ] - ], + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/oneOf.json": [ [ [ + ], + [ + ], [ { - "data": 123, + "data": 3, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "oneOf": [ { - "type": "number" + "type": "integer" }, { + "minimum": 2 } ] }, @@ -9084,617 +8827,566 @@ "$schema": "https://json-schema.org/draft/2019-09/schema", "oneOf": [ { - "type": "number" + "type": "integer" }, { + "minimum": 2 } ] }, "type": "oneOf" } - ] - ], - [ + ], [ { - "data": { - "bar": 2 - }, + "data": 1.5, "data_pointer": "", "schema": { - "required": [ - "foo", - "bar" - ] + "type": "integer" }, "schema_pointer": "/oneOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "type": "integer" }, { - "required": [ - "foo", - "baz" - ] + "minimum": 2 } ] }, - "type": "required", - "details": { - "missing_keys": [ - "foo" - ] - } + "type": "integer" }, { - "data": { - "bar": 2 - }, + "data": 1.5, "data_pointer": "", "schema": { - "required": [ - "foo", - "baz" - ] + "minimum": 2 }, "schema_pointer": "/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "type": "integer" }, { - "required": [ - "foo", - "baz" - ] + "minimum": 2 } ] }, - "type": "required", - "details": { - "missing_keys": [ - "foo", - "baz" - ] - } + "type": "minimum" } - ], - [ - - ], - [ - - ], + ] + ], + [ [ { - "data": { - "foo": 1, - "bar": 2, - "baz": 3 - }, + "data": 3, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", + "type": "string", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "minLength": 2 }, { - "required": [ - "foo", - "baz" - ] + "maxLength": 4 } ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", + "type": "string", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "minLength": 2 }, { - "required": [ - "foo", - "baz" - ] + "maxLength": 4 } ] }, "type": "oneOf" - } - ] - ], - [ - [ - - ], - [ - - ], - [ + }, { - "data": { - "foo": "foo", - "bar": 8 - }, + "data": 3, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "string", "oneOf": [ { - "properties": { - "bar": true, - "baz": true - }, - "required": [ - "bar" - ] + "minLength": 2 }, { - "properties": { - "foo": true - }, - "required": [ - "foo" - ] + "maxLength": 4 } ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "string", "oneOf": [ { - "properties": { - "bar": true, - "baz": true - }, - "required": [ - "bar" - ] + "minLength": 2 }, { - "properties": { - "foo": true - }, - "required": [ - "foo" - ] + "maxLength": 4 } ] }, - "type": "oneOf" + "type": "string" } + ], + [ + ], [ { - "data": { - "baz": "quux" - }, + "data": "foo", "data_pointer": "", "schema": { - "properties": { - "bar": true, - "baz": true - }, - "required": [ - "bar" - ] - }, - "schema_pointer": "/oneOf/0", - "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "string", "oneOf": [ { - "properties": { - "bar": true, - "baz": true - }, - "required": [ - "bar" - ] + "minLength": 2 }, { - "properties": { - "foo": true - }, - "required": [ - "foo" - ] + "maxLength": 4 } ] }, - "type": "required", - "details": { - "missing_keys": [ - "bar" - ] - } - }, - { - "data": { - "baz": "quux" - }, - "data_pointer": "", - "schema": { - "properties": { - "foo": true - }, - "required": [ - "foo" - ] - }, - "schema_pointer": "/oneOf/1", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "string", "oneOf": [ { - "properties": { - "bar": true, - "baz": true - }, - "required": [ - "bar" - ] + "minLength": 2 }, { - "properties": { - "foo": true - }, - "required": [ - "foo" - ] + "maxLength": 4 } ] }, - "type": "required", - "details": { - "missing_keys": [ - "foo" - ] - } + "type": "oneOf" } ] ], [ - [ - - ], [ { - "data": 123, + "data": "foo", "data_pointer": "", "schema": { - "type": "null" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "oneOf": [ + true, + true, + true + ] }, - "schema_pointer": "/oneOf/0/oneOf/0", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "oneOf": [ - { - "oneOf": [ - { - "type": "null" - } - ] - } + true, + true, + true ] }, - "type": "null" + "type": "oneOf" } ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/bignum.json": [ - [ - [ - - ], - [ - - ] ], [ [ - ], - [ - ] ], [ [ { - "data": 98249283749234923498293171823948729348710298301928331, + "data": "foo", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string" + "oneOf": [ + true, + true, + false + ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string" + "oneOf": [ + true, + true, + false + ] }, - "type": "string" + "type": "oneOf" } ] ], - [ - [ - - ] - ], [ [ { - "data": 9.727837981879871e+26, + "data": "foo", "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "exclusiveMaximum": 9.727837981879871e+26 - }, - "schema_pointer": "", + "schema": false, + "schema_pointer": "/oneOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "exclusiveMaximum": 9.727837981879871e+26 + "oneOf": [ + false, + false, + false + ] }, - "type": "exclusiveMaximum" + "type": "schema" + }, + { + "data": "foo", + "data_pointer": "", + "schema": false, + "schema_pointer": "/oneOf/1", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "oneOf": [ + false, + false, + false + ] + }, + "type": "schema" + }, + { + "data": "foo", + "data_pointer": "", + "schema": false, + "schema_pointer": "/oneOf/2", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "oneOf": [ + false, + false, + false + ] + }, + "type": "schema" } ] ], [ [ - ] - ], - [ + ], + [ + + ], [ { - "data": -9.727837981879871e+26, + "data": { + "foo": "baz", + "bar": 2 + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "exclusiveMinimum": -9.727837981879871e+26 + "oneOf": [ + { + "properties": { + "bar": { + "type": "integer" + } + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ] + } + ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "exclusiveMinimum": -9.727837981879871e+26 + "oneOf": [ + { + "properties": { + "bar": { + "type": "integer" + } + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ] + } + ] }, - "type": "exclusiveMinimum" + "type": "oneOf" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/cross-draft.json": [ - [ + ], [ { - "data": 1, - "data_pointer": "/0", + "data": "quux", + "data_pointer": "/bar", + "schema": { + "type": "integer" + }, + "schema_pointer": "/oneOf/0/properties/bar", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "oneOf": [ + { + "properties": { + "bar": { + "type": "integer" + } + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ] + } + ] + }, + "type": "integer" + }, + { + "data": 2, + "data_pointer": "/foo", "schema": { "type": "string" }, - "schema_pointer": "/prefixItems/0", + "schema_pointer": "/oneOf/1/properties/foo", "root_schema": { - "$id": "http://localhost:1234/draft2020-12/prefixItems.json", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "prefixItems": [ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "oneOf": [ { - "type": "string" + "properties": { + "bar": { + "type": "integer" + } + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ] } ] }, "type": "string" } - ], - [ - ] ], [ [ - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/dependencies-compatibility.json": [ - [ - [ - - ], - [ - - ], - [ - ], [ { - "data": { - "bar": 2 - }, + "data": 123, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "bar": [ - "foo" - ] - } + "oneOf": [ + { + "type": "number" + }, + { + } + ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "bar": [ - "foo" - ] - } - }, - "type": "dependencies", - "details": { - "missing_keys": [ - "foo" + "oneOf": [ + { + "type": "number" + }, + { + } ] - } + }, + "type": "oneOf" } - ], - [ - - ], - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - - ], - [ - ] ], [ - [ - - ], - [ - - ], - [ - - ], [ { "data": { - "foo": 1, - "quux": 2 + "bar": 2 }, "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "quux": [ - "foo", - "bar" - ] - } + "required": [ + "foo", + "bar" + ] }, - "schema_pointer": "", + "schema_pointer": "/oneOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "quux": [ - "foo", - "bar" - ] - } + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } + ] }, - "type": "dependencies", + "type": "required", "details": { "missing_keys": [ - "bar" + "foo" ] } - } - ], - [ + }, { "data": { - "bar": 1, - "quux": 2 + "bar": 2 }, "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "quux": [ - "foo", - "bar" - ] - } + "required": [ + "foo", + "baz" + ] }, - "schema_pointer": "", + "schema_pointer": "/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "quux": [ - "foo", - "bar" - ] - } + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } + ] }, - "type": "dependencies", + "type": "required", "details": { "missing_keys": [ - "foo" + "foo", + "baz" ] } } + ], + [ + + ], + [ + ], [ { "data": { - "quux": 1 + "foo": 1, + "bar": 2, + "baz": 3 }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "quux": [ - "foo", - "bar" - ] - } + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } + ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "quux": [ - "foo", - "bar" - ] - } - }, - "type": "dependencies", - "details": { - "missing_keys": [ - "foo", - "bar" + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } ] - } + }, + "type": "oneOf" } ] ], @@ -9708,238 +9400,371 @@ [ { "data": { - "foo\nbar": 1, - "foo": 2 + "foo": "foo", + "bar": 8 }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "foo\nbar": [ - "foo\rbar" - ], - "foo\"bar": [ - "foo'bar" - ] - } + "oneOf": [ + { + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": true + }, + "required": [ + "foo" + ] + } + ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "foo\nbar": [ - "foo\rbar" - ], - "foo\"bar": [ - "foo'bar" - ] - } - }, - "type": "dependencies", - "details": { - "missing_keys": [ - "foo\rbar" + "oneOf": [ + { + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": true + }, + "required": [ + "foo" + ] + } ] - } + }, + "type": "oneOf" } ], [ { "data": { - "foo\"bar": 2 + "baz": "quux" }, "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "foo\nbar": [ - "foo\rbar" - ], - "foo\"bar": [ - "foo'bar" - ] - } + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] }, - "schema_pointer": "", + "schema_pointer": "/oneOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "foo\nbar": [ - "foo\rbar" - ], - "foo\"bar": [ - "foo'bar" - ] - } + "oneOf": [ + { + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": true + }, + "required": [ + "foo" + ] + } + ] }, - "type": "dependencies", + "type": "required", "details": { "missing_keys": [ - "foo'bar" + "bar" ] } - } - ] - ], - [ - [ - - ], - [ - - ], - [ + }, { - "data": "quux", - "data_pointer": "/foo", + "data": { + "baz": "quux" + }, + "data_pointer": "", "schema": { - "type": "integer" + "properties": { + "foo": true + }, + "required": [ + "foo" + ] }, - "schema_pointer": "/dependencies/bar/properties/foo", + "schema_pointer": "/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "bar": { + "oneOf": [ + { "properties": { - "foo": { - "type": "integer" - }, - "bar": { - "type": "integer" - } - } + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": true + }, + "required": [ + "foo" + ] } - } + ] }, - "type": "integer" + "type": "required", + "details": { + "missing_keys": [ + "foo" + ] + } } + ] + ], + [ + [ + ], [ { - "data": "quux", - "data_pointer": "/bar", + "data": 123, + "data_pointer": "", "schema": { - "type": "integer" + "type": "null" }, - "schema_pointer": "/dependencies/bar/properties/bar", + "schema_pointer": "/oneOf/0/oneOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "bar": { - "properties": { - "foo": { - "type": "integer" - }, - "bar": { - "type": "integer" + "oneOf": [ + { + "oneOf": [ + { + "type": "null" } - } + ] } - } + ] }, - "type": "integer" + "type": "null" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/anchor.json": [ + [ + [ + ], [ { - "data": "quux", - "data_pointer": "/foo", + "data": { + "type": "null" + }, + "data_pointer": "", "schema": { - "type": "integer" + "enum": [ + { + "$anchor": "my_anchor", + "type": "null" + } + ] }, - "schema_pointer": "/dependencies/bar/properties/foo", + "schema_pointer": "/$defs/anchor_in_enum", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "bar": { - "properties": { - "foo": { - "type": "integer" - }, - "bar": { - "type": "integer" + "$defs": { + "anchor_in_enum": { + "enum": [ + { + "$anchor": "my_anchor", + "type": "null" } + ] + }, + "real_identifier_in_schema": { + "$anchor": "my_anchor", + "type": "string" + }, + "zzz_anchor_in_const": { + "const": { + "$anchor": "my_anchor", + "type": "null" } } - } + }, + "anyOf": [ + { + "$ref": "#/$defs/anchor_in_enum" + }, + { + "$ref": "#my_anchor" + } + ] }, - "type": "integer" + "type": "enum" }, { - "data": "quux", - "data_pointer": "/bar", + "data": { + "type": "null" + }, + "data_pointer": "", "schema": { - "type": "integer" + "$anchor": "my_anchor", + "type": "string" }, - "schema_pointer": "/dependencies/bar/properties/bar", + "schema_pointer": "/$defs/real_identifier_in_schema", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "bar": { - "properties": { - "foo": { - "type": "integer" - }, - "bar": { - "type": "integer" + "$defs": { + "anchor_in_enum": { + "enum": [ + { + "$anchor": "my_anchor", + "type": "null" } + ] + }, + "real_identifier_in_schema": { + "$anchor": "my_anchor", + "type": "string" + }, + "zzz_anchor_in_const": { + "const": { + "$anchor": "my_anchor", + "type": "null" } } - } + }, + "anyOf": [ + { + "$ref": "#/$defs/anchor_in_enum" + }, + { + "$ref": "#my_anchor" + } + ] }, - "type": "integer" + "type": "string" } ], [ - ], - [ - - ], - [ - - ] - ], - [ - [ - ], [ { - "data": { - "bar": 2 - }, + "data": 1, "data_pointer": "", - "schema": false, - "schema_pointer": "/dependencies/bar", + "schema": { + "enum": [ + { + "$anchor": "my_anchor", + "type": "null" + } + ] + }, + "schema_pointer": "/$defs/anchor_in_enum", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "foo": true, - "bar": false - } + "$defs": { + "anchor_in_enum": { + "enum": [ + { + "$anchor": "my_anchor", + "type": "null" + } + ] + }, + "real_identifier_in_schema": { + "$anchor": "my_anchor", + "type": "string" + }, + "zzz_anchor_in_const": { + "const": { + "$anchor": "my_anchor", + "type": "null" + } + } + }, + "anyOf": [ + { + "$ref": "#/$defs/anchor_in_enum" + }, + { + "$ref": "#my_anchor" + } + ] }, - "type": "schema" - } - ], - [ + "type": "enum" + }, { - "data": { - "foo": 1, - "bar": 2 - }, + "data": 1, "data_pointer": "", - "schema": false, - "schema_pointer": "/dependencies/bar", + "schema": { + "$anchor": "my_anchor", + "type": "string" + }, + "schema_pointer": "/$defs/real_identifier_in_schema", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "foo": true, - "bar": false - } + "$defs": { + "anchor_in_enum": { + "enum": [ + { + "$anchor": "my_anchor", + "type": "null" + } + ] + }, + "real_identifier_in_schema": { + "$anchor": "my_anchor", + "type": "string" + }, + "zzz_anchor_in_const": { + "const": { + "$anchor": "my_anchor", + "type": "null" + } + } + }, + "anyOf": [ + { + "$ref": "#/$defs/anchor_in_enum" + }, + { + "$ref": "#my_anchor" + } + ] }, - "type": "schema" + "type": "string" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/bignum.json": [ + [ + [ + ], [ @@ -9950,122 +9775,28 @@ ], [ - { - "data": { - "foo'bar": { - "foo\"bar": 1 - } - }, - "data_pointer": "", - "schema": { - "required": [ - "foo\"bar" - ] - }, - "schema_pointer": "/dependencies/foo'bar", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "foo\tbar": { - "minProperties": 4 - }, - "foo'bar": { - "required": [ - "foo\"bar" - ] - } - } - }, - "type": "required", - "details": { - "missing_keys": [ - "foo\"bar" - ] - } - } - ], - [ - { - "data": { - "foo\tbar": 1, - "a": 2 - }, - "data_pointer": "", - "schema": { - "minProperties": 4 - }, - "schema_pointer": "/dependencies/foo\tbar", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "foo\tbar": { - "minProperties": 4 - }, - "foo'bar": { - "required": [ - "foo\"bar" - ] - } - } - }, - "type": "minProperties" - } - ], - [ - { - "data": { - "foo'bar": 1 - }, - "data_pointer": "", - "schema": { - "required": [ - "foo\"bar" - ] - }, - "schema_pointer": "/dependencies/foo'bar", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependencies": { - "foo\tbar": { - "minProperties": 4 - }, - "foo'bar": { - "required": [ - "foo\"bar" - ] - } - } - }, - "type": "required", - "details": { - "missing_keys": [ - "foo\"bar" - ] - } - } + ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/ecmascript-regex.json": [ + ], [ [ { - "data": "abc\\n", + "data": 98249283749234923498293171823948729348710298301928331, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^abc$" + "type": "string" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^abc$" + "type": "string" }, - "type": "pattern" + "type": "string" } - ], + ] + ], + [ [ ] @@ -10073,22 +9804,22 @@ [ [ { - "data": "\\t", + "data": 9.727837981879871e+26, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\t$" + "exclusiveMaximum": 9.727837981879871e+26 }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\t$" + "exclusiveMaximum": 9.727837981879871e+26 }, - "type": "pattern" + "type": "exclusiveMaximum" } - ], + ] + ], + [ [ ] @@ -10096,43 +9827,42 @@ [ [ { - "data": "\\cC", + "data": -9.727837981879871e+26, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\cC$" + "exclusiveMinimum": -9.727837981879871e+26 }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\cC$" + "exclusiveMinimum": -9.727837981879871e+26 }, - "type": "pattern" + "type": "exclusiveMinimum" } - ], - [ - ] - ], + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/cross-draft.json": [ [ [ { - "data": "\\cc", - "data_pointer": "", + "data": 1, + "data_pointer": "/0", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\cc$" + "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/prefixItems/0", "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\cc$" + "$id": "http://localhost:1234/draft2020-12/prefixItems.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "prefixItems": [ + { + "type": "string" + } + ] }, - "type": "pattern" + "type": "string" } ], [ @@ -10142,62 +9872,53 @@ [ [ + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/dependencies-compatibility.json": [ + [ + [ + + ], + [ + + ], + [ + ], [ { - "data": "߀", + "data": { + "bar": 2 + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\d$" + "dependencies": { + "bar": [ + "foo" + ] + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\d$" + "dependencies": { + "bar": [ + "foo" + ] + } }, - "type": "pattern" + "type": "dependencies", + "details": { + "missing_keys": [ + "foo" + ] + } } ], [ - { - "data": "߀", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\d$" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\d$" - }, - "type": "pattern" - } - ] - ], - [ - [ - { - "data": "0", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\D$" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\D$" - }, - "type": "pattern" - } + ], [ @@ -10211,42 +9932,7 @@ ], [ - { - "data": "é", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\w$" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\w$" - }, - "type": "pattern" - } - ] - ], - [ - [ - { - "data": "a", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\W$" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\W$" - }, - "type": "pattern" - } + ], [ @@ -10261,224 +9947,304 @@ ], [ - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ { - "data": "\u0001", + "data": { + "foo": 1, + "quux": 2 + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\s$" + "dependencies": { + "quux": [ + "foo", + "bar" + ] + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\s$" + "dependencies": { + "quux": [ + "foo", + "bar" + ] + } }, - "type": "pattern" + "type": "dependencies", + "details": { + "missing_keys": [ + "bar" + ] + } } ], [ { - "data": "–", + "data": { + "bar": 1, + "quux": 2 + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\s$" + "dependencies": { + "quux": [ + "foo", + "bar" + ] + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\s$" + "dependencies": { + "quux": [ + "foo", + "bar" + ] + } }, - "type": "pattern" + "type": "dependencies", + "details": { + "missing_keys": [ + "foo" + ] + } } - ] - ], - [ + ], [ { - "data": " ", + "data": { + "quux": 1 + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "quux": [ + "foo", + "bar" + ] + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "quux": [ + "foo", + "bar" + ] + } }, - "type": "pattern" + "type": "dependencies", + "details": { + "missing_keys": [ + "foo", + "bar" + ] + } } + ] + ], + [ + [ + + ], + [ + ], [ { - "data": "\t", + "data": { + "foo\nbar": 1, + "foo": 2 + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "foo\nbar": [ + "foo\rbar" + ], + "foo\"bar": [ + "foo'bar" + ] + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "foo\nbar": [ + "foo\rbar" + ], + "foo\"bar": [ + "foo'bar" + ] + } }, - "type": "pattern" + "type": "dependencies", + "details": { + "missing_keys": [ + "foo\rbar" + ] + } } ], [ { - "data": "\u000b", + "data": { + "foo\"bar": 2 + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "foo\nbar": [ + "foo\rbar" + ], + "foo\"bar": [ + "foo'bar" + ] + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "foo\nbar": [ + "foo\rbar" + ], + "foo\"bar": [ + "foo'bar" + ] + } }, - "type": "pattern" + "type": "dependencies", + "details": { + "missing_keys": [ + "foo'bar" + ] + } } + ] + ], + [ + [ + + ], + [ + ], [ { - "data": "\f", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" - }, - "type": "pattern" - } - ], - [ - { - "data": " ", - "data_pointer": "", + "data": "quux", + "data_pointer": "/foo", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" + "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/dependencies/bar/properties/foo", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "bar": { + "properties": { + "foo": { + "type": "integer" + }, + "bar": { + "type": "integer" + } + } + } + } }, - "type": "pattern" + "type": "integer" } ], [ { - "data": "", - "data_pointer": "", + "data": "quux", + "data_pointer": "/bar", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" + "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/dependencies/bar/properties/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "bar": { + "properties": { + "foo": { + "type": "integer" + }, + "bar": { + "type": "integer" + } + } + } + } }, - "type": "pattern" + "type": "integer" } ], [ { - "data": "\n", - "data_pointer": "", + "data": "quux", + "data_pointer": "/foo", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" + "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/dependencies/bar/properties/foo", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "bar": { + "properties": { + "foo": { + "type": "integer" + }, + "bar": { + "type": "integer" + } + } + } + } }, - "type": "pattern" - } - ], - [ + "type": "integer" + }, { - "data": "
", - "data_pointer": "", + "data": "quux", + "data_pointer": "/bar", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" + "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/dependencies/bar/properties/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "bar": { + "properties": { + "foo": { + "type": "integer" + }, + "bar": { + "type": "integer" + } + } + } + } }, - "type": "pattern" + "type": "integer" } ], [ - { - "data": " ", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "pattern": "^\\S$" - }, - "type": "pattern" - } + ], [ @@ -10490,28 +10256,46 @@ [ [ - ], - [ - - ], - [ - ], [ { - "data": "LES HIVERS DE MON ENFANCE ÉTAIENT DES SAISONS LONGUES, LONGUES. NOUS VIVIONS EN TROIS LIEUX: L'ÉCOLE, L'ÉGLISE ET LA PATINOIRE; MAIS LA VRAIE VIE ÉTAIT SUR LA PATINOIRE.", + "data": { + "bar": 2 + }, "data_pointer": "", - "schema": { + "schema": false, + "schema_pointer": "/dependencies/bar", + "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "\\p{Letter}cole" + "dependencies": { + "foo": true, + "bar": false + } }, - "schema_pointer": "", + "type": "schema" + } + ], + [ + { + "data": { + "foo": 1, + "bar": 2 + }, + "data_pointer": "", + "schema": false, + "schema_pointer": "/dependencies/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "\\p{Letter}cole" + "dependencies": { + "foo": true, + "bar": false + } }, - "type": "pattern" + "type": "schema" } + ], + [ + ] ], [ @@ -10520,82 +10304,140 @@ ], [ { - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", + "data": { + "foo'bar": { + "foo\"bar": 1 + } + }, "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "\\wcole" + "required": [ + "foo\"bar" + ] }, - "schema_pointer": "", + "schema_pointer": "/dependencies/foo'bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "\\wcole" + "dependencies": { + "foo\tbar": { + "minProperties": 4 + }, + "foo'bar": { + "required": [ + "foo\"bar" + ] + } + } }, - "type": "pattern" + "type": "required", + "details": { + "missing_keys": [ + "foo\"bar" + ] + } } ], [ { - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", + "data": { + "foo\tbar": 1, + "a": 2 + }, "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "\\wcole" + "minProperties": 4 }, - "schema_pointer": "", + "schema_pointer": "/dependencies/foo\tbar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "\\wcole" + "dependencies": { + "foo\tbar": { + "minProperties": 4 + }, + "foo'bar": { + "required": [ + "foo\"bar" + ] + } + } }, - "type": "pattern" + "type": "minProperties" } ], [ { - "data": "LES HIVERS DE MON ENFANCE ÉTAIENT DES SAISONS LONGUES, LONGUES. NOUS VIVIONS EN TROIS LIEUX: L'ÉCOLE, L'ÉGLISE ET LA PATINOIRE; MAIS LA VRAIE VIE ÉTAIT SUR LA PATINOIRE.", + "data": { + "foo'bar": 1 + }, "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "\\wcole" + "required": [ + "foo\"bar" + ] }, - "schema_pointer": "", + "schema_pointer": "/dependencies/foo'bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "\\wcole" - }, - "type": "pattern" - } - ] - ], + "dependencies": { + "foo\tbar": { + "minProperties": 4 + }, + "foo'bar": { + "required": [ + "foo\"bar" + ] + } + } + }, + "type": "required", + "details": { + "missing_keys": [ + "foo\"bar" + ] + } + } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/ecmascript-regex.json": [ [ [ { - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", + "data": "abc\\n", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "[a-z]cole" + "type": "string", + "pattern": "^abc$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "[a-z]cole" + "type": "string", + "pattern": "^abc$" }, "type": "pattern" } ], + [ + + ] + ], + [ [ { - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", + "data": "\\t", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "[a-z]cole" + "type": "string", + "pattern": "^\\t$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "[a-z]cole" + "type": "string", + "pattern": "^\\t$" }, "type": "pattern" } @@ -10605,58 +10447,43 @@ ] ], [ - [ - - ], [ { - "data": "-%#", + "data": "\\cC", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^\\d+$" + "type": "string", + "pattern": "^\\cC$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^\\d+$" + "type": "string", + "pattern": "^\\cC$" }, "type": "pattern" } ], [ - { - "data": "৪২", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^\\d+$" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^\\d+$" - }, - "type": "pattern" - } + ] ], [ - [ - - ], [ { - "data": "-%#", + "data": "\\cc", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^\\p{digit}+$" + "type": "string", + "pattern": "^\\cc$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^\\p{digit}+$" + "type": "string", + "pattern": "^\\cc$" }, "type": "pattern" } @@ -10668,124 +10495,68 @@ [ [ - ], - [ - - ], - [ - ], [ { - "data": "PAS DE VRAIE VIE", - "data_pointer": "/L'ÉCOLE", - "schema": false, - "schema_pointer": "/additionalProperties", - "root_schema": { + "data": "߀", + "data_pointer": "", + "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "patternProperties": { - "\\p{Letter}cole": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\d$" }, - "type": "schema" - } - ] - ], - [ - [ - - ], - [ - { - "data": "pas de vraie vie", - "data_pointer": "/l'école", - "schema": false, - "schema_pointer": "/additionalProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "patternProperties": { - "\\wcole": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\d$" }, - "type": "schema" + "type": "pattern" } ], [ { - "data": "pas de vraie vie", - "data_pointer": "/l'école", - "schema": false, - "schema_pointer": "/additionalProperties", - "root_schema": { + "data": "߀", + "data_pointer": "", + "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "patternProperties": { - "\\wcole": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\d$" }, - "type": "schema" - } - ], - [ - { - "data": "PAS DE VRAIE VIE", - "data_pointer": "/L'ÉCOLE", - "schema": false, - "schema_pointer": "/additionalProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "patternProperties": { - "\\wcole": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\d$" }, - "type": "schema" + "type": "pattern" } ] ], [ [ { - "data": "pas de vraie vie", - "data_pointer": "/l'école", - "schema": false, - "schema_pointer": "/additionalProperties", - "root_schema": { + "data": "0", + "data_pointer": "", + "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "patternProperties": { - "[a-z]cole": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\D$" }, - "type": "schema" - } - ], - [ - { - "data": "pas de vraie vie", - "data_pointer": "/l'école", - "schema": false, - "schema_pointer": "/additionalProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "patternProperties": { - "[a-z]cole": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\D$" }, - "type": "schema" + "type": "pattern" } ], [ + ], + [ + ] ], [ @@ -10794,73 +10565,46 @@ ], [ { - "data": "spending the year dead for tax reasons", - "data_pointer": "/-%#", - "schema": false, - "schema_pointer": "/additionalProperties", - "root_schema": { + "data": "é", + "data_pointer": "", + "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "patternProperties": { - "^\\d+$": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\w$" }, - "type": "schema" - } - ], - [ - { - "data": "khajit has wares if you have coin", - "data_pointer": "/৪২", - "schema": false, - "schema_pointer": "/additionalProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "patternProperties": { - "^\\d+$": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\w$" }, - "type": "schema" + "type": "pattern" } ] ], [ - [ - - ], [ { - "data": "spending the year dead for tax reasons", - "data_pointer": "/-%#", - "schema": false, - "schema_pointer": "/additionalProperties", + "data": "a", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "string", + "pattern": "^\\W$" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "patternProperties": { - "^\\p{digit}+$": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\W$" }, - "type": "schema" + "type": "pattern" } ], [ ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/float-overflow.json": [ - [ - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/date-time.json": [ + ], [ [ @@ -10888,230 +10632,215 @@ ], [ - ], - [ - - ], - [ - - ], - [ - - ], - [ - { - "data": "1998-12-31T23:59:61Z", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" - }, - "type": "format" - } ], [ { - "data": "1998-12-31T23:58:60Z", + "data": "\u0001", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\s$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\s$" }, - "type": "format" + "type": "pattern" } ], [ { - "data": "1998-12-31T22:59:60Z", + "data": "–", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\s$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\s$" }, - "type": "format" + "type": "pattern" } - ], + ] + ], + [ [ { - "data": "1990-02-31T15:59:59.123-08:00", + "data": " ", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, - "type": "format" + "type": "pattern" } ], [ { - "data": "1990-12-31T15:59:59-24:00", + "data": "\t", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, - "type": "format" + "type": "pattern" } ], [ { - "data": "1963-06-19T08:30:06.28123+01:00Z", + "data": "\u000b", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, - "type": "format" + "type": "pattern" } ], [ { - "data": "06/19/1963 08:30:06 PST", + "data": "\f", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, - "type": "format" + "type": "pattern" } - ], - [ - ], [ { - "data": "2013-350T01:01:01", + "data": " ", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, - "type": "format" + "type": "pattern" } ], [ { - "data": "1963-6-19T08:30:06.283185Z", + "data": "", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, - "type": "format" + "type": "pattern" } ], [ { - "data": "1963-06-1T08:30:06.283185Z", + "data": "\n", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, - "type": "format" + "type": "pattern" } ], [ { - "data": "1963-06-1৪T00:00:00Z", + "data": "
", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, - "type": "format" + "type": "pattern" } ], [ { - "data": "1963-06-11T0৪:00:00Z", + "data": " ", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date-time" + "type": "string", + "pattern": "^\\S$" }, - "type": "format" + "type": "pattern" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/date.json": [ - [ - [ - - ], - [ - - ], - [ - ], [ ], [ - ], + ] + ], + [ [ ], @@ -11123,372 +10852,513 @@ ], [ { - "data": "2020-01-32", + "data": "LES HIVERS DE MON ENFANCE ÉTAIENT DES SAISONS LONGUES, LONGUES. NOUS VIVIONS EN TROIS LIEUX: L'ÉCOLE, L'ÉGLISE ET LA PATINOIRE; MAIS LA VRAIE VIE ÉTAIT SUR LA PATINOIRE.", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "\\p{Letter}cole" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "\\p{Letter}cole" }, - "type": "format" + "type": "pattern" } - ], + ] + ], + [ [ ], [ { - "data": "2021-02-29", + "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "\\wcole" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "\\wcole" }, - "type": "format" + "type": "pattern" } - ], - [ - ], [ { - "data": "2020-02-30", + "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "\\wcole" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "\\wcole" }, - "type": "format" + "type": "pattern" } - ], - [ - ], [ { - "data": "2020-03-32", + "data": "LES HIVERS DE MON ENFANCE ÉTAIENT DES SAISONS LONGUES, LONGUES. NOUS VIVIONS EN TROIS LIEUX: L'ÉCOLE, L'ÉGLISE ET LA PATINOIRE; MAIS LA VRAIE VIE ÉTAIT SUR LA PATINOIRE.", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "\\wcole" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "\\wcole" }, - "type": "format" + "type": "pattern" } - ], - [ - - ], + ] + ], + [ [ { - "data": "2020-04-31", + "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "[a-z]cole" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "[a-z]cole" }, - "type": "format" + "type": "pattern" } - ], - [ - ], [ { - "data": "2020-05-32", + "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "[a-z]cole" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "[a-z]cole" }, - "type": "format" + "type": "pattern" } ], [ + ] + ], + [ + [ + ], [ { - "data": "2020-06-31", + "data": "-%#", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "^\\d+$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "^\\d+$" }, - "type": "format" + "type": "pattern" } - ], - [ - ], [ { - "data": "2020-07-32", + "data": "৪২", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "^\\d+$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "^\\d+$" }, - "type": "format" + "type": "pattern" } - ], + ] + ], + [ [ ], [ { - "data": "2020-08-32", + "data": "-%#", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "^\\p{digit}+$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "pattern": "^\\p{digit}+$" }, - "type": "format" + "type": "pattern" } ], [ + ] + ], + [ + [ + + ], + [ + + ], + [ + ], [ { - "data": "2020-09-31", - "data_pointer": "", - "schema": { + "data": "PAS DE VRAIE VIE", + "data_pointer": "/L'ÉCOLE", + "schema": false, + "schema_pointer": "/additionalProperties", + "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "type": "object", + "patternProperties": { + "\\p{Letter}cole": true + }, + "additionalProperties": false }, - "schema_pointer": "", + "type": "schema" + } + ] + ], + [ + [ + + ], + [ + { + "data": "pas de vraie vie", + "data_pointer": "/l'école", + "schema": false, + "schema_pointer": "/additionalProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "type": "object", + "patternProperties": { + "\\wcole": true + }, + "additionalProperties": false }, - "type": "format" + "type": "schema" } ], [ - + { + "data": "pas de vraie vie", + "data_pointer": "/l'école", + "schema": false, + "schema_pointer": "/additionalProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "patternProperties": { + "\\wcole": true + }, + "additionalProperties": false + }, + "type": "schema" + } ], [ { - "data": "2020-10-32", - "data_pointer": "", - "schema": { + "data": "PAS DE VRAIE VIE", + "data_pointer": "/L'ÉCOLE", + "schema": false, + "schema_pointer": "/additionalProperties", + "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "type": "object", + "patternProperties": { + "\\wcole": true + }, + "additionalProperties": false }, - "schema_pointer": "", + "type": "schema" + } + ] + ], + [ + [ + { + "data": "pas de vraie vie", + "data_pointer": "/l'école", + "schema": false, + "schema_pointer": "/additionalProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "type": "object", + "patternProperties": { + "[a-z]cole": true + }, + "additionalProperties": false }, - "type": "format" + "type": "schema" + } + ], + [ + { + "data": "pas de vraie vie", + "data_pointer": "/l'école", + "schema": false, + "schema_pointer": "/additionalProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "patternProperties": { + "[a-z]cole": true + }, + "additionalProperties": false + }, + "type": "schema" } ], [ + ] + ], + [ + [ + ], [ { - "data": "2020-11-31", - "data_pointer": "", - "schema": { + "data": "spending the year dead for tax reasons", + "data_pointer": "/-%#", + "schema": false, + "schema_pointer": "/additionalProperties", + "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "type": "object", + "patternProperties": { + "^\\d+$": true + }, + "additionalProperties": false }, - "schema_pointer": "", + "type": "schema" + } + ], + [ + { + "data": "khajit has wares if you have coin", + "data_pointer": "/৪২", + "schema": false, + "schema_pointer": "/additionalProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "type": "object", + "patternProperties": { + "^\\d+$": true + }, + "additionalProperties": false }, - "type": "format" + "type": "schema" + } + ] + ], + [ + [ + + ], + [ + { + "data": "spending the year dead for tax reasons", + "data_pointer": "/-%#", + "schema": false, + "schema_pointer": "/additionalProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "patternProperties": { + "^\\p{digit}+$": true + }, + "additionalProperties": false + }, + "type": "schema" } ], [ + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/float-overflow.json": [ + [ + [ + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/date-time.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "2020-12-32", + "data": "1998-12-31T23:59:61Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "type": "format" } ], [ { - "data": "2020-13-01", + "data": "1998-12-31T23:58:60Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "type": "format" } ], [ { - "data": "06/19/1963", + "data": "1998-12-31T22:59:60Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "type": "format" } ], [ { - "data": "2013-350", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" - }, - "type": "format" - } - ], - [ - { - "data": "1998-1-20", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" - }, - "type": "format" - } - ], - [ - { - "data": "1998-01-1", + "data": "1990-02-31T15:59:59.123-08:00", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "type": "format" } ], [ { - "data": "1998-13-01", + "data": "1990-12-31T15:59:59-24:00", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "type": "format" } ], [ { - "data": "1998-04-31", + "data": "1963-06-19T08:30:06.28123+01:00Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "type": "format" } ], [ { - "data": "2021-02-29", + "data": "06/19/1963 08:30:06 PST", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "type": "format" } @@ -11498,87 +11368,87 @@ ], [ { - "data": "1963-06-1৪", + "data": "2013-350T01:01:01", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "type": "format" } ], [ { - "data": "20230328", + "data": "1963-6-19T08:30:06.283185Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "type": "format" } ], [ { - "data": "2023-W01", + "data": "1963-06-1T08:30:06.283185Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "type": "format" } ], [ { - "data": "2023-W13-2", + "data": "1963-06-1৪T00:00:00Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "type": "format" } ], [ { - "data": "2022W527", + "data": "1963-06-11T0৪:00:00Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "date" + "format": "date-time" }, "type": "format" } ] ] ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/duration.json": [ + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/date.json": [ [ [ @@ -11600,545 +11470,468 @@ ], [ + ], + [ + ], [ { - "data": "PT1D", + "data": "2020-01-32", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "type": "format" } + ], + [ + ], [ { - "data": "P", + "data": "2021-02-29", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "type": "format" } + ], + [ + ], [ { - "data": "P1YT", + "data": "2020-02-30", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "type": "format" } + ], + [ + ], [ { - "data": "PT", + "data": "2020-03-32", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "type": "format" } + ], + [ + ], [ { - "data": "P2D1Y", + "data": "2020-04-31", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "type": "format" } + ], + [ + ], [ { - "data": "P1D2H", + "data": "2020-05-32", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "type": "format" } + ], + [ + ], [ { - "data": "P2S", + "data": "2020-06-31", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "type": "format" } ], [ - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ { - "data": "P1Y2W", + "data": "2020-07-32", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "type": "format" } + ], + [ + ], [ { - "data": "P২Y", + "data": "2020-08-32", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "type": "format" } + ], + [ + ], [ { - "data": "P1", + "data": "2020-09-31", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "duration" + "format": "date" }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/email.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ ], [ { - "data": "2962", + "data": "2020-10-32", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "email" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "email" + "format": "date" }, "type": "format" } ], [ - ], - [ - - ], - [ - ], [ { - "data": ".test@example.com", + "data": "2020-11-31", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "email" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "email" + "format": "date" }, "type": "format" } + ], + [ + ], [ { - "data": "test.@example.com", + "data": "2020-12-32", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "email" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "email" + "format": "date" }, "type": "format" } - ], - [ - ], [ { - "data": "te..st@example.com", + "data": "2020-13-01", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "email" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "email" + "format": "date" }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/hostname.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ { - "data": "-a-host-name-that-starts-with--", + "data": "06/19/1963", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "type": "format" } ], [ { - "data": "not_a_valid_host_name", + "data": "2013-350", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "type": "format" } ], [ { - "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component", + "data": "1998-1-20", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "type": "format" } ], [ { - "data": "-hostname", + "data": "1998-01-1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "type": "format" } ], [ { - "data": "hostname-", + "data": "1998-13-01", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "type": "format" } ], [ { - "data": "_hostname", + "data": "1998-04-31", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "type": "format" } ], [ { - "data": "hostname_", + "data": "2021-02-29", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "type": "format" } + ], + [ + ], [ { - "data": "host_name", + "data": "1963-06-1৪", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "type": "format" } - ], - [ - ], [ { - "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com", + "data": "20230328", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "hostname" + "format": "date" }, "type": "format" } - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/idn-email.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ { - "data": "2962", + "data": "2023-W01", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-email" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-email" + "format": "date" }, "type": "format" } ], [ - + { + "data": "2023-W13-2", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "date" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "date" + }, + "type": "format" + } ], [ { - "data": "2962", + "data": "2022W527", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-email" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-email" + "format": "date" }, "type": "format" } ] ] ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/idn-hostname.json": [ + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/duration.json": [ [ [ @@ -12163,198 +11956,206 @@ ], [ { - "data": "〮실례.테스트", + "data": "PT1D", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "type": "format" } ], [ { - "data": "실〮례.테스트", + "data": "P", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "type": "format" } ], [ { - "data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트", + "data": "P1YT", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "type": "format" } ], [ { - "data": "-> $1.00 <--", + "data": "PT", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "type": "format" } - ], - [ - ], [ { - "data": "xn--X", + "data": "P2D1Y", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "type": "format" } ], [ { - "data": "XN--aa---o47jg78q", + "data": "P1D2H", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "type": "format" } ], [ { - "data": "-hello", + "data": "P2S", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "type": "format" } ], [ - { - "data": "hello-", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" - }, - "type": "format" - } + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "-hello-", + "data": "P1Y2W", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "type": "format" } ], [ { - "data": "ःhello", + "data": "P২Y", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "type": "format" } ], [ { - "data": "̀hello", + "data": "P1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" - }, - "type": "format" - } - ], - [ - { - "data": "҈hello", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "duration" }, "type": "format" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/email.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ @@ -12364,201 +12165,232 @@ ], [ { - "data": "ـߺ", + "data": "2962", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "email" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "email" }, "type": "format" } + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "〱〲〳〴〵〮〯〻", + "data": ".test@example.com", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "email" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "email" }, "type": "format" } ], [ { - "data": "a·l", + "data": "test.@example.com", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "email" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "email" }, "type": "format" } + ], + [ + ], [ { - "data": "·l", + "data": "te..st@example.com", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "email" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "email" }, "type": "format" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/hostname.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "l·a", + "data": "-a-host-name-that-starts-with--", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "type": "format" } ], [ { - "data": "l·", + "data": "not_a_valid_host_name", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "type": "format" } - ], - [ - ], [ { - "data": "α͵S", + "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "type": "format" } ], [ { - "data": "α͵", + "data": "-hostname", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "type": "format" } - ], - [ - ], [ { - "data": "A׳ב", + "data": "hostname-", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "type": "format" } ], [ { - "data": "׳ב", + "data": "_hostname", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "type": "format" } - ], - [ - ], [ { - "data": "A״ב", + "data": "hostname_", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "type": "format" } ], [ { - "data": "״ב", + "data": "host_name", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "type": "format" } @@ -12568,35 +12400,22 @@ ], [ { - "data": "def・abc", + "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "hostname" }, "type": "format" } ], [ - { - "data": "・", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" - }, - "type": "format" - } + ], [ @@ -12608,20 +12427,26 @@ ], [ - { - "data": "٠۰", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" - }, - "type": "format" - } + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/idn-email.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ @@ -12631,63 +12456,42 @@ ], [ { - "data": "क‍ष", + "data": "2962", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "idn-email" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "idn-email" }, "type": "format" } + ], + [ + ], [ { - "data": "‍ष", + "data": "2962", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "idn-email" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "idn-hostname" + "format": "idn-email" }, "type": "format" } - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ] ] ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/ipv4.json": [ + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/idn-hostname.json": [ [ [ @@ -12712,223 +12516,195 @@ ], [ { - "data": "127.0.0.0.1", + "data": "〮실례.테스트", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "256.256.256.256", + "data": "실〮례.테스트", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "127.0", + "data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "0x7f000001", + "data": "-> $1.00 <--", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "type": "format" } + ], + [ + ], [ { - "data": "2130706433", + "data": "xn--X", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "087.10.0.1", + "data": "XN--aa---o47jg78q", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "type": "format" } - ], - [ - ], [ { - "data": "1২7.0.0.1", + "data": "-hello", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "192.168.1.0/24", + "data": "hello-", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv4" + "format": "idn-hostname" }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/ipv6.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ { - "data": "12345::", + "data": "-hello-", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } - ], - [ - ], [ { - "data": "::abcef", + "data": "ःhello", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1", + "data": "̀hello", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "::laptop", + "data": "҈hello", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } @@ -12938,111 +12714,99 @@ ], [ - ], - [ - ], [ { - "data": ":2:3:4:5:6:7:8", + "data": "ـߺ", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "1:2:3:4:5:6:7:", + "data": "〱〲〳〴〵〮〯〻", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": ":2:3:4::8", + "data": "a·l", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } - ], - [ - ], [ { - "data": "1::d6::42", + "data": "·l", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } - ], - [ - - ], - [ - ], [ { - "data": "1::2:192.168.256.1", + "data": "l·a", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "1::2:192.168.ff.1", + "data": "l·", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } @@ -13052,222 +12816,219 @@ ], [ { - "data": "1:2:3:4:5:::8", + "data": "α͵S", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } - ], - [ - ], [ { - "data": "1:2:3:4:5:6:7", + "data": "α͵", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } ], [ - { - "data": "1", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" - }, - "type": "format" - } + ], [ { - "data": "127.0.0.1", + "data": "A׳ב", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "1:2:3:4:1.2.3", + "data": "׳ב", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } + ], + [ + ], [ { - "data": " ::1", + "data": "A״ב", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "::1 ", + "data": "״ב", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } + ], + [ + ], [ { - "data": "fe80::/64", + "data": "def・abc", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "fe80::a%eth1", + "data": "・", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } ], [ + ], + [ + + ], + [ + ], [ { - "data": "100:100:100:100:100:100:255.255.255.255.255", + "data": "٠۰", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } + ], + [ + + ], + [ + ], [ { - "data": "100:100:100:100:100:100:100:255.255.255.255", + "data": "क‍ष", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "1:2:3:4:5:6:7:৪", + "data": "‍ष", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } ], [ - { - "data": "1:2::192.16৪.0.1", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "ipv6" - }, - "type": "format" - } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/iri-reference.json": [ - [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], [ ], @@ -13276,6 +13037,13 @@ ], [ + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/ipv4.json": [ + [ + [ + ], [ @@ -13297,220 +13065,139 @@ ], [ { - "data": "\\\\WINDOWS\\filëßåré", + "data": "127.0.0.0.1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "iri-reference" + "format": "ipv4" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "iri-reference" + "format": "ipv4" }, "type": "format" } - ], - [ - - ], - [ - ], [ { - "data": "#ƒräg\\mênt", + "data": "256.256.256.256", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "iri-reference" + "format": "ipv4" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "iri-reference" + "format": "ipv4" }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/iri.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ { - "data": "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334", + "data": "127.0", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "iri" + "format": "ipv4" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "iri" + "format": "ipv4" }, "type": "format" } ], [ { - "data": "/abc", + "data": "0x7f000001", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "iri" + "format": "ipv4" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "iri" + "format": "ipv4" }, "type": "format" } ], [ { - "data": "\\\\WINDOWS\\filëßåré", + "data": "2130706433", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "iri" + "format": "ipv4" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "iri" + "format": "ipv4" }, "type": "format" } ], [ { - "data": "âππ", + "data": "087.10.0.1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "iri" + "format": "ipv4" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "iri" + "format": "ipv4" }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/json-pointer.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ ], [ { - "data": "/foo/bar~", + "data": "1২7.0.0.1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv4" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv4" }, "type": "format" } ], [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], + { + "data": "192.168.1.0/24", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "ipv4" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "ipv4" + }, + "type": "format" + } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/ipv6.json": [ + [ [ ], @@ -13534,509 +13221,445 @@ ], [ { - "data": "#", + "data": "12345::", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } + ], + [ + ], [ { - "data": "#/", + "data": "::abcef", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "#a", + "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "/~0~", + "data": "::laptop", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "/~0/~", + "data": ":2:3:4:5:6:7:8", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "/~2", + "data": "1:2:3:4:5:6:7:", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "/~-1", + "data": ":2:3:4::8", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } + ], + [ + ], [ { - "data": "/~~", + "data": "1::d6::42", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } ], [ - { - "data": "a", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" - }, - "type": "format" - } + + ], + [ + ], [ { - "data": "0", + "data": "1::2:192.168.256.1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "a/a", + "data": "1::2:192.168.ff.1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/regex.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ ], [ { - "data": "^(abc]", + "data": "1:2:3:4:5:::8", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "regex" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "regex" + "format": "ipv6" }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/relative-json-pointer.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ ], [ { - "data": "/foo/bar", + "data": "1:2:3:4:5:6:7", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "relative-json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "relative-json-pointer" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "-1/foo/bar", + "data": "1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "relative-json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "relative-json-pointer" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "+1/foo/bar", + "data": "127.0.0.1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "relative-json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "relative-json-pointer" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "0##", + "data": "1:2:3:4:1.2.3", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "relative-json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "relative-json-pointer" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "01/a", + "data": " ::1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "relative-json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "relative-json-pointer" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "01#", + "data": "::1 ", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "relative-json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "relative-json-pointer" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "", + "data": "fe80::/64", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "relative-json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "relative-json-pointer" + "format": "ipv6" }, "type": "format" } - ], - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/time.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ { - "data": "008:030:006Z", + "data": "fe80::a%eth1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "ipv6" }, "type": "format" } + ], + [ + ], [ { - "data": "8:3:6Z", + "data": "100:100:100:100:100:100:255.255.255.255.255", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "8:0030:6Z", + "data": "100:100:100:100:100:100:100:255.255.255.255", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "ipv6" }, "type": "format" } - ], - [ - ], [ { - "data": "22:59:60Z", + "data": "1:2:3:4:5:6:7:৪", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "23:58:60Z", + "data": "1:2::192.16৪.0.1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "ipv6" }, "type": "format" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/iri-reference.json": [ + [ + [ + ], [ ], [ - { - "data": "22:59:60+00:00", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" - }, - "type": "format" - } + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "23:58:60+00:00", + "data": "\\\\WINDOWS\\filëßåré", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "iri-reference" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "iri-reference" }, "type": "format" } @@ -14049,35 +13672,29 @@ ], [ { - "data": "23:59:60+01:00", + "data": "#ƒräg\\mênt", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "iri-reference" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "iri-reference" }, "type": "format" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/iri.json": [ + [ + [ + ], [ - { - "data": "23:59:60+00:30", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" - }, - "type": "format" - } + ], [ @@ -14086,36 +13703,13 @@ ], [ - { - "data": "23:59:60-01:00", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" - }, - "type": "format" - } + ], [ - { - "data": "23:59:60-00:30", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" - }, - "type": "format" - } + + ], + [ + ], [ @@ -14131,266 +13725,345 @@ ], [ { - "data": "08:30:06-8:000", + "data": "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "iri" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "iri" }, "type": "format" } - ], - [ - ], [ { - "data": "24:00:00Z", + "data": "/abc", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "iri" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "iri" }, "type": "format" } ], [ { - "data": "00:60:00Z", + "data": "\\\\WINDOWS\\filëßåré", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "iri" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "iri" }, "type": "format" } ], [ { - "data": "00:00:61Z", + "data": "âππ", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "iri" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "iri" }, "type": "format" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/json-pointer.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "22:59:60Z", + "data": "/foo/bar~", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "type": "format" } + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "23:58:60Z", + "data": "#", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "type": "format" } ], [ { - "data": "01:02:03+24:00", + "data": "#/", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "type": "format" } ], [ { - "data": "01:02:03+00:60", + "data": "#a", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "type": "format" } ], [ { - "data": "01:02:03Z+00:30", + "data": "/~0~", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "type": "format" } ], [ { - "data": "08:30:06 PST", + "data": "/~0/~", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "type": "format" } ], [ { - "data": "01:01:01,1111", + "data": "/~2", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "type": "format" } ], [ { - "data": "12:00:00", + "data": "/~-1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "type": "format" } ], [ { - "data": "12:00:00.52", + "data": "/~~", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "type": "format" } ], [ { - "data": "1২:00:00Z", + "data": "a", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "type": "format" } ], [ { - "data": "08:30:06#00:20", + "data": "0", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "type": "format" } ], [ { - "data": "ab:cd:ef", + "data": "a/a", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "time" + "format": "json-pointer" }, "type": "format" } ] ] ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/unknown.json": [ + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/regex.json": [ [ [ @@ -14412,10 +14085,26 @@ ], [ + ], + [ + { + "data": "^(abc]", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "regex" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "regex" + }, + "type": "format" + } ] ] ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/uri-reference.json": [ + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/relative-json-pointer.json": [ [ [ @@ -14443,95 +14132,128 @@ ], [ + ], + [ + ], [ { - "data": "\\\\WINDOWS\\fileshare", + "data": "/foo/bar", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri-reference" + "format": "relative-json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri-reference" + "format": "relative-json-pointer" }, "type": "format" } - ], - [ - - ], - [ - ], [ { - "data": "#frag\\ment", + "data": "-1/foo/bar", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri-reference" + "format": "relative-json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri-reference" + "format": "relative-json-pointer" }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/uri-template.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - ], [ - + { + "data": "+1/foo/bar", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "relative-json-pointer" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "relative-json-pointer" + }, + "type": "format" + } ], [ - + { + "data": "0##", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "relative-json-pointer" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "relative-json-pointer" + }, + "type": "format" + } ], [ - + { + "data": "01/a", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "relative-json-pointer" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "relative-json-pointer" + }, + "type": "format" + } ], [ { - "data": "http://example.com/dictionary/{term:1}/{term", + "data": "01#", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri-template" + "format": "relative-json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri-template" + "format": "relative-json-pointer" }, "type": "format" } ], [ - + { + "data": "", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "relative-json-pointer" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "relative-json-pointer" + }, + "type": "format" + } ], [ ] ] ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/uri.json": [ + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/time.json": [ [ [ @@ -14553,182 +14275,124 @@ ], [ - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ { - "data": "//foo.bar/?baz=qux#quux", + "data": "008:030:006Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri" + "format": "time" }, "type": "format" } ], [ { - "data": "/abc", + "data": "8:3:6Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri" + "format": "time" }, "type": "format" } ], [ { - "data": "\\\\WINDOWS\\fileshare", + "data": "8:0030:6Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri" + "format": "time" }, "type": "format" } + ], + [ + ], [ { - "data": "abc", + "data": "22:59:60Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri" + "format": "time" }, "type": "format" } ], [ { - "data": "http:// shouldfail.com", + "data": "23:58:60Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri" + "format": "time" }, "type": "format" } + ], + [ + ], [ { - "data": ":// should fail", + "data": "22:59:60+00:00", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri" + "format": "time" }, "type": "format" } ], [ { - "data": "bar,baz:foo", + "data": "23:58:60+00:00", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uri" + "format": "time" }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/uuid.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ @@ -14738,471 +14402,478 @@ ], [ { - "data": "2eb8aa08-aa98-11ea-b4aa-73b441d1638", + "data": "23:59:60+01:00", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uuid" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uuid" + "format": "time" }, "type": "format" } ], [ { - "data": "2eb8aa08-aa98-11ea-73b441d16380", + "data": "23:59:60+00:30", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uuid" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uuid" + "format": "time" }, "type": "format" } + ], + [ + + ], + [ + ], [ { - "data": "2eb8aa08-aa98-11ea-b4ga-73b441d16380", + "data": "23:59:60-01:00", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uuid" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uuid" + "format": "time" }, "type": "format" } ], [ { - "data": "2eb8aa08aa9811eab4aa73b441d16380", + "data": "23:59:60-00:30", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uuid" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uuid" + "format": "time" }, "type": "format" } + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "2eb8aa08aa98-11ea-b4aa73b441d16380", + "data": "08:30:06-8:000", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uuid" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uuid" + "format": "time" }, "type": "format" } + ], + [ + ], [ { - "data": "2eb8-aa08-aa98-11ea-b4aa73b44-1d16380", + "data": "24:00:00Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uuid" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uuid" + "format": "time" }, "type": "format" } ], [ { - "data": "2eb8aa08aa9811eab4aa73b441d16380----", + "data": "00:60:00Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uuid" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "format": "uuid" + "format": "time" }, "type": "format" } - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/no-schema.json": [ - [ - [ - ], [ { - "data": "a", + "data": "00:00:61Z", "data_pointer": "", "schema": { - "minLength": 2 + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "time" }, "schema_pointer": "", "root_schema": { - "minLength": 2 + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "time" }, - "type": "minLength" + "type": "format" } - ], - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/non-bmp-regex.json": [ - [ - [ - - ], - [ - - ], - [ - ], [ { - "data": "🐉", + "data": "22:59:60Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^🐲*$" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^🐲*$" + "format": "time" }, - "type": "pattern" + "type": "format" } ], [ { - "data": "🐉🐉", + "data": "23:58:60Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^🐲*$" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^🐲*$" + "format": "time" }, - "type": "pattern" + "type": "format" } ], [ { - "data": "D", + "data": "01:02:03+24:00", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^🐲*$" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^🐲*$" + "format": "time" }, - "type": "pattern" + "type": "format" } ], [ { - "data": "DD", + "data": "01:02:03+00:60", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^🐲*$" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^🐲*$" + "format": "time" }, - "type": "pattern" + "type": "format" } - ] - ], - [ - [ - - ], - [ - - ], - [ - ], [ { - "data": "hello", - "data_pointer": "/🐲", + "data": "01:02:03Z+00:30", + "data_pointer": "", "schema": { - "type": "integer" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "time" }, - "schema_pointer": "/patternProperties/^🐲*$", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "patternProperties": { - "^🐲*$": { - "type": "integer" - } - } + "format": "time" }, - "type": "integer" + "type": "format" } ], [ { - "data": "hello", - "data_pointer": "/🐲🐲", + "data": "08:30:06 PST", + "data_pointer": "", "schema": { - "type": "integer" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "time" }, - "schema_pointer": "/patternProperties/^🐲*$", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "patternProperties": { - "^🐲*$": { - "type": "integer" - } - } + "format": "time" }, - "type": "integer" + "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/optional/refOfUnknownKeyword.json": [ - [ - [ - ], [ { - "data": true, - "data_pointer": "/bar", + "data": "01:01:01,1111", + "data_pointer": "", "schema": { - "type": "integer" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "time" }, - "schema_pointer": "/unknown-keyword", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "unknown-keyword": { - "type": "integer" - }, - "properties": { - "bar": { - "$ref": "#/unknown-keyword" - } - } + "format": "time" }, - "type": "integer" + "type": "format" } - ] - ], - [ - [ - ], [ { - "data": true, - "data_pointer": "/bar", + "data": "12:00:00", + "data_pointer": "", "schema": { - "type": "integer" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "time" }, - "schema_pointer": "/properties/foo/unknown-keyword", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "unknown-keyword": { - "type": "integer" - } - }, - "bar": { - "$ref": "#/properties/foo/unknown-keyword" - } - } + "format": "time" }, - "type": "integer" + "type": "format" } - ] - ], - [ - [ - ], [ { - "data": 42, + "data": "12:00:00.52", "data_pointer": "", "schema": { - "type": "string" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "time" }, - "schema_pointer": "/examples/0", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "/base", - "examples": [ - { - "type": "string" - } - ], - "$ref": "#/examples/0" + "format": "time" }, - "type": "string" + "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/pattern.json": [ - [ - [ - ], [ { - "data": "abc", + "data": "1২:00:00Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^a*$" + "format": "time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "pattern": "^a*$" + "format": "time" }, - "type": "pattern" + "type": "format" } ], [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - + { + "data": "08:30:06#00:20", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "time" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "time" + }, + "type": "format" + } ], [ - + { + "data": "ab:cd:ef", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "time" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "time" + }, + "type": "format" + } ] - ], + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/unknown.json": [ [ [ + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ] ] ], - "JSON-Schema-Test-Suite/tests/draft2019-09/patternProperties.json": [ + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/uri-reference.json": [ [ [ ], [ + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "bar", - "data_pointer": "/foo", + "data": "\\\\WINDOWS\\fileshare", + "data_pointer": "", "schema": { - "type": "integer" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uri-reference" }, - "schema_pointer": "/patternProperties/f.*o", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "patternProperties": { - "f.*o": { - "type": "integer" - } - } + "format": "uri-reference" }, - "type": "integer" + "type": "format" } + ], + [ + + ], + [ + ], [ { - "data": "bar", - "data_pointer": "/foo", + "data": "#frag\\ment", + "data_pointer": "", "schema": { - "type": "integer" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uri-reference" }, - "schema_pointer": "/patternProperties/f.*o", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "patternProperties": { - "f.*o": { - "type": "integer" - } - } + "format": "uri-reference" }, - "type": "integer" - }, + "type": "format" + } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/uri-template.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ { - "data": "baz", - "data_pointer": "/foooooo", + "data": "http://example.com/dictionary/{term:1}/{term", + "data_pointer": "", "schema": { - "type": "integer" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uri-template" }, - "schema_pointer": "/patternProperties/f.*o", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "patternProperties": { - "f.*o": { - "type": "integer" - } - } + "format": "uri-template" }, - "type": "integer" + "type": "format" } ], [ @@ -15210,12 +14881,59 @@ ], [ + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/uri.json": [ + [ + [ + + ], + [ + ], [ - ] - ], - [ + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], [ ], @@ -15227,280 +14945,267 @@ ], [ { - "data": "bar", - "data_pointer": "/a", + "data": "//foo.bar/?baz=qux#quux", + "data_pointer": "", "schema": { - "type": "integer" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uri" }, - "schema_pointer": "/patternProperties/a*", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "patternProperties": { - "a*": { - "type": "integer" - }, - "aaa*": { - "maximum": 20 - } - } + "format": "uri" }, - "type": "integer" + "type": "format" } ], [ { - "data": 31, - "data_pointer": "/aaaa", + "data": "/abc", + "data_pointer": "", "schema": { - "maximum": 20 + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uri" }, - "schema_pointer": "/patternProperties/aaa*", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "patternProperties": { - "a*": { - "type": "integer" - }, - "aaa*": { - "maximum": 20 - } - } + "format": "uri" }, - "type": "maximum" + "type": "format" } ], [ { - "data": "foo", - "data_pointer": "/aaa", + "data": "\\\\WINDOWS\\fileshare", + "data_pointer": "", "schema": { - "type": "integer" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uri" }, - "schema_pointer": "/patternProperties/a*", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "patternProperties": { - "a*": { - "type": "integer" - }, - "aaa*": { - "maximum": 20 - } - } + "format": "uri" }, - "type": "integer" - }, + "type": "format" + } + ], + [ { - "data": 31, - "data_pointer": "/aaaa", + "data": "abc", + "data_pointer": "", "schema": { - "maximum": 20 + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uri" }, - "schema_pointer": "/patternProperties/aaa*", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "patternProperties": { - "a*": { - "type": "integer" - }, - "aaa*": { - "maximum": 20 - } - } + "format": "uri" }, - "type": "maximum" + "type": "format" } - ] - ], - [ - [ - ], [ { - "data": null, - "data_pointer": "/a31b", + "data": "http:// shouldfail.com", + "data_pointer": "", "schema": { - "type": "boolean" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uri" }, - "schema_pointer": "/patternProperties/[0-9]{2,}", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "patternProperties": { - "[0-9]{2,}": { - "type": "boolean" - }, - "X_": { - "type": "string" - } - } + "format": "uri" }, - "type": "boolean" + "type": "format" } ], [ - + { + "data": ":// should fail", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uri" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uri" + }, + "type": "format" + } ], [ { - "data": 3, - "data_pointer": "/a_X_3", + "data": "bar,baz:foo", + "data_pointer": "", "schema": { - "type": "string" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uri" }, - "schema_pointer": "/patternProperties/X_", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "patternProperties": { - "[0-9]{2,}": { - "type": "boolean" - }, - "X_": { - "type": "string" - } - } + "format": "uri" }, - "type": "string" + "type": "format" } ] - ], + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/uuid.json": [ [ [ + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": 2, - "data_pointer": "/bar", - "schema": false, - "schema_pointer": "/patternProperties/b.*", + "data": "2eb8aa08-aa98-11ea-b4aa-73b441d1638", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uuid" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "patternProperties": { - "f.*": true, - "b.*": false - } + "format": "uuid" }, - "type": "schema" + "type": "format" } ], [ { - "data": 2, - "data_pointer": "/bar", - "schema": false, - "schema_pointer": "/patternProperties/b.*", + "data": "2eb8aa08-aa98-11ea-73b441d16380", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uuid" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "patternProperties": { - "f.*": true, - "b.*": false - } + "format": "uuid" }, - "type": "schema" + "type": "format" } ], [ { - "data": 1, - "data_pointer": "/foobar", - "schema": false, - "schema_pointer": "/patternProperties/b.*", + "data": "2eb8aa08-aa98-11ea-b4ga-73b441d16380", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uuid" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "patternProperties": { - "f.*": true, - "b.*": false - } + "format": "uuid" }, - "type": "schema" + "type": "format" } - ], - [ - - ] - ], - [ - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/properties.json": [ - [ - [ - ], [ { - "data": { - }, - "data_pointer": "/bar", + "data": "2eb8aa08aa9811eab4aa73b441d16380", + "data_pointer": "", "schema": { - "type": "string" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uuid" }, - "schema_pointer": "/properties/bar", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "type": "integer" - }, - "bar": { - "type": "string" - } - } + "format": "uuid" }, - "type": "string" + "type": "format" } ], [ { - "data": [ - - ], - "data_pointer": "/foo", + "data": "2eb8aa08aa98-11ea-b4aa73b441d16380", + "data_pointer": "", "schema": { - "type": "integer" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uuid" }, - "schema_pointer": "/properties/foo", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "type": "integer" - }, - "bar": { - "type": "string" - } - } + "format": "uuid" }, - "type": "integer" - }, + "type": "format" + } + ], + [ { - "data": { - }, - "data_pointer": "/bar", + "data": "2eb8-aa08-aa98-11ea-b4aa73b44-1d16380", + "data_pointer": "", "schema": { - "type": "string" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uuid" }, - "schema_pointer": "/properties/bar", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "type": "integer" - }, - "bar": { - "type": "string" - } - } + "format": "uuid" }, - "type": "string" + "type": "format" } ], [ - + { + "data": "2eb8aa08aa9811eab4aa73b441d16380----", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uuid" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "format": "uuid" + }, + "type": "format" + } + ], + [ + + ], + [ + ], [ @@ -15508,156 +15213,135 @@ [ ] - ], + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/id.json": [ [ [ + ], + [ + ], [ { - "data": [ - 1, - 2, - 3, - 4 - ], - "data_pointer": "/foo", + "data": 1, + "data_pointer": "", "schema": { - "type": "array", - "maxItems": 3 + "enum": [ + { + "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", + "type": "null" + } + ] }, - "schema_pointer": "/properties/foo", + "schema_pointer": "/$defs/id_in_enum", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "type": "array", - "maxItems": 3 + "$defs": { + "id_in_enum": { + "enum": [ + { + "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", + "type": "null" + } + ] }, - "bar": { - "type": "array" + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", + "type": "string" + }, + "zzz_id_in_const": { + "const": { + "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", + "type": "null" + } } }, - "patternProperties": { - "f.o": { - "minItems": 2 + "anyOf": [ + { + "$ref": "#/$defs/id_in_enum" + }, + { + "$ref": "https://localhost:1234/draft2019-09/id/my_identifier.json" } - }, - "additionalProperties": { - "type": "integer" - } + ] }, - "type": "maxItems" - } - ], - [ + "type": "enum" + }, { - "data": [ - - ], - "data_pointer": "/foo", + "data": 1, + "data_pointer": "", "schema": { - "minItems": 2 + "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", + "type": "string" }, - "schema_pointer": "/patternProperties/f.o", + "schema_pointer": "/$defs/real_id_in_schema", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "type": "array", - "maxItems": 3 + "$defs": { + "id_in_enum": { + "enum": [ + { + "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", + "type": "null" + } + ] }, - "bar": { - "type": "array" + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", + "type": "string" + }, + "zzz_id_in_const": { + "const": { + "$id": "https://localhost:1234/draft2019-09/id/my_identifier.json", + "type": "null" + } } }, - "patternProperties": { - "f.o": { - "minItems": 2 + "anyOf": [ + { + "$ref": "#/$defs/id_in_enum" + }, + { + "$ref": "https://localhost:1234/draft2019-09/id/my_identifier.json" } - }, - "additionalProperties": { - "type": "integer" - } + ] }, - "type": "minItems" + "type": "string" } - ], + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/no-schema.json": [ + [ [ ], [ { - "data": [ - - ], - "data_pointer": "/fxo", + "data": "a", + "data_pointer": "", "schema": { - "minItems": 2 + "minLength": 2 }, - "schema_pointer": "/patternProperties/f.o", + "schema_pointer": "", "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "type": "array", - "maxItems": 3 - }, - "bar": { - "type": "array" - } - }, - "patternProperties": { - "f.o": { - "minItems": 2 - } - }, - "additionalProperties": { - "type": "integer" - } + "minLength": 2 }, - "type": "minItems" + "type": "minLength" } ], [ - ], + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/non-bmp-regex.json": [ + [ [ ], - [ - { - "data": "foo", - "data_pointer": "/quux", - "schema": { - "type": "integer" - }, - "schema_pointer": "/additionalProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "type": "array", - "maxItems": 3 - }, - "bar": { - "type": "array" - } - }, - "patternProperties": { - "f.o": { - "minItems": 2 - } - }, - "additionalProperties": { - "type": "integer" - } - }, - "type": "integer" - } - ] - ], - [ [ ], @@ -15666,851 +15350,751 @@ ], [ { - "data": 2, - "data_pointer": "/bar", - "schema": false, - "schema_pointer": "/properties/bar", + "data": "🐉", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "pattern": "^🐲*$" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": true, - "bar": false - } + "pattern": "^🐲*$" }, - "type": "schema" + "type": "pattern" } ], [ { - "data": 2, - "data_pointer": "/bar", - "schema": false, - "schema_pointer": "/properties/bar", + "data": "🐉🐉", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "pattern": "^🐲*$" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": true, - "bar": false - } + "pattern": "^🐲*$" }, - "type": "schema" + "type": "pattern" } - ] - ], - [ - [ - ], [ { - "data": "1", - "data_pointer": "/foo\nbar", + "data": "D", + "data_pointer": "", "schema": { - "type": "number" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "pattern": "^🐲*$" }, - "schema_pointer": "/properties/foo\nbar", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo\nbar": { - "type": "number" - }, - "foo\"bar": { - "type": "number" - }, - "foo\\bar": { - "type": "number" - }, - "foo\rbar": { - "type": "number" - }, - "foo\tbar": { - "type": "number" - }, - "foo\fbar": { - "type": "number" - } - } + "pattern": "^🐲*$" }, - "type": "number" - }, + "type": "pattern" + } + ], + [ { - "data": "1", - "data_pointer": "/foo\"bar", + "data": "DD", + "data_pointer": "", "schema": { - "type": "number" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "pattern": "^🐲*$" }, - "schema_pointer": "/properties/foo\"bar", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo\nbar": { - "type": "number" - }, - "foo\"bar": { - "type": "number" - }, - "foo\\bar": { - "type": "number" - }, - "foo\rbar": { - "type": "number" - }, - "foo\tbar": { - "type": "number" - }, - "foo\fbar": { - "type": "number" - } - } + "pattern": "^🐲*$" }, - "type": "number" - }, + "type": "pattern" + } + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ { - "data": "1", - "data_pointer": "/foo\\bar", + "data": "hello", + "data_pointer": "/🐲", "schema": { - "type": "number" + "type": "integer" }, - "schema_pointer": "/properties/foo\\bar", + "schema_pointer": "/patternProperties/^🐲*$", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo\nbar": { - "type": "number" - }, - "foo\"bar": { - "type": "number" - }, - "foo\\bar": { - "type": "number" - }, - "foo\rbar": { - "type": "number" - }, - "foo\tbar": { - "type": "number" - }, - "foo\fbar": { - "type": "number" + "patternProperties": { + "^🐲*$": { + "type": "integer" } } }, - "type": "number" - }, + "type": "integer" + } + ], + [ { - "data": "1", - "data_pointer": "/foo\rbar", + "data": "hello", + "data_pointer": "/🐲🐲", "schema": { - "type": "number" + "type": "integer" }, - "schema_pointer": "/properties/foo\rbar", + "schema_pointer": "/patternProperties/^🐲*$", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo\nbar": { - "type": "number" - }, - "foo\"bar": { - "type": "number" - }, - "foo\\bar": { - "type": "number" - }, - "foo\rbar": { - "type": "number" - }, - "foo\tbar": { - "type": "number" - }, - "foo\fbar": { - "type": "number" + "patternProperties": { + "^🐲*$": { + "type": "integer" } } }, - "type": "number" - }, + "type": "integer" + } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/refOfUnknownKeyword.json": [ + [ + [ + + ], + [ { - "data": "1", - "data_pointer": "/foo\tbar", + "data": true, + "data_pointer": "/bar", "schema": { - "type": "number" + "type": "integer" }, - "schema_pointer": "/properties/foo\tbar", + "schema_pointer": "/unknown-keyword", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", + "unknown-keyword": { + "type": "integer" + }, "properties": { - "foo\nbar": { - "type": "number" - }, - "foo\"bar": { - "type": "number" - }, - "foo\\bar": { - "type": "number" - }, - "foo\rbar": { - "type": "number" - }, - "foo\tbar": { - "type": "number" - }, - "foo\fbar": { - "type": "number" + "bar": { + "$ref": "#/unknown-keyword" } } }, - "type": "number" - }, + "type": "integer" + } + ] + ], + [ + [ + + ], + [ { - "data": "1", - "data_pointer": "/foo\fbar", + "data": true, + "data_pointer": "/bar", "schema": { - "type": "number" + "type": "integer" }, - "schema_pointer": "/properties/foo\fbar", + "schema_pointer": "/properties/foo/unknown-keyword", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "properties": { - "foo\nbar": { - "type": "number" - }, - "foo\"bar": { - "type": "number" - }, - "foo\\bar": { - "type": "number" - }, - "foo\rbar": { - "type": "number" - }, - "foo\tbar": { - "type": "number" + "foo": { + "unknown-keyword": { + "type": "integer" + } }, - "foo\fbar": { - "type": "number" + "bar": { + "$ref": "#/properties/foo/unknown-keyword" } } }, - "type": "number" + "type": "integer" } ] ], [ [ - ] - ], - [ - [ - - ], - [ - - ], - [ - ], [ { - "data": "foo", - "data_pointer": "/__proto__", + "data": 42, + "data_pointer": "", "schema": { - "type": "number" + "type": "string" }, - "schema_pointer": "/properties/__proto__", + "schema_pointer": "/examples/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "__proto__": { - "type": "number" - }, - "toString": { - "properties": { - "length": { - "type": "string" - } - } - }, - "constructor": { - "type": "number" + "$id": "/base", + "examples": [ + { + "type": "string" } - } + ], + "$ref": "#/examples/0" }, - "type": "number" + "type": "string" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/optional/unknownKeyword.json": [ + [ + [ + ], [ { - "data": 37, - "data_pointer": "/toString/length", + "data": null, + "data_pointer": "", "schema": { - "type": "string" + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "schema_pointer": "/properties/toString/properties/length", + "schema_pointer": "/$defs/id_in_unknown0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "__proto__": { - "type": "number" + "$defs": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "toString": { - "properties": { - "length": { - "type": "string" + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "integer" + } } } + } + }, + "anyOf": [ + { + "$ref": "#/$defs/id_in_unknown0" }, - "constructor": { - "type": "number" + { + "$ref": "#/$defs/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json" } - } + ] }, - "type": "string" - } - ], - [ + "type": "not" + }, { - "data": { - "length": 37 - }, - "data_pointer": "/constructor", + "data": null, + "data_pointer": "", "schema": { - "type": "number" + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } }, - "schema_pointer": "/properties/constructor", + "schema_pointer": "/$defs/id_in_unknown1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "__proto__": { - "type": "number" + "$defs": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "toString": { - "properties": { - "length": { - "type": "string" + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "integer" + } } } + } + }, + "anyOf": [ + { + "$ref": "#/$defs/id_in_unknown0" }, - "constructor": { - "type": "number" + { + "$ref": "#/$defs/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json" } - } + ] }, - "type": "number" - } - ], - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/propertyNames.json": [ - [ - [ - - ], - [ + "type": "not" + }, { - "data": "foobar", + "data": null, "data_pointer": "", "schema": { - "maxLength": 3 + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "string" }, - "schema_pointer": "/propertyNames", + "schema_pointer": "/$defs/real_id_in_schema", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "propertyNames": { - "maxLength": 3 - } + "$defs": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } + } + }, + "anyOf": [ + { + "$ref": "#/$defs/id_in_unknown0" + }, + { + "$ref": "#/$defs/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json" + } + ] }, - "type": "maxLength" + "type": "string" } - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ] - ], - [ - [ - ], [ { - "data": "aaA", + "data": 1, "data_pointer": "", "schema": { - "pattern": "^a+$" + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "schema_pointer": "/propertyNames", + "schema_pointer": "/$defs/id_in_unknown0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "propertyNames": { - "pattern": "^a+$" - } - }, - "type": "pattern" - } - ], - [ - - ] - ], - [ - [ - - ], - [ - - ] - ], - [ - [ - { - "data": "foo", - "data_pointer": "", - "schema": false, - "schema_pointer": "/propertyNames", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "propertyNames": false - }, - "type": "schema" - } - ], - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/recursiveRef.json": [ - [ - [ - - ], - [ - - ], - [ - { - "data": false, - "data_pointer": "/bar", - "schema": false, - "schema_pointer": "/additionalProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "$recursiveRef": "#" - } - }, - "additionalProperties": false - }, - "type": "schema" - } - ], - [ - { - "data": false, - "data_pointer": "/foo/bar", - "schema": false, - "schema_pointer": "/additionalProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "$recursiveRef": "#" - } - }, - "additionalProperties": false - }, - "type": "schema" - } - ] - ], - [ - [ - - ], - [ - - ], - [ - { - "data": { - "foo": 1 - }, - "data_pointer": "", - "schema": { - "type": "integer" - }, - "schema_pointer": "/anyOf/0", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "integer" } } - ] + } } }, "anyOf": [ { - "type": "integer" + "$ref": "#/$defs/id_in_unknown0" }, { - "$ref": "#/$defs/myobject" + "$ref": "#/$defs/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json" } ] }, - "type": "integer" + "type": "not" }, { - "data": { - "foo": 1 - }, + "data": 1, "data_pointer": "", "schema": { - "type": "string" + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } }, - "schema_pointer": "/$defs/myobject/anyOf/0", + "schema_pointer": "/$defs/id_in_unknown1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "integer" } } - ] + } } }, "anyOf": [ { - "type": "integer" + "$ref": "#/$defs/id_in_unknown0" }, { - "$ref": "#/$defs/myobject" + "$ref": "#/$defs/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json" } ] }, - "type": "string" + "type": "not" }, { "data": 1, - "data_pointer": "/foo", + "data_pointer": "", "schema": { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", "type": "string" }, - "schema_pointer": "/$defs/myobject/anyOf/0", + "schema_pointer": "/$defs/real_id_in_schema", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", + "type": "integer" } } - ] + } } }, "anyOf": [ { - "type": "integer" + "$ref": "#/$defs/id_in_unknown0" }, { - "$ref": "#/$defs/myobject" + "$ref": "#/$defs/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json" } ] }, "type": "string" - }, + } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/pattern.json": [ + [ + [ + + ], + [ { - "data": 1, - "data_pointer": "/foo", + "data": "abc", + "data_pointer": "", "schema": { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } + "$schema": "https://json-schema.org/draft/2019-09/schema", + "pattern": "^a*$" }, - "schema_pointer": "/$defs/myobject/anyOf/1", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } - }, - "anyOf": [ - { - "type": "integer" - }, - { - "$ref": "#/$defs/myobject" - } - ] + "pattern": "^a*$" }, - "type": "object" + "type": "pattern" } ], [ + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/patternProperties.json": [ + [ + [ + + ], + [ + ], [ { - "data": { - "foo": { - "bar": 1 - } - }, - "data_pointer": "", + "data": "bar", + "data_pointer": "/foo", "schema": { "type": "integer" }, - "schema_pointer": "/anyOf/0", + "schema_pointer": "/patternProperties/f.*o", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } - }, - "anyOf": [ - { + "patternProperties": { + "f.*o": { "type": "integer" - }, - { - "$ref": "#/$defs/myobject" } - ] + } }, "type": "integer" - }, + } + ], + [ { - "data": { - "foo": { - "bar": 1 - } - }, - "data_pointer": "", + "data": "bar", + "data_pointer": "/foo", "schema": { - "type": "string" + "type": "integer" }, - "schema_pointer": "/$defs/myobject/anyOf/0", + "schema_pointer": "/patternProperties/f.*o", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } - }, - "anyOf": [ - { + "patternProperties": { + "f.*o": { "type": "integer" - }, - { - "$ref": "#/$defs/myobject" } - ] + } }, - "type": "string" + "type": "integer" }, { - "data": { - "bar": 1 - }, - "data_pointer": "/foo", + "data": "baz", + "data_pointer": "/foooooo", "schema": { - "type": "string" + "type": "integer" }, - "schema_pointer": "/$defs/myobject/anyOf/0", + "schema_pointer": "/patternProperties/f.*o", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } - }, - "anyOf": [ - { + "patternProperties": { + "f.*o": { "type": "integer" - }, - { - "$ref": "#/$defs/myobject" } - ] + } }, - "type": "string" - }, + "type": "integer" + } + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ { - "data": 1, - "data_pointer": "/foo/bar", + "data": "bar", + "data_pointer": "/a", "schema": { - "type": "string" + "type": "integer" }, - "schema_pointer": "/$defs/myobject/anyOf/0", + "schema_pointer": "/patternProperties/a*", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } - }, - "anyOf": [ - { + "patternProperties": { + "a*": { "type": "integer" }, - { - "$ref": "#/$defs/myobject" + "aaa*": { + "maximum": 20 } - ] + } }, - "type": "string" - }, + "type": "integer" + } + ], + [ { - "data": 1, - "data_pointer": "/foo/bar", + "data": 31, + "data_pointer": "/aaaa", "schema": { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } + "maximum": 20 }, - "schema_pointer": "/$defs/myobject/anyOf/1", + "schema_pointer": "/patternProperties/aaa*", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] + "patternProperties": { + "a*": { + "type": "integer" + }, + "aaa*": { + "maximum": 20 } - }, - "anyOf": [ - { + } + }, + "type": "maximum" + } + ], + [ + { + "data": "foo", + "data_pointer": "/aaa", + "schema": { + "type": "integer" + }, + "schema_pointer": "/patternProperties/a*", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "patternProperties": { + "a*": { "type": "integer" }, - { - "$ref": "#/$defs/myobject" + "aaa*": { + "maximum": 20 } - ] + } }, - "type": "object" + "type": "integer" + }, + { + "data": 31, + "data_pointer": "/aaaa", + "schema": { + "maximum": 20 + }, + "schema_pointer": "/patternProperties/aaa*", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "patternProperties": { + "a*": { + "type": "integer" + }, + "aaa*": { + "maximum": 20 + } + } + }, + "type": "maximum" } ] ], @@ -16519,13 +16103,104 @@ ], [ - + { + "data": null, + "data_pointer": "/a31b", + "schema": { + "type": "boolean" + }, + "schema_pointer": "/patternProperties/[0-9]{2,}", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "patternProperties": { + "[0-9]{2,}": { + "type": "boolean" + }, + "X_": { + "type": "string" + } + } + }, + "type": "boolean" + } ], [ ], + [ + { + "data": 3, + "data_pointer": "/a_X_3", + "schema": { + "type": "string" + }, + "schema_pointer": "/patternProperties/X_", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "patternProperties": { + "[0-9]{2,}": { + "type": "boolean" + }, + "X_": { + "type": "string" + } + } + }, + "type": "string" + } + ] + ], + [ [ + ], + [ + { + "data": 2, + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/patternProperties/b.*", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "patternProperties": { + "f.*": true, + "b.*": false + } + }, + "type": "schema" + } + ], + [ + { + "data": 2, + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/patternProperties/b.*", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "patternProperties": { + "f.*": true, + "b.*": false + } + }, + "type": "schema" + } + ], + [ + { + "data": 1, + "data_pointer": "/foobar", + "schema": false, + "schema_pointer": "/patternProperties/b.*", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "patternProperties": { + "f.*": true, + "b.*": false + } + }, + "type": "schema" + } ], [ @@ -16534,173 +16209,164 @@ [ [ - ], + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/properties.json": [ + [ [ ], [ { "data": { - "foo": 1 }, - "data_pointer": "", + "data_pointer": "/bar", "schema": { - "type": "integer" + "type": "string" }, - "schema_pointer": "/anyOf/0", + "schema_pointer": "/properties/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", - "$recursiveAnchor": false, - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": false, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] + "properties": { + "foo": { + "type": "integer" + }, + "bar": { + "type": "string" } - }, - "anyOf": [ - { + } + }, + "type": "string" + } + ], + [ + { + "data": [ + + ], + "data_pointer": "/foo", + "schema": { + "type": "integer" + }, + "schema_pointer": "/properties/foo", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "properties": { + "foo": { "type": "integer" }, - { - "$ref": "#/$defs/myobject" + "bar": { + "type": "string" } - ] + } }, "type": "integer" }, { "data": { - "foo": 1 }, - "data_pointer": "", + "data_pointer": "/bar", "schema": { "type": "string" }, - "schema_pointer": "/$defs/myobject/anyOf/0", + "schema_pointer": "/properties/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", - "$recursiveAnchor": false, - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": false, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } - }, - "anyOf": [ - { + "properties": { + "foo": { "type": "integer" }, - { - "$ref": "#/$defs/myobject" + "bar": { + "type": "string" } - ] + } }, "type": "string" - }, + } + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ { - "data": 1, + "data": [ + 1, + 2, + 3, + 4 + ], "data_pointer": "/foo", "schema": { - "type": "string" + "type": "array", + "maxItems": 3 }, - "schema_pointer": "/$defs/myobject/anyOf/0", + "schema_pointer": "/properties/foo", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", - "$recursiveAnchor": false, - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": false, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] + "properties": { + "foo": { + "type": "array", + "maxItems": 3 + }, + "bar": { + "type": "array" } }, - "anyOf": [ - { - "type": "integer" - }, - { - "$ref": "#/$defs/myobject" + "patternProperties": { + "f.o": { + "minItems": 2 } - ] + }, + "additionalProperties": { + "type": "integer" + } }, - "type": "string" - }, + "type": "maxItems" + } + ], + [ { - "data": 1, + "data": [ + + ], "data_pointer": "/foo", "schema": { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } + "minItems": 2 }, - "schema_pointer": "/$defs/myobject/anyOf/1", + "schema_pointer": "/patternProperties/f.o", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", - "$recursiveAnchor": false, - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": false, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] + "properties": { + "foo": { + "type": "array", + "maxItems": 3 + }, + "bar": { + "type": "array" } }, - "anyOf": [ - { - "type": "integer" - }, - { - "$ref": "#/$defs/myobject" + "patternProperties": { + "f.o": { + "minItems": 2 } - ] + }, + "additionalProperties": { + "type": "integer" + } }, - "type": "object" + "type": "minItems" } ], [ @@ -16708,460 +16374,592 @@ ], [ { - "data": { - "foo": { - "bar": 1 - } - }, - "data_pointer": "", + "data": [ + + ], + "data_pointer": "/fxo", "schema": { - "type": "integer" + "minItems": 2 }, - "schema_pointer": "/anyOf/0", + "schema_pointer": "/patternProperties/f.o", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", - "$recursiveAnchor": false, - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": false, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] + "properties": { + "foo": { + "type": "array", + "maxItems": 3 + }, + "bar": { + "type": "array" } }, - "anyOf": [ - { - "type": "integer" - }, - { - "$ref": "#/$defs/myobject" + "patternProperties": { + "f.o": { + "minItems": 2 } - ] - }, - "type": "integer" - }, - { - "data": { - "foo": { - "bar": 1 + }, + "additionalProperties": { + "type": "integer" } }, - "data_pointer": "", + "type": "minItems" + } + ], + [ + + ], + [ + + ], + [ + { + "data": "foo", + "data_pointer": "/quux", "schema": { - "type": "string" + "type": "integer" }, - "schema_pointer": "/$defs/myobject/anyOf/0", + "schema_pointer": "/additionalProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", - "$recursiveAnchor": false, - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": false, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] + "properties": { + "foo": { + "type": "array", + "maxItems": 3 + }, + "bar": { + "type": "array" } }, - "anyOf": [ - { - "type": "integer" - }, - { - "$ref": "#/$defs/myobject" + "patternProperties": { + "f.o": { + "minItems": 2 } - ] - }, - "type": "string" - }, - { - "data": { - "bar": 1 - }, - "data_pointer": "/foo", - "schema": { - "type": "string" + }, + "additionalProperties": { + "type": "integer" + } }, - "schema_pointer": "/$defs/myobject/anyOf/0", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", - "$recursiveAnchor": false, - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": false, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } - }, - "anyOf": [ - { - "type": "integer" - }, - { - "$ref": "#/$defs/myobject" - } - ] - }, - "type": "string" - }, + "type": "integer" + } + ] + ], + [ + [ + + ], + [ + + ], + [ { - "data": 1, - "data_pointer": "/foo/bar", - "schema": { - "type": "string" - }, - "schema_pointer": "/$defs/myobject/anyOf/0", + "data": 2, + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/properties/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", - "$recursiveAnchor": false, - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": false, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } - }, - "anyOf": [ - { - "type": "integer" - }, - { - "$ref": "#/$defs/myobject" - } - ] - }, - "type": "string" - }, - { - "data": 1, - "data_pointer": "/foo/bar", - "schema": { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" + "properties": { + "foo": true, + "bar": false } }, - "schema_pointer": "/$defs/myobject/anyOf/1", + "type": "schema" + } + ], + [ + { + "data": 2, + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/properties/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", - "$recursiveAnchor": false, - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": false, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } - }, - "anyOf": [ - { - "type": "integer" - }, - { - "$ref": "#/$defs/myobject" - } - ] + "properties": { + "foo": true, + "bar": false + } }, - "type": "object" + "type": "schema" } ] ], [ [ - ], - [ - ], [ { - "data": { - "foo": 1 - }, - "data_pointer": "", + "data": "1", + "data_pointer": "/foo\nbar", "schema": { - "type": "integer" + "type": "number" }, - "schema_pointer": "/anyOf/0", + "schema_pointer": "/properties/foo\nbar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": false, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } - }, - "anyOf": [ - { - "type": "integer" + "properties": { + "foo\nbar": { + "type": "number" }, - { - "$ref": "#/$defs/myobject" + "foo\"bar": { + "type": "number" + }, + "foo\\bar": { + "type": "number" + }, + "foo\rbar": { + "type": "number" + }, + "foo\tbar": { + "type": "number" + }, + "foo\fbar": { + "type": "number" } - ] + } }, - "type": "integer" + "type": "number" }, { - "data": { - "foo": 1 - }, - "data_pointer": "", + "data": "1", + "data_pointer": "/foo\"bar", "schema": { - "type": "string" + "type": "number" }, - "schema_pointer": "/$defs/myobject/anyOf/0", + "schema_pointer": "/properties/foo\"bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": false, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } - }, - "anyOf": [ - { - "type": "integer" + "properties": { + "foo\nbar": { + "type": "number" }, - { - "$ref": "#/$defs/myobject" + "foo\"bar": { + "type": "number" + }, + "foo\\bar": { + "type": "number" + }, + "foo\rbar": { + "type": "number" + }, + "foo\tbar": { + "type": "number" + }, + "foo\fbar": { + "type": "number" } - ] + } }, - "type": "string" + "type": "number" }, { - "data": 1, - "data_pointer": "/foo", + "data": "1", + "data_pointer": "/foo\\bar", "schema": { - "type": "string" + "type": "number" }, - "schema_pointer": "/$defs/myobject/anyOf/0", + "schema_pointer": "/properties/foo\\bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": false, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } - }, - "anyOf": [ - { - "type": "integer" + "properties": { + "foo\nbar": { + "type": "number" }, - { - "$ref": "#/$defs/myobject" + "foo\"bar": { + "type": "number" + }, + "foo\\bar": { + "type": "number" + }, + "foo\rbar": { + "type": "number" + }, + "foo\tbar": { + "type": "number" + }, + "foo\fbar": { + "type": "number" } - ] + } }, - "type": "string" + "type": "number" }, { - "data": 1, - "data_pointer": "/foo", + "data": "1", + "data_pointer": "/foo\rbar", "schema": { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" + "type": "number" + }, + "schema_pointer": "/properties/foo\rbar", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "properties": { + "foo\nbar": { + "type": "number" + }, + "foo\"bar": { + "type": "number" + }, + "foo\\bar": { + "type": "number" + }, + "foo\rbar": { + "type": "number" + }, + "foo\tbar": { + "type": "number" + }, + "foo\fbar": { + "type": "number" + } } }, - "schema_pointer": "/$defs/myobject/anyOf/1", + "type": "number" + }, + { + "data": "1", + "data_pointer": "/foo\tbar", + "schema": { + "type": "number" + }, + "schema_pointer": "/properties/foo\tbar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": false, - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] + "properties": { + "foo\nbar": { + "type": "number" + }, + "foo\"bar": { + "type": "number" + }, + "foo\\bar": { + "type": "number" + }, + "foo\rbar": { + "type": "number" + }, + "foo\tbar": { + "type": "number" + }, + "foo\fbar": { + "type": "number" } - }, - "anyOf": [ - { - "type": "integer" + } + }, + "type": "number" + }, + { + "data": "1", + "data_pointer": "/foo\fbar", + "schema": { + "type": "number" + }, + "schema_pointer": "/properties/foo\fbar", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "properties": { + "foo\nbar": { + "type": "number" }, - { - "$ref": "#/$defs/myobject" + "foo\"bar": { + "type": "number" + }, + "foo\\bar": { + "type": "number" + }, + "foo\rbar": { + "type": "number" + }, + "foo\tbar": { + "type": "number" + }, + "foo\fbar": { + "type": "number" } - ] + } }, - "type": "object" + "type": "number" } + ] + ], + [ + [ + + ] + ], + [ + [ + + ], + [ + ], [ ], [ { - "data": { - "foo": { - "bar": 1 - } - }, - "data_pointer": "", + "data": "foo", + "data_pointer": "/__proto__", "schema": { - "type": "integer" + "type": "number" }, - "schema_pointer": "/anyOf/0", + "schema_pointer": "/properties/__proto__", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": false, - "anyOf": [ - { + "properties": { + "__proto__": { + "type": "number" + }, + "toString": { + "properties": { + "length": { "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } } - ] - } - }, - "anyOf": [ - { - "type": "integer" + } }, - { - "$ref": "#/$defs/myobject" + "constructor": { + "type": "number" } - ] - }, - "type": "integer" - }, - { - "data": { - "foo": { - "bar": 1 } }, - "data_pointer": "", + "type": "number" + } + ], + [ + { + "data": 37, + "data_pointer": "/toString/length", "schema": { "type": "string" }, - "schema_pointer": "/$defs/myobject/anyOf/0", + "schema_pointer": "/properties/toString/properties/length", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", - "$defs": { - "myobject": { - "$id": "myobject.json", - "$recursiveAnchor": false, - "anyOf": [ - { + "properties": { + "__proto__": { + "type": "number" + }, + "toString": { + "properties": { + "length": { "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } } - ] - } - }, + } + }, + "constructor": { + "type": "number" + } + } + }, + "type": "string" + } + ], + [ + { + "data": { + "length": 37 + }, + "data_pointer": "/constructor", + "schema": { + "type": "number" + }, + "schema_pointer": "/properties/constructor", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "properties": { + "__proto__": { + "type": "number" + }, + "toString": { + "properties": { + "length": { + "type": "string" + } + } + }, + "constructor": { + "type": "number" + } + } + }, + "type": "number" + } + ], + [ + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/propertyNames.json": [ + [ + [ + + ], + [ + { + "data": "foobar", + "data_pointer": "", + "schema": { + "maxLength": 3 + }, + "schema_pointer": "/propertyNames", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "propertyNames": { + "maxLength": 3 + } + }, + "type": "maxLength" + } + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + { + "data": "aaA", + "data_pointer": "", + "schema": { + "pattern": "^a+$" + }, + "schema_pointer": "/propertyNames", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "propertyNames": { + "pattern": "^a+$" + } + }, + "type": "pattern" + } + ], + [ + + ] + ], + [ + [ + + ], + [ + + ] + ], + [ + [ + { + "data": "foo", + "data_pointer": "", + "schema": false, + "schema_pointer": "/propertyNames", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "propertyNames": false + }, + "type": "schema" + } + ], + [ + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/recursiveRef.json": [ + [ + [ + + ], + [ + + ], + [ + { + "data": false, + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/additionalProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "properties": { + "foo": { + "$recursiveRef": "#" + } + }, + "additionalProperties": false + }, + "type": "schema" + } + ], + [ + { + "data": false, + "data_pointer": "/foo/bar", + "schema": false, + "schema_pointer": "/additionalProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "properties": { + "foo": { + "$recursiveRef": "#" + } + }, + "additionalProperties": false + }, + "type": "schema" + } + ] + ], + [ + [ + + ], + [ + + ], + [ + { + "data": { + "foo": 1 + }, + "data_pointer": "", + "schema": { + "type": "integer" + }, + "schema_pointer": "/anyOf/0", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } + }, "anyOf": [ { "type": "integer" @@ -17171,24 +16969,24 @@ } ] }, - "type": "string" + "type": "integer" }, { "data": { - "bar": 1 + "foo": 1 }, - "data_pointer": "/foo", + "data_pointer": "", "schema": { "type": "string" }, "schema_pointer": "/$defs/myobject/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", + "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", "$defs": { "myobject": { "$id": "myobject.json", - "$recursiveAnchor": false, + "$recursiveAnchor": true, "anyOf": [ { "type": "string" @@ -17215,18 +17013,18 @@ }, { "data": 1, - "data_pointer": "/foo/bar", + "data_pointer": "/foo", "schema": { "type": "string" }, "schema_pointer": "/$defs/myobject/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", + "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", "$defs": { "myobject": { "$id": "myobject.json", - "$recursiveAnchor": false, + "$recursiveAnchor": true, "anyOf": [ { "type": "string" @@ -17253,7 +17051,7 @@ }, { "data": 1, - "data_pointer": "/foo/bar", + "data_pointer": "/foo", "schema": { "type": "object", "additionalProperties": { @@ -17263,11 +17061,11 @@ "schema_pointer": "/$defs/myobject/anyOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", + "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", "$defs": { "myobject": { "$id": "myobject.json", - "$recursiveAnchor": false, + "$recursiveAnchor": true, "anyOf": [ { "type": "string" @@ -17292,250 +17090,175 @@ }, "type": "object" } - ] - ], - [ + ], + [ + + ], [ { "data": { - "foo": true + "foo": { + "bar": 1 + } }, "data_pointer": "", "schema": { - "type": "boolean" + "type": "integer" }, "schema_pointer": "/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef6/base.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "object", - "additionalProperties": { - "$id": "http://localhost:4242/draft2019-09/recursiveRef6/inner.json", - "$comment": "there is no $recursiveAnchor: true here, so we do NOT recurse to the base", - "anyOf": [ - { - "type": "integer" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } + "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" } - ] - } + } + ] } - ] - }, - "type": "boolean" - }, - { - "data": true, - "data_pointer": "/foo", - "schema": { - "type": "integer" - }, - "schema_pointer": "/anyOf/1/additionalProperties/anyOf/0", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef6/base.json", - "$recursiveAnchor": true, + }, "anyOf": [ { - "type": "boolean" + "type": "integer" }, { - "type": "object", - "additionalProperties": { - "$id": "http://localhost:4242/draft2019-09/recursiveRef6/inner.json", - "$comment": "there is no $recursiveAnchor: true here, so we do NOT recurse to the base", - "anyOf": [ - { - "type": "integer" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } + "$ref": "#/$defs/myobject" } ] }, "type": "integer" }, - { - "data": true, - "data_pointer": "/foo", - "schema": { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - }, - "schema_pointer": "/anyOf/1/additionalProperties/anyOf/1", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef6/base.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "object", - "additionalProperties": { - "$id": "http://localhost:4242/draft2019-09/recursiveRef6/inner.json", - "$comment": "there is no $recursiveAnchor: true here, so we do NOT recurse to the base", - "anyOf": [ - { - "type": "integer" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } - } - ] - }, - "type": "object" - } - ], - [ - - ], - [ { "data": { "foo": { - "bar": true + "bar": 1 } }, "data_pointer": "", "schema": { - "type": "boolean" + "type": "string" }, - "schema_pointer": "/anyOf/0", + "schema_pointer": "/$defs/myobject/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef6/base.json", - "$recursiveAnchor": true, + "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } + }, "anyOf": [ { - "type": "boolean" + "type": "integer" }, { - "type": "object", - "additionalProperties": { - "$id": "http://localhost:4242/draft2019-09/recursiveRef6/inner.json", - "$comment": "there is no $recursiveAnchor: true here, so we do NOT recurse to the base", - "anyOf": [ - { - "type": "integer" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } + "$ref": "#/$defs/myobject" } ] }, - "type": "boolean" + "type": "string" }, { "data": { - "bar": true + "bar": 1 }, "data_pointer": "/foo", "schema": { - "type": "integer" + "type": "string" }, - "schema_pointer": "/anyOf/1/additionalProperties/anyOf/0", + "schema_pointer": "/$defs/myobject/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef6/base.json", - "$recursiveAnchor": true, + "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } + }, "anyOf": [ { - "type": "boolean" + "type": "integer" }, { - "type": "object", - "additionalProperties": { - "$id": "http://localhost:4242/draft2019-09/recursiveRef6/inner.json", - "$comment": "there is no $recursiveAnchor: true here, so we do NOT recurse to the base", - "anyOf": [ - { - "type": "integer" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } + "$ref": "#/$defs/myobject" } ] }, - "type": "integer" + "type": "string" }, { - "data": true, + "data": 1, "data_pointer": "/foo/bar", "schema": { - "type": "integer" + "type": "string" }, - "schema_pointer": "/anyOf/1/additionalProperties/anyOf/0", + "schema_pointer": "/$defs/myobject/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef6/base.json", - "$recursiveAnchor": true, + "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } + }, "anyOf": [ { - "type": "boolean" + "type": "integer" }, { - "type": "object", - "additionalProperties": { - "$id": "http://localhost:4242/draft2019-09/recursiveRef6/inner.json", - "$comment": "there is no $recursiveAnchor: true here, so we do NOT recurse to the base", - "anyOf": [ - { - "type": "integer" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } + "$ref": "#/$defs/myobject" } ] }, - "type": "integer" + "type": "string" }, { - "data": true, + "data": 1, "data_pointer": "/foo/bar", "schema": { "type": "object", @@ -17543,32 +17266,33 @@ "$recursiveRef": "#" } }, - "schema_pointer": "/anyOf/1/additionalProperties/anyOf/1", + "schema_pointer": "/$defs/myobject/anyOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef6/base.json", - "$recursiveAnchor": true, + "$id": "http://localhost:4242/draft2019-09/recursiveRef2/schema.json", + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } + }, "anyOf": [ { - "type": "boolean" + "type": "integer" }, { - "type": "object", - "additionalProperties": { - "$id": "http://localhost:4242/draft2019-09/recursiveRef6/inner.json", - "$comment": "there is no $recursiveAnchor: true here, so we do NOT recurse to the base", - "anyOf": [ - { - "type": "integer" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } + "$ref": "#/$defs/myobject" } ] }, @@ -17577,83 +17301,153 @@ ] ], [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + + ], [ { "data": { - "foo": true + "foo": 1 }, "data_pointer": "", "schema": { - "type": "boolean" + "type": "integer" }, "schema_pointer": "/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef7/base.json", + "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", + "$recursiveAnchor": false, + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } + }, "anyOf": [ { - "type": "boolean" + "type": "integer" }, { - "type": "object", - "additionalProperties": { - "$id": "http://localhost:4242/draft2019-09/recursiveRef7/inner.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "integer" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } + "$ref": "#/$defs/myobject" + } + ] + }, + "type": "integer" + }, + { + "data": { + "foo": 1 + }, + "data_pointer": "", + "schema": { + "type": "string" + }, + "schema_pointer": "/$defs/myobject/anyOf/0", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", + "$recursiveAnchor": false, + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" } - ] - } + } + ] + } + }, + "anyOf": [ + { + "type": "integer" + }, + { + "$ref": "#/$defs/myobject" } ] }, - "type": "boolean" + "type": "string" }, { - "data": true, + "data": 1, "data_pointer": "/foo", "schema": { - "type": "integer" + "type": "string" }, - "schema_pointer": "/anyOf/1/additionalProperties/anyOf/0", + "schema_pointer": "/$defs/myobject/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef7/base.json", + "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", + "$recursiveAnchor": false, + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } + }, "anyOf": [ { - "type": "boolean" + "type": "integer" }, { - "type": "object", - "additionalProperties": { - "$id": "http://localhost:4242/draft2019-09/recursiveRef7/inner.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "integer" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } + "$ref": "#/$defs/myobject" } ] }, - "type": "integer" + "type": "string" }, { - "data": true, + "data": 1, "data_pointer": "/foo", "schema": { "type": "object", @@ -17661,31 +17455,34 @@ "$recursiveRef": "#" } }, - "schema_pointer": "/anyOf/1/additionalProperties/anyOf/1", + "schema_pointer": "/$defs/myobject/anyOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef7/base.json", + "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", + "$recursiveAnchor": false, + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } + }, "anyOf": [ { - "type": "boolean" + "type": "integer" }, { - "type": "object", - "additionalProperties": { - "$id": "http://localhost:4242/draft2019-09/recursiveRef7/inner.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "integer" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } + "$ref": "#/$defs/myobject" } ] }, @@ -17699,119 +17496,171 @@ { "data": { "foo": { - "bar": true + "bar": 1 } }, "data_pointer": "", "schema": { - "type": "boolean" + "type": "integer" }, "schema_pointer": "/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef7/base.json", - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "object", - "additionalProperties": { - "$id": "http://localhost:4242/draft2019-09/recursiveRef7/inner.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "integer" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } + "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", + "$recursiveAnchor": false, + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" } - ] - } + } + ] + } + }, + "anyOf": [ + { + "type": "integer" + }, + { + "$ref": "#/$defs/myobject" } ] }, - "type": "boolean" + "type": "integer" }, { "data": { - "bar": true + "foo": { + "bar": 1 + } }, - "data_pointer": "/foo", + "data_pointer": "", "schema": { - "type": "integer" + "type": "string" }, - "schema_pointer": "/anyOf/1/additionalProperties/anyOf/0", + "schema_pointer": "/$defs/myobject/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef7/base.json", + "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", + "$recursiveAnchor": false, + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } + }, "anyOf": [ { - "type": "boolean" + "type": "integer" }, { - "type": "object", - "additionalProperties": { - "$id": "http://localhost:4242/draft2019-09/recursiveRef7/inner.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "integer" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } + "$ref": "#/$defs/myobject" + } + ] + }, + "type": "string" + }, + { + "data": { + "bar": 1 + }, + "data_pointer": "/foo", + "schema": { + "type": "string" + }, + "schema_pointer": "/$defs/myobject/anyOf/0", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", + "$recursiveAnchor": false, + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" } - ] - } + } + ] + } + }, + "anyOf": [ + { + "type": "integer" + }, + { + "$ref": "#/$defs/myobject" } ] }, - "type": "integer" + "type": "string" }, { - "data": true, + "data": 1, "data_pointer": "/foo/bar", "schema": { - "type": "integer" + "type": "string" }, - "schema_pointer": "/anyOf/1/additionalProperties/anyOf/0", + "schema_pointer": "/$defs/myobject/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef7/base.json", + "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", + "$recursiveAnchor": false, + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } + }, "anyOf": [ { - "type": "boolean" + "type": "integer" }, { - "type": "object", - "additionalProperties": { - "$id": "http://localhost:4242/draft2019-09/recursiveRef7/inner.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "integer" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } + "$ref": "#/$defs/myobject" } ] }, - "type": "integer" + "type": "string" }, { - "data": true, + "data": 1, "data_pointer": "/foo/bar", "schema": { "type": "object", @@ -17819,31 +17668,34 @@ "$recursiveRef": "#" } }, - "schema_pointer": "/anyOf/1/additionalProperties/anyOf/1", + "schema_pointer": "/$defs/myobject/anyOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:4242/draft2019-09/recursiveRef7/base.json", + "$id": "http://localhost:4242/draft2019-09/recursiveRef4/schema.json", + "$recursiveAnchor": false, + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } + }, "anyOf": [ { - "type": "boolean" + "type": "integer" }, { - "type": "object", - "additionalProperties": { - "$id": "http://localhost:4242/draft2019-09/recursiveRef7/inner.json", - "$recursiveAnchor": true, - "anyOf": [ - { - "type": "integer" - }, - { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - } - ] - } + "$ref": "#/$defs/myobject" } ] }, @@ -17854,997 +17706,1096 @@ [ [ + ], + [ + ], [ { - "data": 1.1, - "data_pointer": "/november", + "data": { + "foo": 1 + }, + "data_pointer": "", "schema": { - "title": "integer node", - "$id": "recursiveRef8_integerNode.json", - "$recursiveAnchor": true, - "type": [ - "object", - "integer" - ], - "$ref": "recursiveRef8_inner.json" + "type": "integer" }, - "schema_pointer": "/else", + "schema_pointer": "/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://example.com/recursiveRef8_main.json", + "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", "$defs": { - "inner": { - "$id": "recursiveRef8_inner.json", - "$recursiveAnchor": true, - "title": "inner", - "additionalProperties": { - "$recursiveRef": "#" - } + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] } }, - "if": { - "propertyNames": { - "pattern": "^[a-m]" + "anyOf": [ + { + "type": "integer" + }, + { + "$ref": "#/$defs/myobject" } - }, - "then": { - "title": "any type of node", - "$id": "recursiveRef8_anyLeafNode.json", - "$recursiveAnchor": true, - "$ref": "recursiveRef8_inner.json" - }, - "else": { - "title": "integer node", - "$id": "recursiveRef8_integerNode.json", - "$recursiveAnchor": true, - "type": [ - "object", - "integer" - ], - "$ref": "recursiveRef8_inner.json" - } + ] }, - "type": "type" - } - ] - ], - [ - [ - - ], - [ + "type": "integer" + }, { - "data": 1.1, - "data_pointer": "/november", + "data": { + "foo": 1 + }, + "data_pointer": "", "schema": { - "title": "integer node", - "$id": "integerNode.json", - "$recursiveAnchor": true, - "type": [ - "object", - "integer" - ], - "$ref": "main.json#/$defs/inner" + "type": "string" }, - "schema_pointer": "/else", + "schema_pointer": "/$defs/myobject/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://example.com/main.json", + "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", "$defs": { - "inner": { - "$id": "inner.json", - "$recursiveAnchor": true, - "title": "inner", - "additionalProperties": { - "$recursiveRef": "#" - } + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] } }, - "if": { - "propertyNames": { - "pattern": "^[a-m]" + "anyOf": [ + { + "type": "integer" + }, + { + "$ref": "#/$defs/myobject" } - }, - "then": { - "title": "any type of node", - "$id": "anyLeafNode.json", - "$recursiveAnchor": true, - "$ref": "main.json#/$defs/inner" - }, - "else": { - "title": "integer node", - "$id": "integerNode.json", - "$recursiveAnchor": true, - "type": [ - "object", - "integer" - ], - "$ref": "main.json#/$defs/inner" - } + ] }, - "type": "type" - } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/ref.json": [ - [ - [ - - ], - [ - - ], - [ + "type": "string" + }, { - "data": false, - "data_pointer": "/bar", - "schema": false, - "schema_pointer": "/additionalProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "$ref": "#" - } - }, - "additionalProperties": false + "data": 1, + "data_pointer": "/foo", + "schema": { + "type": "string" }, - "type": "schema" - } - ], - [ - { - "data": false, - "data_pointer": "/foo/bar", - "schema": false, - "schema_pointer": "/additionalProperties", + "schema_pointer": "/$defs/myobject/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "$ref": "#" + "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] } }, - "additionalProperties": false - }, - "type": "schema" - } - ] - ], - [ - [ - - ], - [ - { - "data": true, - "data_pointer": "/bar", - "schema": { - "type": "integer" - }, - "schema_pointer": "/properties/foo", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { + "anyOf": [ + { "type": "integer" }, - "bar": { - "$ref": "#/properties/foo" + { + "$ref": "#/$defs/myobject" } - } + ] }, - "type": "integer" - } - ] - ], - [ - [ - - ], - [ + "type": "string" + }, { - "data": "foo", - "data_pointer": "/1", + "data": 1, + "data_pointer": "/foo", "schema": { - "type": "integer" + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } }, - "schema_pointer": "/items/0", + "schema_pointer": "/$defs/myobject/anyOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ + "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", + "$defs": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } + }, + "anyOf": [ { "type": "integer" }, { - "$ref": "#/items/0" + "$ref": "#/$defs/myobject" } ] }, - "type": "integer" + "type": "object" } - ] - ], - [ + ], + [ + + ], [ { - "data": "aoeu", - "data_pointer": "/slash", + "data": { + "foo": { + "bar": 1 + } + }, + "data_pointer": "", "schema": { "type": "integer" }, - "schema_pointer": "/$defs/slash~1field", + "schema_pointer": "/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", "$defs": { - "tilde~field": { - "type": "integer" - }, - "slash/field": { - "type": "integer" - }, - "percent%field": { - "type": "integer" + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] } }, - "properties": { - "tilde": { - "$ref": "#/$defs/tilde~0field" - }, - "slash": { - "$ref": "#/$defs/slash~1field" + "anyOf": [ + { + "type": "integer" }, - "percent": { - "$ref": "#/$defs/percent%25field" + { + "$ref": "#/$defs/myobject" } - } + ] }, "type": "integer" - } - ], - [ + }, { - "data": "aoeu", - "data_pointer": "/tilde", + "data": { + "foo": { + "bar": 1 + } + }, + "data_pointer": "", "schema": { - "type": "integer" + "type": "string" }, - "schema_pointer": "/$defs/tilde~0field", + "schema_pointer": "/$defs/myobject/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", "$defs": { - "tilde~field": { - "type": "integer" - }, - "slash/field": { - "type": "integer" - }, - "percent%field": { - "type": "integer" + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] } }, - "properties": { - "tilde": { - "$ref": "#/$defs/tilde~0field" - }, - "slash": { - "$ref": "#/$defs/slash~1field" + "anyOf": [ + { + "type": "integer" }, - "percent": { - "$ref": "#/$defs/percent%25field" + { + "$ref": "#/$defs/myobject" } - } + ] }, - "type": "integer" - } - ], - [ + "type": "string" + }, { - "data": "aoeu", - "data_pointer": "/percent", + "data": { + "bar": 1 + }, + "data_pointer": "/foo", "schema": { - "type": "integer" + "type": "string" }, - "schema_pointer": "/$defs/percent%field", + "schema_pointer": "/$defs/myobject/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", "$defs": { - "tilde~field": { - "type": "integer" - }, - "slash/field": { - "type": "integer" - }, - "percent%field": { - "type": "integer" + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] } }, - "properties": { - "tilde": { - "$ref": "#/$defs/tilde~0field" - }, - "slash": { - "$ref": "#/$defs/slash~1field" + "anyOf": [ + { + "type": "integer" }, - "percent": { - "$ref": "#/$defs/percent%25field" + { + "$ref": "#/$defs/myobject" } - } + ] }, - "type": "integer" - } - ], - [ - - ], - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ + "type": "string" + }, { - "data": "a", - "data_pointer": "", + "data": 1, + "data_pointer": "/foo/bar", "schema": { - "type": "integer" + "type": "string" }, - "schema_pointer": "/$defs/a", + "schema_pointer": "/$defs/myobject/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", "$defs": { - "a": { + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } + }, + "anyOf": [ + { "type": "integer" }, - "b": { - "$ref": "#/$defs/a" - }, - "c": { - "$ref": "#/$defs/b" + { + "$ref": "#/$defs/myobject" } - }, - "$ref": "#/$defs/c" + ] }, - "type": "integer" - } - ] - ], - [ - [ - - ], - [ + "type": "string" + }, { - "data": [ - 1, - 2, - 3 - ], - "data_pointer": "/foo", + "data": 1, + "data_pointer": "/foo/bar", "schema": { - "$ref": "#/$defs/reffed", - "maxItems": 2 + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } }, - "schema_pointer": "/properties/foo", + "schema_pointer": "/$defs/myobject/anyOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "http://localhost:4242/draft2019-09/recursiveRef5/schema.json", "$defs": { - "reffed": { - "type": "array" + "myobject": { + "$id": "myobject.json", + "$recursiveAnchor": false, + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] } }, - "properties": { - "foo": { - "$ref": "#/$defs/reffed", - "maxItems": 2 - } - } - }, - "type": "maxItems" - } - ], - [ - { - "data": "string", - "data_pointer": "/foo", - "schema": { - "type": "array" - }, - "schema_pointer": "/$defs/reffed", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "reffed": { - "type": "array" - } - }, - "properties": { - "foo": { - "$ref": "#/$defs/reffed", - "maxItems": 2 + "anyOf": [ + { + "type": "integer" + }, + { + "$ref": "#/$defs/myobject" } - } + ] }, - "type": "array" + "type": "object" } ] ], [ - [ - - ], [ { - "data": -1, - "data_pointer": "/minLength", + "data": { + "foo": true + }, + "data_pointer": "", "schema": { - "type": "integer", - "minimum": 0 + "type": "boolean" }, - "schema_pointer": "/$defs/nonNegativeInteger", + "schema_pointer": "/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/meta/validation", + "$id": "http://localhost:4242/draft2019-09/recursiveRef6/base.json", "$recursiveAnchor": true, - "title": "Validation vocabulary meta-schema", - "type": [ - "object", - "boolean" - ], - "properties": { - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { - "$ref": "#/$defs/nonNegativeInteger" - }, - "minLength": { - "$ref": "#/$defs/nonNegativeIntegerDefault0" - }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { - "$ref": "#/$defs/nonNegativeInteger" - }, - "minItems": { - "$ref": "#/$defs/nonNegativeIntegerDefault0" - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxContains": { - "$ref": "#/$defs/nonNegativeInteger" - }, - "minContains": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 1 - }, - "maxProperties": { - "$ref": "#/$defs/nonNegativeInteger" - }, - "minProperties": { - "$ref": "#/$defs/nonNegativeIntegerDefault0" - }, - "required": { - "$ref": "#/$defs/stringArray" + "anyOf": [ + { + "type": "boolean" }, - "dependentRequired": { + { "type": "object", "additionalProperties": { - "$ref": "#/$defs/stringArray" - } - }, - "const": true, - "enum": { - "type": "array", - "items": true - }, - "type": { - "anyOf": [ - { - "$ref": "#/$defs/simpleTypes" - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/simpleTypes" + "$id": "http://localhost:4242/draft2019-09/recursiveRef6/inner.json", + "$comment": "there is no $recursiveAnchor: true here, so we do NOT recurse to the base", + "anyOf": [ + { + "type": "integer" }, - "minItems": 1, - "uniqueItems": true - } - ] - } - }, - "$defs": { - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 0 - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [ - - ] + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } } - } + ] }, - "type": "minimum" - } - ] - ], - [ - [ - - ], - [ + "type": "boolean" + }, { - "data": 2, - "data_pointer": "/$ref", + "data": true, + "data_pointer": "/foo", "schema": { - "type": "string" + "type": "integer" }, - "schema_pointer": "/properties/$ref", + "schema_pointer": "/anyOf/1/additionalProperties/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "$ref": { - "type": "string" + "$id": "http://localhost:4242/draft2019-09/recursiveRef6/base.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "additionalProperties": { + "$id": "http://localhost:4242/draft2019-09/recursiveRef6/inner.json", + "$comment": "there is no $recursiveAnchor: true here, so we do NOT recurse to the base", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } } - } + ] }, - "type": "string" - } - ] - ], - [ - [ - - ], - [ + "type": "integer" + }, { - "data": 2, - "data_pointer": "/$ref", + "data": true, + "data_pointer": "/foo", "schema": { - "type": "string" + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } }, - "schema_pointer": "/$defs/is-string", + "schema_pointer": "/anyOf/1/additionalProperties/anyOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "$ref": { - "$ref": "#/$defs/is-string" - } - }, - "$defs": { - "is-string": { - "type": "string" - } - } + "$id": "http://localhost:4242/draft2019-09/recursiveRef6/base.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "additionalProperties": { + "$id": "http://localhost:4242/draft2019-09/recursiveRef6/inner.json", + "$comment": "there is no $recursiveAnchor: true here, so we do NOT recurse to the base", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } + } + ] }, - "type": "string" + "type": "object" } - ] - ], - [ + ], [ - ] - ], - [ + ], [ { - "data": "foo", + "data": { + "foo": { + "bar": true + } + }, "data_pointer": "", - "schema": false, - "schema_pointer": "/$defs/bool", + "schema": { + "type": "boolean" + }, + "schema_pointer": "/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "#/$defs/bool", - "$defs": { - "bool": false - } + "$id": "http://localhost:4242/draft2019-09/recursiveRef6/base.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "additionalProperties": { + "$id": "http://localhost:4242/draft2019-09/recursiveRef6/inner.json", + "$comment": "there is no $recursiveAnchor: true here, so we do NOT recurse to the base", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } + } + ] }, - "type": "schema" - } - ] - ], - [ - [ - - ], - [ + "type": "boolean" + }, { - "data": "string is invalid", - "data_pointer": "/nodes/0/subtree/nodes/0/value", + "data": { + "bar": true + }, + "data_pointer": "/foo", "schema": { - "type": "number" + "type": "integer" }, - "schema_pointer": "/$defs/node/properties/value", + "schema_pointer": "/anyOf/1/additionalProperties/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:1234/draft2019-09/tree", - "description": "tree of nodes", - "type": "object", - "properties": { - "meta": { - "type": "string" + "$id": "http://localhost:4242/draft2019-09/recursiveRef6/base.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "boolean" }, - "nodes": { - "type": "array", - "items": { - "$ref": "node" + { + "type": "object", + "additionalProperties": { + "$id": "http://localhost:4242/draft2019-09/recursiveRef6/inner.json", + "$comment": "there is no $recursiveAnchor: true here, so we do NOT recurse to the base", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] } } - }, - "required": [ - "meta", - "nodes" - ], - "$defs": { - "node": { - "$id": "http://localhost:1234/draft2019-09/node", - "description": "node", + ] + }, + "type": "integer" + }, + { + "data": true, + "data_pointer": "/foo/bar", + "schema": { + "type": "integer" + }, + "schema_pointer": "/anyOf/1/additionalProperties/anyOf/0", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "http://localhost:4242/draft2019-09/recursiveRef6/base.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "boolean" + }, + { "type": "object", - "properties": { - "value": { - "type": "number" - }, - "subtree": { - "$ref": "tree" - } - }, - "required": [ - "value" - ] + "additionalProperties": { + "$id": "http://localhost:4242/draft2019-09/recursiveRef6/inner.json", + "$comment": "there is no $recursiveAnchor: true here, so we do NOT recurse to the base", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } } - } + ] }, - "type": "number" - } - ] - ], - [ - [ - - ], - [ + "type": "integer" + }, { - "data": "1", - "data_pointer": "/foo\"bar", + "data": true, + "data_pointer": "/foo/bar", "schema": { - "type": "number" + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } }, - "schema_pointer": "/$defs/foo\"bar", + "schema_pointer": "/anyOf/1/additionalProperties/anyOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo\"bar": { - "$ref": "#/$defs/foo%22bar" - } - }, - "$defs": { - "foo\"bar": { - "type": "number" + "$id": "http://localhost:4242/draft2019-09/recursiveRef6/base.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "additionalProperties": { + "$id": "http://localhost:4242/draft2019-09/recursiveRef6/inner.json", + "$comment": "there is no $recursiveAnchor: true here, so we do NOT recurse to the base", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } } - } + ] }, - "type": "number" + "type": "object" } ] ], [ [ { - "data": "match", - "data_pointer": "/prop1", - "schema": false, - "schema_pointer": "/$defs/A/unevaluatedProperties", + "data": { + "foo": true + }, + "data_pointer": "", + "schema": { + "type": "boolean" + }, + "schema_pointer": "/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "A": { - "unevaluatedProperties": false - } - }, - "properties": { - "prop1": { - "type": "string" + "$id": "http://localhost:4242/draft2019-09/recursiveRef7/base.json", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "additionalProperties": { + "$id": "http://localhost:4242/draft2019-09/recursiveRef7/inner.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "integer" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } } - }, - "$ref": "#/$defs/A" + ] }, - "type": "schema" - } - ] - ], - [ - [ + "type": "boolean" + }, { - "data": "this is a string", - "data_pointer": "", + "data": true, + "data_pointer": "/foo", "schema": { + "type": "integer" + }, + "schema_pointer": "/anyOf/1/additionalProperties/anyOf/0", + "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "a_string": { - "type": "string" - } - }, - "enum": [ + "$id": "http://localhost:4242/draft2019-09/recursiveRef7/base.json", + "anyOf": [ { - "$ref": "#/$defs/a_string" + "type": "boolean" + }, + { + "type": "object", + "additionalProperties": { + "$id": "http://localhost:4242/draft2019-09/recursiveRef7/inner.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "integer" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } } ] }, - "schema_pointer": "", + "type": "integer" + }, + { + "data": true, + "data_pointer": "/foo", + "schema": { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + }, + "schema_pointer": "/anyOf/1/additionalProperties/anyOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "a_string": { - "type": "string" - } - }, - "enum": [ + "$id": "http://localhost:4242/draft2019-09/recursiveRef7/base.json", + "anyOf": [ { - "$ref": "#/$defs/a_string" + "type": "boolean" + }, + { + "type": "object", + "additionalProperties": { + "$id": "http://localhost:4242/draft2019-09/recursiveRef7/inner.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "integer" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } } ] }, - "type": "enum" + "type": "object" } + ], + [ + ], [ { "data": { - "type": "string" + "foo": { + "bar": true + } }, "data_pointer": "", "schema": { + "type": "boolean" + }, + "schema_pointer": "/anyOf/0", + "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "a_string": { - "type": "string" - } - }, - "enum": [ + "$id": "http://localhost:4242/draft2019-09/recursiveRef7/base.json", + "anyOf": [ { - "$ref": "#/$defs/a_string" + "type": "boolean" + }, + { + "type": "object", + "additionalProperties": { + "$id": "http://localhost:4242/draft2019-09/recursiveRef7/inner.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "integer" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } } ] }, - "schema_pointer": "", + "type": "boolean" + }, + { + "data": { + "bar": true + }, + "data_pointer": "/foo", + "schema": { + "type": "integer" + }, + "schema_pointer": "/anyOf/1/additionalProperties/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "a_string": { - "type": "string" - } - }, - "enum": [ + "$id": "http://localhost:4242/draft2019-09/recursiveRef7/base.json", + "anyOf": [ { - "$ref": "#/$defs/a_string" + "type": "boolean" + }, + { + "type": "object", + "additionalProperties": { + "$id": "http://localhost:4242/draft2019-09/recursiveRef7/inner.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "integer" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } + } + ] + } } ] }, - "type": "enum" - } - ], - [ - - ] - ], - [ - [ + "type": "integer" + }, { - "data": 1, + "data": true, "data_pointer": "/foo/bar", "schema": { - "type": "string" + "type": "integer" }, - "schema_pointer": "/properties/foo/$defs/inner/properties/bar", + "schema_pointer": "/anyOf/1/additionalProperties/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://example.com/schema-relative-uri-defs1.json", - "properties": { - "foo": { - "$id": "schema-relative-uri-defs2.json", - "$defs": { - "inner": { - "properties": { - "bar": { - "type": "string" + "$id": "http://localhost:4242/draft2019-09/recursiveRef7/base.json", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "additionalProperties": { + "$id": "http://localhost:4242/draft2019-09/recursiveRef7/inner.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "integer" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" } } - } - }, - "$ref": "#/$defs/inner" + ] + } } - }, - "$ref": "schema-relative-uri-defs2.json" + ] }, - "type": "string" - } - ], - [ + "type": "integer" + }, { - "data": 1, - "data_pointer": "/bar", + "data": true, + "data_pointer": "/foo/bar", "schema": { - "type": "string" + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + } }, - "schema_pointer": "/properties/foo/$defs/inner/properties/bar", + "schema_pointer": "/anyOf/1/additionalProperties/anyOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://example.com/schema-relative-uri-defs1.json", - "properties": { - "foo": { - "$id": "schema-relative-uri-defs2.json", - "$defs": { - "inner": { - "properties": { - "bar": { - "type": "string" + "$id": "http://localhost:4242/draft2019-09/recursiveRef7/base.json", + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "object", + "additionalProperties": { + "$id": "http://localhost:4242/draft2019-09/recursiveRef7/inner.json", + "$recursiveAnchor": true, + "anyOf": [ + { + "type": "integer" + }, + { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" } } - } - }, - "$ref": "#/$defs/inner" + ] + } } - }, - "$ref": "schema-relative-uri-defs2.json" + ] }, - "type": "string" + "type": "object" } - ], - [ - ] ], [ + [ + + ], [ { - "data": 1, - "data_pointer": "/foo/bar", + "data": 1.1, + "data_pointer": "/november", "schema": { - "type": "string" + "title": "integer node", + "$id": "recursiveRef8_integerNode.json", + "$recursiveAnchor": true, + "type": [ + "object", + "integer" + ], + "$ref": "recursiveRef8_inner.json" }, - "schema_pointer": "/properties/foo/$defs/inner/properties/bar", + "schema_pointer": "/else", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://example.com/schema-refs-absolute-uris-defs1.json", - "properties": { - "foo": { - "$id": "http://example.com/schema-refs-absolute-uris-defs2.json", - "$defs": { - "inner": { - "properties": { - "bar": { - "type": "string" - } - } - } - }, - "$ref": "#/$defs/inner" + "$id": "https://example.com/recursiveRef8_main.json", + "$defs": { + "inner": { + "$id": "recursiveRef8_inner.json", + "$recursiveAnchor": true, + "title": "inner", + "additionalProperties": { + "$recursiveRef": "#" + } } }, - "$ref": "schema-refs-absolute-uris-defs2.json" + "if": { + "propertyNames": { + "pattern": "^[a-m]" + } + }, + "then": { + "title": "any type of node", + "$id": "recursiveRef8_anyLeafNode.json", + "$recursiveAnchor": true, + "$ref": "recursiveRef8_inner.json" + }, + "else": { + "title": "integer node", + "$id": "recursiveRef8_integerNode.json", + "$recursiveAnchor": true, + "type": [ + "object", + "integer" + ], + "$ref": "recursiveRef8_inner.json" + } }, - "type": "string" + "type": "type" } + ] + ], + [ + [ + ], [ { - "data": 1, - "data_pointer": "/bar", + "data": 1.1, + "data_pointer": "/november", "schema": { - "type": "string" + "title": "integer node", + "$id": "integerNode.json", + "$recursiveAnchor": true, + "type": [ + "object", + "integer" + ], + "$ref": "main.json#/$defs/inner" }, - "schema_pointer": "/properties/foo/$defs/inner/properties/bar", + "schema_pointer": "/else", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://example.com/schema-refs-absolute-uris-defs1.json", - "properties": { - "foo": { - "$id": "http://example.com/schema-refs-absolute-uris-defs2.json", - "$defs": { - "inner": { - "properties": { - "bar": { - "type": "string" - } - } - } - }, - "$ref": "#/$defs/inner" + "$id": "https://example.com/main.json", + "$defs": { + "inner": { + "$id": "inner.json", + "$recursiveAnchor": true, + "title": "inner", + "additionalProperties": { + "$recursiveRef": "#" + } } }, - "$ref": "schema-refs-absolute-uris-defs2.json" + "if": { + "propertyNames": { + "pattern": "^[a-m]" + } + }, + "then": { + "title": "any type of node", + "$id": "anyLeafNode.json", + "$recursiveAnchor": true, + "$ref": "main.json#/$defs/inner" + }, + "else": { + "title": "integer node", + "$id": "integerNode.json", + "$recursiveAnchor": true, + "type": [ + "object", + "integer" + ], + "$ref": "main.json#/$defs/inner" + } }, - "type": "string" + "type": "type" } - ], - [ - ] - ], + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/ref.json": [ [ [ + ], + [ + ], [ { - "data": "a", - "data_pointer": "", - "schema": { - "$id": "d.json", - "type": "number" - }, - "schema_pointer": "/$defs/x/not/$defs/y", + "data": false, + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/additionalProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://example.com/a.json", - "$defs": { - "x": { - "$id": "http://example.com/b/c.json", - "not": { - "$defs": { - "y": { - "$id": "d.json", - "type": "number" - } - } - } + "properties": { + "foo": { + "$ref": "#" } }, - "allOf": [ - { - "$ref": "http://example.com/b/d.json" + "additionalProperties": false + }, + "type": "schema" + } + ], + [ + { + "data": false, + "data_pointer": "/foo/bar", + "schema": false, + "schema_pointer": "/additionalProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "properties": { + "foo": { + "$ref": "#" } - ] + }, + "additionalProperties": false }, - "type": "number" + "type": "schema" } ] ], @@ -18854,33 +18805,24 @@ ], [ { - "data": 50, - "data_pointer": "", + "data": true, + "data_pointer": "/bar", "schema": { - "$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id1/int.json", - "$id": "int.json", - "maximum": 10 + "type": "integer" }, - "schema_pointer": "/$defs/bigint", + "schema_pointer": "/properties/foo", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$comment": "$id must be evaluated before $ref to get the proper $ref destination", - "$id": "https://example.com/draft2019-09/ref-and-id1/base.json", - "$ref": "int.json", - "$defs": { - "bigint": { - "$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id1/int.json", - "$id": "int.json", - "maximum": 10 + "properties": { + "foo": { + "type": "integer" }, - "smallint": { - "$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id1-int.json", - "$id": "/draft2019-09/ref-and-id1-int.json", - "maximum": 2 + "bar": { + "$ref": "#/properties/foo" } } }, - "type": "maximum" + "type": "integer" } ] ], @@ -18890,101 +18832,144 @@ ], [ { - "data": 50, - "data_pointer": "", + "data": "foo", + "data_pointer": "/1", "schema": { - "$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id2/base.json#/$defs/bigint; another valid uri for this location: https://example.com/ref-and-id2/base.json#bigint", - "$anchor": "bigint", - "maximum": 10 + "type": "integer" }, - "schema_pointer": "/$defs/bigint", + "schema_pointer": "/items/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$comment": "$id must be evaluated before $ref to get the proper $ref destination", - "$id": "https://example.com/draft2019-09/ref-and-id2/base.json", - "$ref": "#bigint", - "$defs": { - "bigint": { - "$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id2/base.json#/$defs/bigint; another valid uri for this location: https://example.com/ref-and-id2/base.json#bigint", - "$anchor": "bigint", - "maximum": 10 + "items": [ + { + "type": "integer" }, - "smallint": { - "$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id2#/$defs/smallint; another valid uri for this location: https://example.com/ref-and-id2/#bigint", - "$id": "/draft2019-09/ref-and-id2/", - "$anchor": "bigint", - "maximum": 2 + { + "$ref": "#/items/0" } - } + ] }, - "type": "maximum" + "type": "integer" } ] ], [ - [ - - ], [ { - "data": 12, - "data_pointer": "/foo", + "data": "aoeu", + "data_pointer": "/slash", "schema": { + "type": "integer" + }, + "schema_pointer": "/$defs/slash~1field", + "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$comment": "URIs do not have to have HTTP(s) schemes", - "$id": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed", - "minimum": 30, + "$defs": { + "tilde~field": { + "type": "integer" + }, + "slash/field": { + "type": "integer" + }, + "percent%field": { + "type": "integer" + } + }, "properties": { - "foo": { - "$ref": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed" + "tilde": { + "$ref": "#/$defs/tilde~0field" + }, + "slash": { + "$ref": "#/$defs/slash~1field" + }, + "percent": { + "$ref": "#/$defs/percent%25field" } } }, - "schema_pointer": "", + "type": "integer" + } + ], + [ + { + "data": "aoeu", + "data_pointer": "/tilde", + "schema": { + "type": "integer" + }, + "schema_pointer": "/$defs/tilde~0field", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$comment": "URIs do not have to have HTTP(s) schemes", - "$id": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed", - "minimum": 30, + "$defs": { + "tilde~field": { + "type": "integer" + }, + "slash/field": { + "type": "integer" + }, + "percent%field": { + "type": "integer" + } + }, "properties": { - "foo": { - "$ref": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed" + "tilde": { + "$ref": "#/$defs/tilde~0field" + }, + "slash": { + "$ref": "#/$defs/slash~1field" + }, + "percent": { + "$ref": "#/$defs/percent%25field" } } }, - "type": "minimum" + "type": "integer" } - ] - ], - [ - [ - ], [ { - "data": 12, - "data_pointer": "/foo", + "data": "aoeu", + "data_pointer": "/percent", "schema": { - "type": "string" + "type": "integer" }, - "schema_pointer": "/$defs/bar", + "schema_pointer": "/$defs/percent%field", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$comment": "URIs do not have to have HTTP(s) schemes", - "$id": "urn:uuid:deadbeef-1234-00ff-ff00-4321feebdaed", - "properties": { - "foo": { - "$ref": "#/$defs/bar" + "$defs": { + "tilde~field": { + "type": "integer" + }, + "slash/field": { + "type": "integer" + }, + "percent%field": { + "type": "integer" } }, - "$defs": { - "bar": { - "type": "string" + "properties": { + "tilde": { + "$ref": "#/$defs/tilde~0field" + }, + "slash": { + "$ref": "#/$defs/slash~1field" + }, + "percent": { + "$ref": "#/$defs/percent%25field" } } }, - "type": "string" + "type": "integer" } + ], + [ + + ], + [ + + ], + [ + ] ], [ @@ -18993,28 +18978,28 @@ ], [ { - "data": 12, - "data_pointer": "/foo", + "data": "a", + "data_pointer": "", "schema": { - "type": "string" + "type": "integer" }, - "schema_pointer": "/$defs/bar", + "schema_pointer": "/$defs/a", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$comment": "RFC 8141 §2.2", - "$id": "urn:example:1/406/47452/2", - "properties": { - "foo": { - "$ref": "#/$defs/bar" - } - }, "$defs": { - "bar": { - "type": "string" + "a": { + "type": "integer" + }, + "b": { + "$ref": "#/$defs/a" + }, + "c": { + "$ref": "#/$defs/b" } - } + }, + "$ref": "#/$defs/c" }, - "type": "string" + "type": "integer" } ] ], @@ -19024,134 +19009,195 @@ ], [ { - "data": 12, + "data": [ + 1, + 2, + 3 + ], "data_pointer": "/foo", "schema": { - "type": "string" + "$ref": "#/$defs/reffed", + "maxItems": 2 }, - "schema_pointer": "/$defs/bar", + "schema_pointer": "/properties/foo", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$comment": "RFC 8141 §2.3.1", - "$id": "urn:example:foo-bar-baz-qux?+CCResolve:cc=uk", - "properties": { - "foo": { - "$ref": "#/$defs/bar" + "$defs": { + "reffed": { + "type": "array" } }, - "$defs": { - "bar": { - "type": "string" + "properties": { + "foo": { + "$ref": "#/$defs/reffed", + "maxItems": 2 } } }, - "type": "string" + "type": "maxItems" } - ] - ], - [ - [ - ], [ { - "data": 12, + "data": "string", "data_pointer": "/foo", "schema": { - "type": "string" + "type": "array" }, - "schema_pointer": "/$defs/bar", + "schema_pointer": "/$defs/reffed", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$comment": "RFC 8141 §2.3.2", - "$id": "urn:example:weather?=op=map&lat=39.56&lon=-104.85&datetime=1969-07-21T02:56:15Z", - "properties": { - "foo": { - "$ref": "#/$defs/bar" + "$defs": { + "reffed": { + "type": "array" } }, - "$defs": { - "bar": { - "type": "string" + "properties": { + "foo": { + "$ref": "#/$defs/reffed", + "maxItems": 2 } } }, - "type": "string" + "type": "array" } ] ], [ + [ + + ], [ { - "data": "urn:example:foo-bar-baz-qux#somepart", - "data_pointer": "/$id", + "data": -1, + "data_pointer": "/minLength", "schema": { - "type": "string", - "format": "uri-reference", - "$comment": "Non-empty fragments not allowed.", - "pattern": "^[^#]*#?$" + "type": "integer", + "minimum": 0 }, - "schema_pointer": "/properties/$id", + "schema_pointer": "/$defs/nonNegativeInteger", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/meta/core", + "$id": "https://json-schema.org/draft/2019-09/meta/validation", "$recursiveAnchor": true, - "title": "Core vocabulary meta-schema", + "title": "Validation vocabulary meta-schema", "type": [ "object", "boolean" ], "properties": { - "$id": { - "type": "string", - "format": "uri-reference", - "$comment": "Non-empty fragments not allowed.", - "pattern": "^[^#]*#?$" + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 }, - "$schema": { - "type": "string", - "format": "uri" + "maximum": { + "type": "number" }, - "$anchor": { - "type": "string", - "pattern": "^[A-Za-z][-A-Za-z0-9.:_]*$" + "exclusiveMaximum": { + "type": "number" }, - "$ref": { - "type": "string", - "format": "uri-reference" + "minimum": { + "type": "number" }, - "$recursiveRef": { + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { + "$ref": "#/$defs/nonNegativeInteger" + }, + "minLength": { + "$ref": "#/$defs/nonNegativeIntegerDefault0" + }, + "pattern": { "type": "string", - "format": "uri-reference" + "format": "regex" }, - "$recursiveAnchor": { + "maxItems": { + "$ref": "#/$defs/nonNegativeInteger" + }, + "minItems": { + "$ref": "#/$defs/nonNegativeIntegerDefault0" + }, + "uniqueItems": { "type": "boolean", "default": false }, - "$vocabulary": { + "maxContains": { + "$ref": "#/$defs/nonNegativeInteger" + }, + "minContains": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 1 + }, + "maxProperties": { + "$ref": "#/$defs/nonNegativeInteger" + }, + "minProperties": { + "$ref": "#/$defs/nonNegativeIntegerDefault0" + }, + "required": { + "$ref": "#/$defs/stringArray" + }, + "dependentRequired": { "type": "object", - "propertyNames": { - "type": "string", - "format": "uri" - }, "additionalProperties": { - "type": "boolean" + "$ref": "#/$defs/stringArray" } }, - "$comment": { - "type": "string" + "const": true, + "enum": { + "type": "array", + "items": true }, - "$defs": { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" + "type": { + "anyOf": [ + { + "$ref": "#/$defs/simpleTypes" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true + } + ] + } + }, + "$defs": { + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 0 + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" }, - "default": { - } + "uniqueItems": true, + "default": [ + + ] } } }, - "type": "pattern" + "type": "minimum" } ] ], @@ -19161,22 +19207,16 @@ ], [ { - "data": 12, - "data_pointer": "/foo", + "data": 2, + "data_pointer": "/$ref", "schema": { "type": "string" }, - "schema_pointer": "/$defs/bar", + "schema_pointer": "/properties/$ref", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed", "properties": { - "foo": { - "$ref": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed#/$defs/bar" - } - }, - "$defs": { - "bar": { + "$ref": { "type": "string" } } @@ -19191,24 +19231,21 @@ ], [ { - "data": 12, - "data_pointer": "/foo", + "data": 2, + "data_pointer": "/$ref", "schema": { - "$anchor": "something", "type": "string" }, - "schema_pointer": "/$defs/bar", + "schema_pointer": "/$defs/is-string", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "urn:uuid:deadbeef-1234-ff00-00ff-4321feebdaed", "properties": { - "foo": { - "$ref": "urn:uuid:deadbeef-1234-ff00-00ff-4321feebdaed#something" + "$ref": { + "$ref": "#/$defs/is-string" } }, "$defs": { - "bar": { - "$anchor": "something", + "is-string": { "type": "string" } } @@ -19220,274 +19257,342 @@ [ [ - ], + ] + ], + [ [ { - "data": 12, + "data": "foo", "data_pointer": "", - "schema": { - "type": "string" - }, - "schema_pointer": "/$defs/foo/$defs/bar", + "schema": false, + "schema_pointer": "/$defs/bool", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed", + "$ref": "#/$defs/bool", "$defs": { - "foo": { - "$id": "urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed", - "$defs": { - "bar": { - "type": "string" - } - }, - "$ref": "#/$defs/bar" - } + "bool": false } }, - "type": "string" + "type": "schema" } ] ], [ + [ + + ], [ { - "data": "foo", - "data_pointer": "", + "data": "string is invalid", + "data_pointer": "/nodes/0/subtree/nodes/0/value", "schema": { - "$id": "http://example.com/ref/if", - "type": "integer" + "type": "number" }, - "schema_pointer": "/if", + "schema_pointer": "/$defs/node/properties/value", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "http://example.com/ref/if", - "if": { - "$id": "http://example.com/ref/if", - "type": "integer" + "$id": "http://localhost:1234/draft2019-09/tree", + "description": "tree of nodes", + "type": "object", + "properties": { + "meta": { + "type": "string" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "node" + } + } + }, + "required": [ + "meta", + "nodes" + ], + "$defs": { + "node": { + "$id": "http://localhost:1234/draft2019-09/node", + "description": "node", + "type": "object", + "properties": { + "value": { + "type": "number" + }, + "subtree": { + "$ref": "tree" + } + }, + "required": [ + "value" + ] + } } }, - "type": "integer" + "type": "number" } - ], - [ - ] ], [ + [ + + ], [ { - "data": "foo", - "data_pointer": "", + "data": "1", + "data_pointer": "/foo\"bar", "schema": { - "$id": "http://example.com/ref/then", - "type": "integer" + "type": "number" }, - "schema_pointer": "/then", + "schema_pointer": "/$defs/foo\"bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "http://example.com/ref/then", - "then": { - "$id": "http://example.com/ref/then", - "type": "integer" + "properties": { + "foo\"bar": { + "$ref": "#/$defs/foo%22bar" + } + }, + "$defs": { + "foo\"bar": { + "type": "number" + } } }, - "type": "integer" + "type": "number" } - ], - [ - ] ], [ [ { - "data": "foo", - "data_pointer": "", - "schema": { - "$id": "http://example.com/ref/else", - "type": "integer" - }, - "schema_pointer": "/else", + "data": "match", + "data_pointer": "/prop1", + "schema": false, + "schema_pointer": "/$defs/A/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "http://example.com/ref/else", - "else": { - "$id": "http://example.com/ref/else", - "type": "integer" - } + "$defs": { + "A": { + "unevaluatedProperties": false + } + }, + "properties": { + "prop1": { + "type": "string" + } + }, + "$ref": "#/$defs/A" }, - "type": "integer" + "type": "schema" } - ], - [ - ] ], [ - [ - - ], [ { - "data": 12, + "data": "this is a string", "data_pointer": "", "schema": { - "$id": "http://example.com/absref/foobar.json", - "type": "string" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$defs": { + "a_string": { + "type": "string" + } + }, + "enum": [ + { + "$ref": "#/$defs/a_string" + } + ] }, - "schema_pointer": "/$defs/b", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://example.com/ref/absref.json", "$defs": { - "a": { - "$id": "http://example.com/ref/absref/foobar.json", - "type": "number" - }, - "b": { - "$id": "http://example.com/absref/foobar.json", + "a_string": { "type": "string" } }, - "$ref": "/absref/foobar.json" + "enum": [ + { + "$ref": "#/$defs/a_string" + } + ] }, - "type": "string" + "type": "enum" } - ] - ], - [ - [ - ], [ { - "data": "a", + "data": { + "type": "string" + }, "data_pointer": "", "schema": { - "type": "number" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$defs": { + "a_string": { + "type": "string" + } + }, + "enum": [ + { + "$ref": "#/$defs/a_string" + } + ] }, - "schema_pointer": "/$defs/foo", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "file:///folder/file.json", "$defs": { - "foo": { - "type": "number" + "a_string": { + "type": "string" } }, - "$ref": "#/$defs/foo" + "enum": [ + { + "$ref": "#/$defs/a_string" + } + ] }, - "type": "number" + "type": "enum" } + ], + [ + ] ], [ - [ - - ], [ { - "data": "a", - "data_pointer": "", + "data": 1, + "data_pointer": "/foo/bar", "schema": { - "type": "number" + "type": "string" }, - "schema_pointer": "/$defs/foo", + "schema_pointer": "/properties/foo/$defs/inner/properties/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "file:///c:/folder/file.json", - "$defs": { + "$id": "http://example.com/schema-relative-uri-defs1.json", + "properties": { "foo": { - "type": "number" + "$id": "schema-relative-uri-defs2.json", + "$defs": { + "inner": { + "properties": { + "bar": { + "type": "string" + } + } + } + }, + "$ref": "#/$defs/inner" } }, - "$ref": "#/$defs/foo" + "$ref": "schema-relative-uri-defs2.json" }, - "type": "number" + "type": "string" } - ] - ], - [ - [ - ], [ { - "data": "a", - "data_pointer": "", + "data": 1, + "data_pointer": "/bar", "schema": { - "type": "number" + "type": "string" }, - "schema_pointer": "/$defs//$defs/", + "schema_pointer": "/properties/foo/$defs/inner/properties/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "": { + "$id": "http://example.com/schema-relative-uri-defs1.json", + "properties": { + "foo": { + "$id": "schema-relative-uri-defs2.json", "$defs": { - "": { - "type": "number" + "inner": { + "properties": { + "bar": { + "type": "string" + } + } } - } + }, + "$ref": "#/$defs/inner" } }, - "allOf": [ - { - "$ref": "#/$defs//$defs/" - } - ] + "$ref": "schema-relative-uri-defs2.json" }, - "type": "number" + "type": "string" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/refRemote.json": [ - [ + ], [ - ], + ] + ], + [ [ { - "data": "a", - "data_pointer": "", + "data": 1, + "data_pointer": "/foo/bar", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "integer" + "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/properties/foo/$defs/inner/properties/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "integer" + "$id": "http://example.com/schema-refs-absolute-uris-defs1.json", + "properties": { + "foo": { + "$id": "http://example.com/schema-refs-absolute-uris-defs2.json", + "$defs": { + "inner": { + "properties": { + "bar": { + "type": "string" + } + } + } + }, + "$ref": "#/$defs/inner" + } + }, + "$ref": "schema-refs-absolute-uris-defs2.json" }, - "type": "integer" + "type": "string" } - ] - ], - [ - [ - ], [ { - "data": "a", - "data_pointer": "", + "data": 1, + "data_pointer": "/bar", "schema": { - "type": "integer" + "type": "string" }, - "schema_pointer": "/$defs/integer", + "schema_pointer": "/properties/foo/$defs/inner/properties/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "integer": { - "type": "integer" - }, - "refToInteger": { - "$ref": "#/$defs/integer" + "$id": "http://example.com/schema-refs-absolute-uris-defs1.json", + "properties": { + "foo": { + "$id": "http://example.com/schema-refs-absolute-uris-defs2.json", + "$defs": { + "inner": { + "properties": { + "bar": { + "type": "string" + } + } + } + }, + "$ref": "#/$defs/inner" } - } + }, + "$ref": "schema-refs-absolute-uris-defs2.json" }, - "type": "integer" + "type": "string" } + ], + [ + ] ], [ @@ -19499,23 +19604,33 @@ "data": "a", "data_pointer": "", "schema": { - "$anchor": "foo", - "type": "integer" + "$id": "d.json", + "type": "number" }, - "schema_pointer": "/$defs/A", + "schema_pointer": "/$defs/x/not/$defs/y", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "http://example.com/a.json", "$defs": { - "refToInteger": { - "$ref": "#foo" - }, - "A": { - "$anchor": "foo", - "type": "integer" + "x": { + "$id": "http://example.com/b/c.json", + "not": { + "$defs": { + "y": { + "$id": "d.json", + "type": "number" + } + } + } } - } + }, + "allOf": [ + { + "$ref": "http://example.com/b/d.json" + } + ] }, - "type": "integer" + "type": "number" } ] ], @@ -19525,24 +19640,33 @@ ], [ { - "data": "a", + "data": 50, "data_pointer": "", "schema": { - "type": "integer" + "$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id1/int.json", + "$id": "int.json", + "maximum": 10 }, - "schema_pointer": "/$defs/integer", + "schema_pointer": "/$defs/bigint", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", + "$comment": "$id must be evaluated before $ref to get the proper $ref destination", + "$id": "https://example.com/draft2019-09/ref-and-id1/base.json", + "$ref": "int.json", "$defs": { - "integer": { - "type": "integer" + "bigint": { + "$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id1/int.json", + "$id": "int.json", + "maximum": 10 }, - "refToInteger": { - "$ref": "#/$defs/integer" + "smallint": { + "$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id1-int.json", + "$id": "/draft2019-09/ref-and-id1-int.json", + "maximum": 2 } } }, - "type": "integer" + "type": "maximum" } ] ], @@ -19552,18 +19676,34 @@ ], [ { - "data": "a", - "data_pointer": "/0/0", + "data": 50, + "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "integer" + "$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id2/base.json#/$defs/bigint; another valid uri for this location: https://example.com/ref-and-id2/base.json#bigint", + "$anchor": "bigint", + "maximum": 10 }, - "schema_pointer": "", + "schema_pointer": "/$defs/bigint", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "integer" + "$comment": "$id must be evaluated before $ref to get the proper $ref destination", + "$id": "https://example.com/draft2019-09/ref-and-id2/base.json", + "$ref": "#bigint", + "$defs": { + "bigint": { + "$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id2/base.json#/$defs/bigint; another valid uri for this location: https://example.com/ref-and-id2/base.json#bigint", + "$anchor": "bigint", + "maximum": 10 + }, + "smallint": { + "$comment": "canonical uri: https://example.com/draft2019-09/ref-and-id2#/$defs/smallint; another valid uri for this location: https://example.com/ref-and-id2/#bigint", + "$id": "/draft2019-09/ref-and-id2/", + "$anchor": "bigint", + "maximum": 2 + } + } }, - "type": "integer" + "type": "maximum" } ] ], @@ -19573,18 +19713,32 @@ ], [ { - "data": "a", - "data_pointer": "/list/0", + "data": 12, + "data_pointer": "/foo", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "integer" + "$comment": "URIs do not have to have HTTP(s) schemes", + "$id": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed", + "minimum": 30, + "properties": { + "foo": { + "$ref": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed" + } + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "integer" + "$comment": "URIs do not have to have HTTP(s) schemes", + "$id": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed", + "minimum": 30, + "properties": { + "foo": { + "$ref": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed" + } + } }, - "type": "integer" + "type": "minimum" } ] ], @@ -19594,223 +19748,312 @@ ], [ { - "data": "a", - "data_pointer": "/list/0", + "data": 12, + "data_pointer": "/foo", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "integer" + "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/$defs/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "integer" + "$comment": "URIs do not have to have HTTP(s) schemes", + "$id": "urn:uuid:deadbeef-1234-00ff-ff00-4321feebdaed", + "properties": { + "foo": { + "$ref": "#/$defs/bar" + } + }, + "$defs": { + "bar": { + "type": "string" + } + } }, - "type": "integer" + "type": "string" } ] ], [ [ - ], - [ - ], [ { - "data": { - "name": null - }, - "data_pointer": "/name", + "data": 12, + "data_pointer": "/foo", "schema": { - "type": "null" + "type": "string" }, - "schema_pointer": "/$defs/orNull/anyOf/0", + "schema_pointer": "/$defs/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "orNull": { - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#" - } - ] + "$comment": "RFC 8141 §2.2", + "$id": "urn:example:1/406/47452/2", + "properties": { + "foo": { + "$ref": "#/$defs/bar" } }, - "type": "string" + "$defs": { + "bar": { + "type": "string" + } + } }, - "type": "null" - }, + "type": "string" + } + ] + ], + [ + [ + + ], + [ { - "data": { - "name": null - }, - "data_pointer": "/name", + "data": 12, + "data_pointer": "/foo", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "orNull": { - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#" - } - ] - } - }, "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/$defs/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "orNull": { - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#" - } - ] + "$comment": "RFC 8141 §2.3.1", + "$id": "urn:example:foo-bar-baz-qux?+CCResolve:cc=uk", + "properties": { + "foo": { + "$ref": "#/$defs/bar" } }, - "type": "string" + "$defs": { + "bar": { + "type": "string" + } + } }, "type": "string" } ] ], [ + [ + + ], [ { - "data": 1, - "data_pointer": "/bar", + "data": 12, + "data_pointer": "/foo", "schema": { "type": "string" }, - "schema_pointer": "/$defs/inner/properties/bar", + "schema_pointer": "/$defs/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "http://localhost:1234/draft2019-09/ref-and-defs.json", - "$defs": { - "inner": { - "properties": { - "bar": { - "type": "string" - } - } + "$comment": "RFC 8141 §2.3.2", + "$id": "urn:example:weather?=op=map&lat=39.56&lon=-104.85&datetime=1969-07-21T02:56:15Z", + "properties": { + "foo": { + "$ref": "#/$defs/bar" } }, - "$ref": "#/$defs/inner" + "$defs": { + "bar": { + "type": "string" + } + } }, "type": "string" } - ], - [ - ] ], [ - [ - - ], [ { - "data": "foo", - "data_pointer": "", + "data": "urn:example:foo-bar-baz-qux#somepart", + "data_pointer": "/$id", "schema": { - "$anchor": "foo", - "type": "integer" + "type": "string", + "format": "uri-reference", + "$comment": "Non-empty fragments not allowed.", + "pattern": "^[^#]*#?$" }, - "schema_pointer": "/$defs/A", + "schema_pointer": "/properties/$id", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "refToInteger": { - "$ref": "#foo" + "$id": "https://json-schema.org/draft/2019-09/meta/core", + "$recursiveAnchor": true, + "title": "Core vocabulary meta-schema", + "type": [ + "object", + "boolean" + ], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference", + "$comment": "Non-empty fragments not allowed.", + "pattern": "^[^#]*#?$" }, - "A": { - "$anchor": "foo", - "type": "integer" + "$schema": { + "type": "string", + "format": "uri" + }, + "$anchor": { + "type": "string", + "pattern": "^[A-Za-z][-A-Za-z0-9.:_]*$" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "$recursiveRef": { + "type": "string", + "format": "uri-reference" + }, + "$recursiveAnchor": { + "type": "boolean", + "default": false + }, + "$vocabulary": { + "type": "object", + "propertyNames": { + "type": "string", + "format": "uri" + }, + "additionalProperties": { + "type": "boolean" + } + }, + "$comment": { + "type": "string" + }, + "$defs": { + "type": "object", + "additionalProperties": { + "$recursiveRef": "#" + }, + "default": { + } } } }, - "type": "integer" + "type": "pattern" } ] ], [ + [ + + ], [ { - "data": 1, - "data_pointer": "/name/foo", + "data": 12, + "data_pointer": "/foo", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/$defs/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string" + "$id": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed", + "properties": { + "foo": { + "$ref": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed#/$defs/bar" + } + }, + "$defs": { + "bar": { + "type": "string" + } + } }, "type": "string" } - ], - [ - ] ], [ + [ + + ], [ { - "data": 1, - "data_pointer": "", + "data": 12, + "data_pointer": "/foo", "schema": { + "$anchor": "something", "type": "string" }, "schema_pointer": "/$defs/bar", "root_schema": { - "$id": "http://localhost:1234/real-id-ref-string.json", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "urn:uuid:deadbeef-1234-ff00-00ff-4321feebdaed", + "properties": { + "foo": { + "$ref": "urn:uuid:deadbeef-1234-ff00-00ff-4321feebdaed#something" + } + }, "$defs": { "bar": { + "$anchor": "something", "type": "string" } - }, - "$ref": "#/$defs/bar" + } }, "type": "string" } - ], - [ - ] ], [ + [ + + ], [ { - "data": 1, + "data": 12, "data_pointer": "", "schema": { "type": "string" }, - "schema_pointer": "/$defs/bar", + "schema_pointer": "/$defs/foo/$defs/bar", "root_schema": { - "$id": "urn:uuid:feebdaed-ffff-0000-ffff-0000deadbeef", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$ref": "urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed", "$defs": { - "bar": { - "type": "string" + "foo": { + "$id": "urn:uuid:deadbeef-4321-ffff-ffff-1234feebdaed", + "$defs": { + "bar": { + "type": "string" + } + }, + "$ref": "#/$defs/bar" } - }, - "$ref": "#/$defs/bar" + } }, "type": "string" } + ] + ], + [ + [ + { + "data": "foo", + "data_pointer": "", + "schema": { + "$id": "http://example.com/ref/if", + "type": "integer" + }, + "schema_pointer": "/if", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$ref": "http://example.com/ref/if", + "if": { + "$id": "http://example.com/ref/if", + "type": "integer" + } + }, + "type": "integer" + } ], [ @@ -19819,23 +20062,22 @@ [ [ { - "data": 1, + "data": "foo", "data_pointer": "", "schema": { - "$id": "http://localhost:1234/the-nested-id.json", - "type": "string" + "$id": "http://example.com/ref/then", + "type": "integer" }, - "schema_pointer": "/$defs/bar", + "schema_pointer": "/then", "root_schema": { - "$defs": { - "bar": { - "$id": "http://localhost:1234/the-nested-id.json", - "type": "string" - } - }, - "$ref": "http://localhost:1234/the-nested-id.json" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$ref": "http://example.com/ref/then", + "then": { + "$id": "http://example.com/ref/then", + "type": "integer" + } }, - "type": "string" + "type": "integer" } ], [ @@ -19843,98 +20085,60 @@ ] ], [ - [ - - ], [ { - "data": "a", + "data": "foo", "data_pointer": "", "schema": { - "$anchor": "detached", + "$id": "http://example.com/ref/else", "type": "integer" }, - "schema_pointer": "/$defs/detached", + "schema_pointer": "/else", "root_schema": { - "$id": "http://localhost:1234/draft2019-09/detached-ref.json", "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "foo": { - "$ref": "#detached" - }, - "detached": { - "$anchor": "detached", - "type": "integer" - } + "$ref": "http://example.com/ref/else", + "else": { + "$id": "http://example.com/ref/else", + "type": "integer" } }, "type": "integer" } + ], + [ + ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/required.json": [ + ], [ [ ], [ { - "data": { - "bar": 1 - }, + "data": 12, "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - }, - "bar": { - } - }, - "required": [ - "foo" - ] + "$id": "http://example.com/absref/foobar.json", + "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/$defs/b", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { + "$id": "http://example.com/ref/absref.json", + "$defs": { + "a": { + "$id": "http://example.com/ref/absref/foobar.json", + "type": "number" }, - "bar": { + "b": { + "$id": "http://example.com/absref/foobar.json", + "type": "string" } }, - "required": [ - "foo" - ] + "$ref": "/absref/foobar.json" }, - "type": "required", - "details": { - "missing_keys": [ - "foo" - ] - } + "type": "string" } - ], - [ - - ], - [ - - ], - [ - - ] - ], - [ - [ - - ] - ], - [ - [ - ] ], [ @@ -19943,201 +20147,94 @@ ], [ { - "data": { - "foo\nbar": "1", - "foo\"bar": "1" - }, + "data": "a", "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "required": [ - "foo\nbar", - "foo\"bar", - "foo\\bar", - "foo\rbar", - "foo\tbar", - "foo\fbar" - ] + "type": "number" }, - "schema_pointer": "", + "schema_pointer": "/$defs/foo", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "required": [ - "foo\nbar", - "foo\"bar", - "foo\\bar", - "foo\rbar", - "foo\tbar", - "foo\fbar" - ] + "$id": "file:///folder/file.json", + "$defs": { + "foo": { + "type": "number" + } + }, + "$ref": "#/$defs/foo" }, - "type": "required", - "details": { - "missing_keys": [ - "foo\\bar", - "foo\rbar", - "foo\tbar", - "foo\fbar" - ] - } + "type": "number" } ] ], [ [ - ], - [ - - ], - [ - { - "data": { - }, - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "required": [ - "__proto__", - "toString", - "constructor" - ] - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "required": [ - "__proto__", - "toString", - "constructor" - ] - }, - "type": "required", - "details": { - "missing_keys": [ - "__proto__", - "toString", - "constructor" - ] - } - } ], [ { - "data": { - "__proto__": "foo" - }, + "data": "a", "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "required": [ - "__proto__", - "toString", - "constructor" - ] + "type": "number" }, - "schema_pointer": "", + "schema_pointer": "/$defs/foo", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "required": [ - "__proto__", - "toString", - "constructor" - ] + "$id": "file:///c:/folder/file.json", + "$defs": { + "foo": { + "type": "number" + } + }, + "$ref": "#/$defs/foo" }, - "type": "required", - "details": { - "missing_keys": [ - "toString", - "constructor" - ] - } + "type": "number" } - ], + ] + ], + [ [ - { - "data": { - "toString": { - "length": 37 - } - }, - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "required": [ - "__proto__", - "toString", - "constructor" - ] - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "required": [ - "__proto__", - "toString", - "constructor" - ] - }, - "type": "required", - "details": { - "missing_keys": [ - "__proto__", - "constructor" - ] - } - } + ], [ { - "data": { - "constructor": { - "length": 37 - } - }, + "data": "a", "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "required": [ - "__proto__", - "toString", - "constructor" - ] + "type": "number" }, - "schema_pointer": "", + "schema_pointer": "/$defs//$defs/", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "required": [ - "__proto__", - "toString", - "constructor" + "$defs": { + "": { + "$defs": { + "": { + "type": "number" + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs//$defs/" + } ] }, - "type": "required", - "details": { - "missing_keys": [ - "__proto__", - "toString" - ] - } + "type": "number" } - ], - [ - ] ] ], - "JSON-Schema-Test-Suite/tests/draft2019-09/type.json": [ + "JSON-Schema-Test-Suite/tests/draft2019-09/refRemote.json": [ [ [ - ], - [ - ], [ { - "data": 1.1, + "data": "a", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", @@ -20150,62 +20247,99 @@ }, "type": "integer" } + ] + ], + [ + [ + ], [ { - "data": "foo", + "data": "a", "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/$defs/integer", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "integer" + "$defs": { + "integer": { + "type": "integer" + }, + "refToInteger": { + "$ref": "#/$defs/integer" + } + } }, "type": "integer" } + ] + ], + [ + [ + ], [ { - "data": "1", + "data": "a", "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", + "$anchor": "foo", "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/$defs/A", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "integer" + "$defs": { + "refToInteger": { + "$ref": "#foo" + }, + "A": { + "$anchor": "foo", + "type": "integer" + } + } }, "type": "integer" } + ] + ], + [ + [ + ], [ { - "data": { - }, + "data": "a", "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/$defs/integer", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "integer" + "$defs": { + "integer": { + "type": "integer" + }, + "refToInteger": { + "$ref": "#/$defs/integer" + } + } }, "type": "integer" } + ] + ], + [ + [ + ], [ { - "data": [ - - ], - "data_pointer": "", + "data": "a", + "data_pointer": "/0/0", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "integer" @@ -20217,11 +20351,16 @@ }, "type": "integer" } + ] + ], + [ + [ + ], [ { - "data": true, - "data_pointer": "", + "data": "a", + "data_pointer": "/list/0", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "integer" @@ -20233,11 +20372,16 @@ }, "type": "integer" } + ] + ], + [ + [ + ], [ { - "data": null, - "data_pointer": "", + "data": "a", + "data_pointer": "/list/0", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "integer" @@ -20257,107 +20401,133 @@ ], [ - ], - [ - ], [ { - "data": "foo", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "number" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "number" + "data": { + "name": null }, - "type": "number" - } - ], - [ - { - "data": "1", - "data_pointer": "", + "data_pointer": "/name", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "number" + "type": "null" }, - "schema_pointer": "", + "schema_pointer": "/$defs/orNull/anyOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "number" + "$defs": { + "orNull": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#" + } + ] + } + }, + "type": "string" }, - "type": "number" - } - ], - [ + "type": "null" + }, { "data": { + "name": null }, - "data_pointer": "", + "data_pointer": "/name", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "number" + "$defs": { + "orNull": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#" + } + ] + } + }, + "type": "string" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "number" + "$defs": { + "orNull": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#" + } + ] + } + }, + "type": "string" }, - "type": "number" + "type": "string" } - ], + ] + ], + [ [ { - "data": [ - - ], - "data_pointer": "", + "data": 1, + "data_pointer": "/bar", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "number" + "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/$defs/inner/properties/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "number" + "$id": "http://localhost:1234/draft2019-09/ref-and-defs.json", + "$defs": { + "inner": { + "properties": { + "bar": { + "type": "string" + } + } + } + }, + "$ref": "#/$defs/inner" }, - "type": "number" + "type": "string" } ], [ - { - "data": true, - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "number" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "number" - }, - "type": "number" - } + + ] + ], + [ + [ + ], [ { - "data": null, + "data": "foo", "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "number" + "$anchor": "foo", + "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/$defs/A", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "number" + "$defs": { + "refToInteger": { + "$ref": "#foo" + }, + "A": { + "$anchor": "foo", + "type": "integer" + } + } }, - "type": "number" + "type": "integer" } ] ], @@ -20365,7 +20535,7 @@ [ { "data": 1, - "data_pointer": "", + "data_pointer": "/name/foo", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "string" @@ -20378,218 +20548,378 @@ "type": "string" } ], + [ + + ] + ], + [ [ { - "data": 1.1, + "data": 1, "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/$defs/bar", "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string" + "$id": "http://localhost:1234/real-id-ref-string.json", + "$defs": { + "bar": { + "type": "string" + } + }, + "$ref": "#/$defs/bar" }, "type": "string" } ], [ - ], - [ - - ], - [ - - ], + ] + ], + [ [ { - "data": { - }, + "data": 1, "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/$defs/bar", "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string" + "$id": "urn:uuid:feebdaed-ffff-0000-ffff-0000deadbeef", + "$defs": { + "bar": { + "type": "string" + } + }, + "$ref": "#/$defs/bar" }, "type": "string" } ], [ - { - "data": [ - ], - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string" - }, - "type": "string" - } - ], + ] + ], + [ [ { - "data": true, + "data": 1, "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "http://localhost:1234/the-nested-id.json", "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/$defs/bar", "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string" + "$defs": { + "bar": { + "$id": "http://localhost:1234/the-nested-id.json", + "type": "string" + } + }, + "$ref": "http://localhost:1234/the-nested-id.json" }, "type": "string" } ], [ - { - "data": null, - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string" - }, - "type": "string" - } + ] ], [ + [ + + ], [ { - "data": 1, + "data": "a", "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object" + "$anchor": "detached", + "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/$defs/detached", "root_schema": { + "$id": "http://localhost:1234/draft2019-09/detached-ref.json", "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object" + "$defs": { + "foo": { + "$ref": "#detached" + }, + "detached": { + "$anchor": "detached", + "type": "integer" + } + } }, - "type": "object" + "type": "integer" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/required.json": [ + [ + [ + ], [ { - "data": 1.1, + "data": { + "bar": 1 + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object" + "properties": { + "foo": { + }, + "bar": { + } + }, + "required": [ + "foo" + ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object" + "properties": { + "foo": { + }, + "bar": { + } + }, + "required": [ + "foo" + ] }, - "type": "object" + "type": "required", + "details": { + "missing_keys": [ + "foo" + ] + } } + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ] + ], + [ + [ + + ] + ], + [ + [ + ], [ { - "data": "foo", + "data": { + "foo\nbar": "1", + "foo\"bar": "1" + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object" + "required": [ + "foo\nbar", + "foo\"bar", + "foo\\bar", + "foo\rbar", + "foo\tbar", + "foo\fbar" + ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object" + "required": [ + "foo\nbar", + "foo\"bar", + "foo\\bar", + "foo\rbar", + "foo\tbar", + "foo\fbar" + ] }, - "type": "object" + "type": "required", + "details": { + "missing_keys": [ + "foo\\bar", + "foo\rbar", + "foo\tbar", + "foo\fbar" + ] + } } + ] + ], + [ + [ + ], [ ], [ { - "data": [ - - ], + "data": { + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object" + "required": [ + "__proto__", + "toString", + "constructor" + ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object" + "required": [ + "__proto__", + "toString", + "constructor" + ] }, - "type": "object" + "type": "required", + "details": { + "missing_keys": [ + "__proto__", + "toString", + "constructor" + ] + } } ], [ { - "data": true, + "data": { + "__proto__": "foo" + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object" + "required": [ + "__proto__", + "toString", + "constructor" + ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object" + "required": [ + "__proto__", + "toString", + "constructor" + ] }, - "type": "object" + "type": "required", + "details": { + "missing_keys": [ + "toString", + "constructor" + ] + } } ], [ { - "data": null, + "data": { + "toString": { + "length": 37 + } + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object" + "required": [ + "__proto__", + "toString", + "constructor" + ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object" + "required": [ + "__proto__", + "toString", + "constructor" + ] }, - "type": "object" + "type": "required", + "details": { + "missing_keys": [ + "__proto__", + "constructor" + ] + } } - ] - ], - [ + ], [ { - "data": 1, + "data": { + "constructor": { + "length": 37 + } + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "array" + "required": [ + "__proto__", + "toString", + "constructor" + ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "array" + "required": [ + "__proto__", + "toString", + "constructor" + ] }, - "type": "array" + "type": "required", + "details": { + "missing_keys": [ + "__proto__", + "toString" + ] + } } + ], + [ + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/type.json": [ + [ + [ + + ], + [ + ], [ { @@ -20597,14 +20927,14 @@ "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "array" + "type": "integer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "array" + "type": "integer" }, - "type": "array" + "type": "integer" } ], [ @@ -20613,190 +20943,192 @@ "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "array" + "type": "integer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "array" + "type": "integer" }, - "type": "array" + "type": "integer" } ], [ { - "data": { - }, + "data": "1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "array" + "type": "integer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "array" + "type": "integer" }, - "type": "array" + "type": "integer" } - ], - [ - ], [ { - "data": true, + "data": { + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "array" + "type": "integer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "array" + "type": "integer" }, - "type": "array" + "type": "integer" } ], [ { - "data": null, + "data": [ + + ], "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "array" + "type": "integer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "array" + "type": "integer" }, - "type": "array" + "type": "integer" } - ] - ], - [ + ], [ { - "data": 1, + "data": true, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "integer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "integer" }, - "type": "boolean" + "type": "integer" } ], [ { - "data": 0, + "data": null, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "integer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "integer" }, - "type": "boolean" + "type": "integer" } + ] + ], + [ + [ + + ], + [ + + ], + [ + ], [ { - "data": 1.1, + "data": "foo", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "number" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "number" }, - "type": "boolean" + "type": "number" } ], [ { - "data": "foo", + "data": "1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "number" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "number" }, - "type": "boolean" + "type": "number" } ], [ { - "data": "", + "data": { + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "number" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "number" }, - "type": "boolean" + "type": "number" } ], [ { - "data": { - }, + "data": [ + + ], "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "number" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "number" }, - "type": "boolean" + "type": "number" } ], [ { - "data": [ - - ], + "data": true, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "number" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "number" }, - "type": "boolean" + "type": "number" } - ], - [ - - ], - [ - ], [ { @@ -20804,14 +21136,14 @@ "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "number" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "boolean" + "type": "number" }, - "type": "boolean" + "type": "number" } ] ], @@ -20822,14 +21154,14 @@ "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "string" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "string" }, - "type": "null" + "type": "string" } ], [ @@ -20838,330 +21170,279 @@ "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "string" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "string" }, - "type": "null" + "type": "string" } + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": 0, + "data": { + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "string" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "string" }, - "type": "null" + "type": "string" } ], [ { - "data": "foo", + "data": [ + + ], "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "string" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "string" }, - "type": "null" + "type": "string" } ], [ { - "data": "", + "data": true, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "string" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "string" }, - "type": "null" + "type": "string" } ], [ { - "data": { - }, + "data": null, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "string" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "string" }, - "type": "null" + "type": "string" } - ], + ] + ], + [ [ { - "data": [ - - ], + "data": 1, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "object" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "object" }, - "type": "null" + "type": "object" } ], [ { - "data": true, + "data": 1.1, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "object" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "object" }, - "type": "null" + "type": "object" } ], [ { - "data": false, + "data": "foo", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "object" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "null" + "type": "object" }, - "type": "null" + "type": "object" } ], [ - ] - ], - [ - [ - - ], - [ - ], [ { - "data": 1.1, + "data": [ + + ], "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "integer", - "string" - ] + "type": "object" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "integer", - "string" - ] + "type": "object" }, - "type": "type" + "type": "object" } ], [ { - "data": { - }, + "data": true, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "integer", - "string" - ] + "type": "object" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "integer", - "string" - ] + "type": "object" }, - "type": "type" + "type": "object" } ], [ { - "data": [ - - ], + "data": null, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "integer", - "string" - ] + "type": "object" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "integer", - "string" - ] + "type": "object" }, - "type": "type" + "type": "object" } - ], + ] + ], + [ [ { - "data": true, + "data": 1, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "integer", - "string" - ] + "type": "array" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "integer", - "string" - ] + "type": "array" }, - "type": "type" + "type": "array" } ], [ { - "data": null, + "data": 1.1, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "integer", - "string" - ] + "type": "array" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "integer", - "string" - ] + "type": "array" }, - "type": "type" + "type": "array" } - ] - ], - [ - [ - ], [ { - "data": 123, + "data": "foo", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "string" - ] + "type": "array" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "string" - ] + "type": "array" }, - "type": "type" + "type": "array" } - ] - ], - [ - [ - - ], - [ - ], [ { - "data": 123, + "data": { + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "array", - "object" - ] + "type": "array" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "array", - "object" - ] + "type": "array" }, - "type": "type" + "type": "array" } + ], + [ + ], [ { - "data": "foo", + "data": true, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "array", - "object" - ] + "type": "array" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "array", - "object" - ] + "type": "array" }, - "type": "type" + "type": "array" } ], [ @@ -21170,742 +21451,427 @@ "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "array", - "object" - ] + "type": "array" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "array", - "object" - ] + "type": "array" }, - "type": "type" + "type": "array" } ] ], [ - [ - - ], - [ - - ], - [ - - ], [ { - "data": 123, + "data": 1, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "array", - "object", - "null" - ] + "type": "boolean" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "array", - "object", - "null" - ] + "type": "boolean" }, - "type": "type" + "type": "boolean" } ], [ { - "data": "foo", + "data": 0, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "array", - "object", - "null" - ] + "type": "boolean" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": [ - "array", - "object", - "null" - ] + "type": "boolean" }, - "type": "type" + "type": "boolean" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/unevaluatedItems.json": [ - [ - [ - - ], - [ - - ] - ], - [ - [ - ], [ { - "data": "foo", - "data_pointer": "/0", - "schema": false, - "schema_pointer": "/unevaluatedItems", + "data": 1.1, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "boolean" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "unevaluatedItems": false + "type": "boolean" }, - "type": "schema" + "type": "boolean" } - ] - ], - [ - [ - - ], - [ - ], [ { - "data": 42, - "data_pointer": "/0", + "data": "foo", + "data_pointer": "", "schema": { - "type": "string" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "boolean" }, - "schema_pointer": "/unevaluatedItems", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "unevaluatedItems": { - "type": "string" - } + "type": "boolean" }, - "type": "string" + "type": "boolean" } - ] - ], - [ - [ - - ] - ], - [ - [ - ], [ { - "data": "bar", - "data_pointer": "/1", - "schema": false, - "schema_pointer": "/unevaluatedItems", + "data": "", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "boolean" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "type": "string" - } - ], - "unevaluatedItems": false + "type": "boolean" }, - "type": "schema" + "type": "boolean" } - ] - ], - [ - [ - - ] - ], - [ + ], [ { - "data": 1, - "data_pointer": "/1", + "data": { + }, + "data_pointer": "", "schema": { - "type": "string" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "boolean" }, - "schema_pointer": "/unevaluatedItems", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "additionalItems": { - "type": "number" - }, - "unevaluatedItems": { - "type": "string" - } + "type": "boolean" }, - "type": "string" + "type": "boolean" } ], - [ - - ] - ], - [ [ { - "data": 1, - "data_pointer": "/1", + "data": [ + + ], + "data_pointer": "", "schema": { - "type": "string" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "boolean" }, - "schema_pointer": "/unevaluatedItems", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "allOf": [ - { - "additionalItems": { - "type": "number" - } - } - ], - "unevaluatedItems": { - "type": "string" - } + "type": "boolean" }, - "type": "string" + "type": "boolean" } ], [ - ] - ], - [ + ], [ ], [ { - "data": true, - "data_pointer": "/2", - "schema": false, - "schema_pointer": "/unevaluatedItems", + "data": null, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "boolean" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "type": "string" - } - ], - "allOf": [ - { - "items": [ - true, - { - "type": "number" - } - ] - } - ], - "unevaluatedItems": false + "type": "boolean" }, - "type": "schema" + "type": "boolean" } ] ], [ - [ - - ], - [ - - ], [ { - "data": "yes", - "data_pointer": "/0", + "data": 1, + "data_pointer": "", "schema": { - "type": "boolean" + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "null" }, - "schema_pointer": "/unevaluatedItems", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "unevaluatedItems": { - "type": "boolean" - }, - "anyOf": [ - { - "items": { - "type": "string" - } - }, - true - ] + "type": "null" }, - "type": "boolean" + "type": "null" } - ] - ], - [ - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - - ] - ], - [ - [ - ], [ { - "data": 42, - "data_pointer": "/2", - "schema": false, - "schema_pointer": "/unevaluatedItems", + "data": 1.1, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "null" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "const": "foo" - } - ], - "anyOf": [ - { - "items": [ - true, - { - "const": "bar" - } - ] - }, - { - "items": [ - true, - true, - { - "const": "baz" - } - ] - } - ], - "unevaluatedItems": false + "type": "null" }, - "type": "schema" + "type": "null" } ], [ - + { + "data": 0, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "null" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "null" + }, + "type": "null" + } ], [ { - "data": 42, - "data_pointer": "/3", - "schema": false, - "schema_pointer": "/unevaluatedItems", + "data": "foo", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "null" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "const": "foo" - } - ], - "anyOf": [ - { - "items": [ - true, - { - "const": "bar" - } - ] - }, - { - "items": [ - true, - true, - { - "const": "baz" - } - ] - } - ], - "unevaluatedItems": false + "type": "null" }, - "type": "schema" + "type": "null" } - ] - ], - [ - [ - ], [ { - "data": 42, - "data_pointer": "/2", - "schema": false, - "schema_pointer": "/unevaluatedItems", + "data": "", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "null" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "const": "foo" - } - ], - "oneOf": [ - { - "items": [ - true, - { - "const": "bar" - } - ] - }, - { - "items": [ - true, - { - "const": "baz" - } - ] - } - ], - "unevaluatedItems": false + "type": "null" }, - "type": "schema" + "type": "null" } - ] - ], - [ + ], [ { - "data": "bar", - "data_pointer": "/1", - "schema": false, - "schema_pointer": "/unevaluatedItems", + "data": { + }, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "null" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "const": "foo" - } - ], - "not": { - "not": { - "items": [ - true, - { - "const": "bar" - } - ] - } - }, - "unevaluatedItems": false + "type": "null" }, - "type": "schema" + "type": "null" } - ] - ], - [ - [ - ], [ { - "data": "else", - "data_pointer": "/3", - "schema": false, - "schema_pointer": "/unevaluatedItems", + "data": [ + + ], + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "null" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "const": "foo" - } - ], - "if": { - "items": [ - true, - { - "const": "bar" - } - ] - }, - "then": { - "items": [ - true, - true, - { - "const": "then" - } - ] - }, - "else": { - "items": [ - true, - true, - true, - { - "const": "else" - } - ] - }, - "unevaluatedItems": false + "type": "null" }, - "type": "schema" + "type": "null" } - ], - [ - ], [ { - "data": 42, - "data_pointer": "/4", - "schema": false, - "schema_pointer": "/unevaluatedItems", + "data": true, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "null" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "const": "foo" - } - ], - "if": { - "items": [ - true, - { - "const": "bar" - } - ] - }, - "then": { - "items": [ - true, - true, - { - "const": "then" - } - ] - }, - "else": { - "items": [ - true, - true, - true, - { - "const": "else" - } - ] - }, - "unevaluatedItems": false + "type": "null" }, - "type": "schema" + "type": "null" } - ] - ], - [ - [ - ], [ { - "data": "foo", - "data_pointer": "/0", - "schema": false, - "schema_pointer": "/unevaluatedItems", + "data": false, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "null" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "allOf": [ - true - ], - "unevaluatedItems": false + "type": "null" }, - "type": "schema" + "type": "null" } + ], + [ + ] ], [ [ + ], + [ + ], [ { - "data": "baz", - "data_pointer": "/2", - "schema": false, - "schema_pointer": "/unevaluatedItems", + "data": 1.1, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": [ + "integer", + "string" + ] + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "#/$defs/bar", - "items": [ - { - "type": "string" - } - ], - "unevaluatedItems": false, - "$defs": { - "bar": { - "items": [ - true, - { - "type": "string" - } - ] - } - } + "type": [ + "integer", + "string" + ] }, - "type": "schema" + "type": "type" } - ] - ], - [ - [ - ], [ { - "data": "too many", - "data_pointer": "/1/3", - "schema": false, - "schema_pointer": "/$defs/tree/items/1/unevaluatedItems", + "data": { + }, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": [ + "integer", + "string" + ] + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://example.com/extended-tree", - "$recursiveAnchor": true, - "$ref": "/tree", - "items": [ - true, - true, - { - "type": "string" - } - ], - "$defs": { - "tree": { - "$id": "/tree", - "$recursiveAnchor": true, - "type": "array", - "items": [ - { - "type": "number" - }, - { - "$comment": "unevaluatedItems comes first so it's more likely to catch bugs with implementations that are sensitive to keyword ordering", - "unevaluatedItems": false, - "$recursiveRef": "#" - } - ] - } - } + "type": [ + "integer", + "string" + ] }, - "type": "schema" + "type": "type" } - ] - ], - [ + ], [ { - "data": 1, - "data_pointer": "/0", - "schema": false, - "schema_pointer": "/allOf/1/unevaluatedItems", + "data": [ + + ], + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": [ + "integer", + "string" + ] + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "allOf": [ - { - "items": [ - true - ] - }, - { - "unevaluatedItems": false - } + "type": [ + "integer", + "string" ] }, - "type": "schema" + "type": "type" } - ] - ], - [ - [ - ], [ { - "data": "test", - "data_pointer": "/foo/1", - "schema": false, - "schema_pointer": "/properties/foo/unevaluatedItems", + "data": true, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": [ + "integer", + "string" + ] + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "items": [ - { - "type": "string" - } - ], - "unevaluatedItems": false - } - }, - "anyOf": [ - { - "properties": { - "foo": { - "items": [ - true, - { - "type": "string" - } - ] - } - } - } + "type": [ + "integer", + "string" ] }, - "type": "schema" + "type": "type" } - ] - ], - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ - - ] - ], - [ - [ - + { + "data": null, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": [ + "integer", + "string" + ] + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": [ + "integer", + "string" + ] + }, + "type": "type" + } ] ], [ @@ -21914,34 +21880,24 @@ ], [ { - "data": "b", - "data_pointer": "/0", - "schema": false, - "schema_pointer": "/unevaluatedItems", + "data": 123, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": [ + "string" + ] + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "if": { - "items": [ - { - "const": "a" - } - ] - }, - "unevaluatedItems": false + "type": [ + "string" + ] }, - "type": "schema" + "type": "type" } ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/unevaluatedProperties.json": [ - [ - [ - - ], - [ - - ] ], [ [ @@ -21952,67 +21908,139 @@ ], [ { - "data": "fo", - "data_pointer": "/foo", + "data": 123, + "data_pointer": "", "schema": { - "type": "string", - "minLength": 3 + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": [ + "array", + "object" + ] }, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "unevaluatedProperties": { - "type": "string", - "minLength": 3 - } + "type": [ + "array", + "object" + ] }, - "type": "minLength" + "type": "type" } - ] - ], - [ - [ - ], [ { "data": "foo", - "data_pointer": "/foo", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": [ + "array", + "object" + ] + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "unevaluatedProperties": false + "type": [ + "array", + "object" + ] }, - "type": "schema" + "type": "type" + } + ], + [ + { + "data": null, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": [ + "array", + "object" + ] + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": [ + "array", + "object" + ] + }, + "type": "type" } ] ], [ [ + ], + [ + + ], + [ + ], [ { - "data": "bar", - "data_pointer": "/bar", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "data": 123, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": [ + "array", + "object", + "null" + ] + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "properties": { - "foo": { - "type": "string" - } - }, - "unevaluatedProperties": false + "type": [ + "array", + "object", + "null" + ] }, - "type": "schema" + "type": "type" + } + ], + [ + { + "data": "foo", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": [ + "array", + "object", + "null" + ] + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": [ + "array", + "object", + "null" + ] + }, + "type": "type" } ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/unevaluatedItems.json": [ + [ + [ + + ], + [ + + ] ], [ [ @@ -22020,19 +22048,13 @@ ], [ { - "data": "bar", - "data_pointer": "/bar", + "data": "foo", + "data_pointer": "/0", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "patternProperties": { - "^foo": { - "type": "string" - } - }, - "unevaluatedProperties": false + "unevaluatedItems": false }, "type": "schema" } @@ -22044,69 +22066,48 @@ ], [ - ] - ], - [ - [ - ], [ { - "data": "baz", - "data_pointer": "/baz", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "data": 42, + "data_pointer": "/0", + "schema": { + "type": "string" + }, + "schema_pointer": "/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "properties": { - "foo": { - "type": "string" - } - }, - "allOf": [ - { - "properties": { - "bar": { - "type": "string" - } - } - } - ], - "unevaluatedProperties": false + "unevaluatedItems": { + "type": "string" + } }, - "type": "schema" + "type": "string" } ] ], [ [ + ] + ], + [ + [ + ], [ { - "data": "baz", - "data_pointer": "/baz", + "data": "bar", + "data_pointer": "/1", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "properties": { - "foo": { - "type": "string" - } - }, - "allOf": [ + "items": [ { - "patternProperties": { - "^bar": { - "type": "string" - } - } + "type": "string" } ], - "unevaluatedProperties": false + "unevaluatedItems": false }, "type": "schema" } @@ -22115,6 +22116,28 @@ [ [ + ] + ], + [ + [ + { + "data": 1, + "data_pointer": "/1", + "schema": { + "type": "string" + }, + "schema_pointer": "/unevaluatedItems", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "additionalItems": { + "type": "number" + }, + "unevaluatedItems": { + "type": "string" + } + }, + "type": "string" + } ], [ @@ -22122,7 +22145,28 @@ ], [ [ - + { + "data": 1, + "data_pointer": "/1", + "schema": { + "type": "string" + }, + "schema_pointer": "/unevaluatedItems", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "allOf": [ + { + "additionalItems": { + "type": "number" + } + } + ], + "unevaluatedItems": { + "type": "string" + } + }, + "type": "string" + } ], [ @@ -22134,51 +22178,119 @@ ], [ { - "data": "not-baz", - "data_pointer": "/baz", + "data": true, + "data_pointer": "/2", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "properties": { - "foo": { + "items": [ + { "type": "string" } - }, - "anyOf": [ + ], + "allOf": [ { - "properties": { - "bar": { - "const": "bar" + "items": [ + true, + { + "type": "number" } - }, - "required": [ - "bar" ] - }, + } + ], + "unevaluatedItems": false + }, + "type": "schema" + } + ] + ], + [ + [ + + ], + [ + + ], + [ + { + "data": "yes", + "data_pointer": "/0", + "schema": { + "type": "boolean" + }, + "schema_pointer": "/unevaluatedItems", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "unevaluatedItems": { + "type": "boolean" + }, + "anyOf": [ { - "properties": { - "baz": { - "const": "baz" + "items": { + "type": "string" + } + }, + true + ] + }, + "type": "boolean" + } + ] + ], + [ + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + { + "data": 42, + "data_pointer": "/2", + "schema": false, + "schema_pointer": "/unevaluatedItems", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "items": [ + { + "const": "foo" + } + ], + "anyOf": [ + { + "items": [ + true, + { + "const": "bar" } - }, - "required": [ - "baz" ] }, { - "properties": { - "quux": { - "const": "quux" + "items": [ + true, + true, + { + "const": "baz" } - }, - "required": [ - "quux" ] } ], - "unevaluatedProperties": false + "unevaluatedItems": false }, "type": "schema" } @@ -22188,51 +22300,37 @@ ], [ { - "data": "not-quux", - "data_pointer": "/quux", + "data": 42, + "data_pointer": "/3", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "properties": { - "foo": { - "type": "string" + "items": [ + { + "const": "foo" } - }, + ], "anyOf": [ { - "properties": { - "bar": { + "items": [ + true, + { "const": "bar" } - }, - "required": [ - "bar" ] }, { - "properties": { - "baz": { + "items": [ + true, + true, + { "const": "baz" } - }, - "required": [ - "baz" - ] - }, - { - "properties": { - "quux": { - "const": "quux" - } - }, - "required": [ - "quux" ] } ], - "unevaluatedProperties": false + "unevaluatedItems": false }, "type": "schema" } @@ -22244,41 +22342,36 @@ ], [ { - "data": "quux", - "data_pointer": "/quux", + "data": 42, + "data_pointer": "/2", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "properties": { - "foo": { - "type": "string" + "items": [ + { + "const": "foo" } - }, + ], "oneOf": [ { - "properties": { - "bar": { + "items": [ + true, + { "const": "bar" } - }, - "required": [ - "bar" ] }, { - "properties": { - "baz": { + "items": [ + true, + { "const": "baz" } - }, - "required": [ - "baz" ] } ], - "unevaluatedProperties": false + "unevaluatedItems": false }, "type": "schema" } @@ -22288,30 +22381,27 @@ [ { "data": "bar", - "data_pointer": "/bar", + "data_pointer": "/1", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "properties": { - "foo": { - "type": "string" + "items": [ + { + "const": "foo" } - }, + ], "not": { "not": { - "properties": { - "bar": { + "items": [ + true, + { "const": "bar" } - }, - "required": [ - "bar" ] } }, - "unevaluatedProperties": false + "unevaluatedItems": false }, "type": "schema" } @@ -22323,44 +22413,45 @@ ], [ { - "data": "baz", - "data_pointer": "/baz", + "data": "else", + "data_pointer": "/3", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", + "items": [ + { + "const": "foo" + } + ], "if": { - "properties": { - "foo": { - "const": "then" + "items": [ + true, + { + "const": "bar" } - }, - "required": [ - "foo" ] }, "then": { - "properties": { - "bar": { - "type": "string" + "items": [ + true, + true, + { + "const": "then" } - }, - "required": [ - "bar" ] }, "else": { - "properties": { - "baz": { - "type": "string" + "items": [ + true, + true, + true, + { + "const": "else" } - }, - "required": [ - "baz" ] }, - "unevaluatedProperties": false + "unevaluatedItems": false }, "type": "schema" } @@ -22370,321 +22461,349 @@ ], [ { - "data": "else", - "data_pointer": "/foo", + "data": 42, + "data_pointer": "/4", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "if": { - "properties": { - "foo": { - "const": "then" + "items": [ + { + "const": "foo" + } + ], + "if": { + "items": [ + true, + { + "const": "bar" } - }, - "required": [ - "foo" ] }, "then": { - "properties": { - "bar": { - "type": "string" + "items": [ + true, + true, + { + "const": "then" } - }, - "required": [ - "bar" ] }, "else": { - "properties": { - "baz": { - "type": "string" + "items": [ + true, + true, + true, + { + "const": "else" } - }, - "required": [ - "baz" ] }, - "unevaluatedProperties": false + "unevaluatedItems": false }, "type": "schema" } ] ], [ + [ + + ], [ { - "data": "bar", - "data_pointer": "/bar", + "data": "foo", + "data_pointer": "/0", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "if": { - "properties": { - "foo": { - "const": "then" - } - }, - "required": [ - "foo" - ] - }, - "else": { - "properties": { - "baz": { - "type": "string" - } - }, - "required": [ - "baz" - ] - }, - "unevaluatedProperties": false + "allOf": [ + true + ], + "unevaluatedItems": false }, "type": "schema" } + ] + ], + [ + [ + ], [ { - "data": "bar", - "data_pointer": "/bar", + "data": "baz", + "data_pointer": "/2", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "if": { - "properties": { - "foo": { - "const": "then" - } - }, - "required": [ - "foo" - ] - }, - "else": { - "properties": { - "baz": { - "type": "string" - } - }, - "required": [ - "baz" - ] - }, - "unevaluatedProperties": false + "$ref": "#/$defs/bar", + "items": [ + { + "type": "string" + } + ], + "unevaluatedItems": false, + "$defs": { + "bar": { + "items": [ + true, + { + "type": "string" + } + ] + } + } }, "type": "schema" - }, + } + ] + ], + [ + [ + + ], + [ { "data": "baz", - "data_pointer": "/baz", + "data_pointer": "/2", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "if": { - "properties": { - "foo": { - "const": "then" - } - }, - "required": [ - "foo" - ] - }, - "else": { - "properties": { - "baz": { - "type": "string" - } - }, - "required": [ - "baz" - ] - }, - "unevaluatedProperties": false + "unevaluatedItems": false, + "items": [ + { + "type": "string" + } + ], + "$ref": "#/$defs/bar", + "$defs": { + "bar": { + "items": [ + true, + { + "type": "string" + } + ] + } + } }, "type": "schema" } - ], + ] + ], + [ [ ], [ { - "data": "else", - "data_pointer": "/foo", + "data": "too many", + "data_pointer": "/1/3", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/$defs/tree/items/1/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "if": { - "properties": { - "foo": { - "const": "then" - } - }, - "required": [ - "foo" - ] - }, - "else": { - "properties": { - "baz": { - "type": "string" - } - }, - "required": [ - "baz" - ] - }, - "unevaluatedProperties": false + "$id": "https://example.com/unevaluated-items-with-recursive-ref/extended-tree", + "$recursiveAnchor": true, + "$ref": "./tree", + "items": [ + true, + true, + { + "type": "string" + } + ], + "$defs": { + "tree": { + "$id": "./tree", + "$recursiveAnchor": true, + "type": "array", + "items": [ + { + "type": "number" + }, + { + "$comment": "unevaluatedItems comes first so it's more likely to catch bugs with implementations that are sensitive to keyword ordering", + "unevaluatedItems": false, + "$recursiveRef": "#" + } + ] + } + } }, "type": "schema" } ] ], [ - [ - - ], [ { - "data": "baz", - "data_pointer": "/baz", + "data": 1, + "data_pointer": "/0", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/allOf/1/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "if": { - "properties": { - "foo": { - "const": "then" - } + "allOf": [ + { + "items": [ + true + ] }, - "required": [ - "foo" - ] - }, - "then": { - "properties": { - "bar": { - "type": "string" - } - }, - "required": [ - "bar" - ] - }, - "unevaluatedProperties": false + { + "unevaluatedItems": false + } + ] }, "type": "schema" } + ] + ], + [ + [ + ], [ { - "data": "baz", - "data_pointer": "/baz", + "data": "test", + "data_pointer": "/foo/1", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/properties/foo/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "if": { - "properties": { - "foo": { - "const": "then" - } - }, - "required": [ - "foo" - ] + "properties": { + "foo": { + "items": [ + { + "type": "string" + } + ], + "unevaluatedItems": false + } }, - "then": { - "properties": { - "bar": { - "type": "string" + "anyOf": [ + { + "properties": { + "foo": { + "items": [ + true, + { + "type": "string" + } + ] + } } - }, - "required": [ - "bar" - ] - }, - "unevaluatedProperties": false + } + ] }, "type": "schema" } + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ] + ], + [ + [ + ], [ { - "data": "else", - "data_pointer": "/foo", + "data": "b", + "data_pointer": "/0", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", "if": { - "properties": { - "foo": { - "const": "then" - } - }, - "required": [ - "foo" - ] - }, - "then": { - "properties": { - "bar": { - "type": "string" + "items": [ + { + "const": "a" } - }, - "required": [ - "bar" ] }, - "unevaluatedProperties": false + "unevaluatedItems": false }, "type": "schema" - }, + } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/unevaluatedProperties.json": [ + [ + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + + ], + [ { - "data": "baz", - "data_pointer": "/baz", + "data": "fo", + "data_pointer": "/foo", + "schema": { + "type": "string", + "minLength": 3 + }, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "unevaluatedProperties": { + "type": "string", + "minLength": 3 + } + }, + "type": "minLength" + } + ] + ], + [ + [ + + ], + [ + { + "data": "foo", + "data_pointer": "/foo", "schema": false, "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", - "if": { - "properties": { - "foo": { - "const": "then" - } - }, - "required": [ - "foo" - ] - }, - "then": { - "properties": { - "bar": { - "type": "string" - } - }, - "required": [ - "bar" - ] - }, "unevaluatedProperties": false }, "type": "schema" @@ -22709,18 +22828,6 @@ "type": "string" } }, - "dependentSchemas": { - "foo": { - "properties": { - "bar": { - "const": "bar" - } - }, - "required": [ - "bar" - ] - } - }, "unevaluatedProperties": false }, "type": "schema" @@ -22740,14 +22847,11 @@ "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", - "properties": { - "foo": { + "patternProperties": { + "^foo": { "type": "string" } }, - "allOf": [ - true - ], "unevaluatedProperties": false }, "type": "schema" @@ -22757,6 +22861,14 @@ [ [ + ], + [ + + ] + ], + [ + [ + ], [ { @@ -22767,22 +22879,21 @@ "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", - "$ref": "#/$defs/bar", "properties": { "foo": { "type": "string" } }, - "unevaluatedProperties": false, - "$defs": { - "bar": { + "allOf": [ + { "properties": { "bar": { "type": "string" } } } - } + ], + "unevaluatedProperties": false }, "type": "schema" } @@ -22794,86 +22905,28 @@ ], [ { - "data": "b", - "data_pointer": "/branches/foo", + "data": "baz", + "data_pointer": "/baz", "schema": false, - "schema_pointer": "/$defs/tree/properties/branches/unevaluatedProperties", + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://example.com/extended-tree", - "$recursiveAnchor": true, - "$ref": "/tree", + "type": "object", "properties": { - "name": { + "foo": { "type": "string" } }, - "$defs": { - "tree": { - "$id": "/tree", - "$recursiveAnchor": true, - "type": "object", - "properties": { - "node": true, - "branches": { - "$comment": "unevaluatedProperties comes first so it's more likely to bugs errors with implementations that are sensitive to keyword ordering", - "unevaluatedProperties": false, - "$recursiveRef": "#" - } - }, - "required": [ - "node" - ] - } - } - }, - "type": "schema" - } - ] - ], - [ - [ - { - "data": 1, - "data_pointer": "/foo", - "schema": false, - "schema_pointer": "/allOf/1/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "allOf": [ - { - "properties": { - "foo": true - } - }, - { - "unevaluatedProperties": false - } - ] - }, - "type": "schema" - } - ] - ], - [ - [ - { - "data": 1, - "data_pointer": "/foo", - "schema": false, - "schema_pointer": "/allOf/0/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", "allOf": [ { - "unevaluatedProperties": false - }, - { - "properties": { - "foo": true + "patternProperties": { + "^bar": { + "type": "string" + } } } - ] + ], + "unevaluatedProperties": false }, "type": "schema" } @@ -22896,12 +22949,15 @@ ] ], [ + [ + + ], [ { - "data": "foo", - "data_pointer": "/foo", + "data": "not-baz", + "data_pointer": "/baz", "schema": false, - "schema_pointer": "/allOf/0/unevaluatedProperties", + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", @@ -22910,22 +22966,52 @@ "type": "string" } }, - "allOf": [ + "anyOf": [ { - "unevaluatedProperties": false + "properties": { + "bar": { + "const": "bar" + } + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "baz": { + "const": "baz" + } + }, + "required": [ + "baz" + ] + }, + { + "properties": { + "quux": { + "const": "quux" + } + }, + "required": [ + "quux" + ] } ], - "unevaluatedProperties": true + "unevaluatedProperties": false }, "type": "schema" } + ], + [ + ], [ { - "data": "foo", - "data_pointer": "/foo", + "data": "not-quux", + "data_pointer": "/quux", "schema": false, - "schema_pointer": "/allOf/0/unevaluatedProperties", + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", @@ -22934,20 +23020,54 @@ "type": "string" } }, - "allOf": [ + "anyOf": [ { - "unevaluatedProperties": false + "properties": { + "bar": { + "const": "bar" + } + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "baz": { + "const": "baz" + } + }, + "required": [ + "baz" + ] + }, + { + "properties": { + "quux": { + "const": "quux" + } + }, + "required": [ + "quux" + ] } ], - "unevaluatedProperties": true + "unevaluatedProperties": false }, "type": "schema" - }, + } + ] + ], + [ + [ + + ], + [ { - "data": "bar", - "data_pointer": "/bar", + "data": "quux", + "data_pointer": "/quux", "schema": false, - "schema_pointer": "/allOf/0/unevaluatedProperties", + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", @@ -22956,222 +23076,260 @@ "type": "string" } }, - "allOf": [ + "oneOf": [ { - "unevaluatedProperties": false + "properties": { + "bar": { + "const": "bar" + } + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "baz": { + "const": "baz" + } + }, + "required": [ + "baz" + ] } ], - "unevaluatedProperties": true + "unevaluatedProperties": false }, "type": "schema" } ] ], [ - [ - - ], [ { "data": "bar", "data_pointer": "/bar", "schema": false, - "schema_pointer": "/allOf/0/unevaluatedProperties", + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", - "allOf": [ - { + "properties": { + "foo": { + "type": "string" + } + }, + "not": { + "not": { "properties": { - "foo": { - "type": "string" + "bar": { + "const": "bar" } }, - "unevaluatedProperties": false + "required": [ + "bar" + ] } - ], - "unevaluatedProperties": true + }, + "unevaluatedProperties": false }, "type": "schema" } ] ], [ + [ + + ], [ { - "data": "foo", - "data_pointer": "/foo", + "data": "baz", + "data_pointer": "/baz", "schema": false, - "schema_pointer": "/allOf/1/unevaluatedProperties", + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", - "allOf": [ - { - "properties": { - "foo": { - "type": "string" - } - }, - "unevaluatedProperties": true + "if": { + "properties": { + "foo": { + "const": "then" + } }, - { - "unevaluatedProperties": false - } - ] + "required": [ + "foo" + ] + }, + "then": { + "properties": { + "bar": { + "type": "string" + } + }, + "required": [ + "bar" + ] + }, + "else": { + "properties": { + "baz": { + "type": "string" + } + }, + "required": [ + "baz" + ] + }, + "unevaluatedProperties": false }, "type": "schema" } + ], + [ + ], [ { - "data": "foo", + "data": "else", "data_pointer": "/foo", "schema": false, - "schema_pointer": "/allOf/1/unevaluatedProperties", + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", - "allOf": [ - { - "properties": { - "foo": { - "type": "string" - } - }, - "unevaluatedProperties": true + "if": { + "properties": { + "foo": { + "const": "then" + } }, - { - "unevaluatedProperties": false - } - ] - }, - "type": "schema" - }, - { - "data": "bar", - "data_pointer": "/bar", - "schema": false, - "schema_pointer": "/allOf/1/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object", - "allOf": [ - { - "properties": { - "foo": { - "type": "string" - } - }, - "unevaluatedProperties": true + "required": [ + "foo" + ] + }, + "then": { + "properties": { + "bar": { + "type": "string" + } }, - { - "unevaluatedProperties": false - } - ] + "required": [ + "bar" + ] + }, + "else": { + "properties": { + "baz": { + "type": "string" + } + }, + "required": [ + "baz" + ] + }, + "unevaluatedProperties": false }, "type": "schema" } ] ], [ - [ - - ], [ { "data": "bar", "data_pointer": "/bar", "schema": false, - "schema_pointer": "/allOf/1/unevaluatedProperties", + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", - "allOf": [ - { - "unevaluatedProperties": true + "if": { + "properties": { + "foo": { + "const": "then" + } }, - { - "properties": { - "foo": { - "type": "string" - } - }, - "unevaluatedProperties": false - } - ] + "required": [ + "foo" + ] + }, + "else": { + "properties": { + "baz": { + "type": "string" + } + }, + "required": [ + "baz" + ] + }, + "unevaluatedProperties": false }, "type": "schema" } - ] - ], - [ - [ - ], [ { - "data": "test", - "data_pointer": "/foo/faz", + "data": "bar", + "data_pointer": "/bar", "schema": false, - "schema_pointer": "/properties/foo/unevaluatedProperties", + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", - "properties": { - "foo": { - "type": "object", - "properties": { - "bar": { - "type": "string" - } - }, - "unevaluatedProperties": false - } + "if": { + "properties": { + "foo": { + "const": "then" + } + }, + "required": [ + "foo" + ] }, - "anyOf": [ - { - "properties": { - "foo": { - "properties": { - "faz": { - "type": "string" - } - } - } + "else": { + "properties": { + "baz": { + "type": "string" } - } - ] + }, + "required": [ + "baz" + ] + }, + "unevaluatedProperties": false }, "type": "schema" - } - ] - ], - [ - [ + }, { - "data": 1, - "data_pointer": "/bar", + "data": "baz", + "data_pointer": "/baz", "schema": false, - "schema_pointer": "/allOf/0/unevaluatedProperties", + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", - "allOf": [ - { - "properties": { - "foo": true - }, - "unevaluatedProperties": false - } - ], - "anyOf": [ - { - "properties": { - "bar": true + "if": { + "properties": { + "foo": { + "const": "then" } - } - ] + }, + "required": [ + "foo" + ] + }, + "else": { + "properties": { + "baz": { + "type": "string" + } + }, + "required": [ + "baz" + ] + }, + "unevaluatedProperties": false }, "type": "schema" } @@ -23181,967 +23339,927 @@ ], [ { - "data": 1, - "data_pointer": "/bar", + "data": "else", + "data_pointer": "/foo", "schema": false, - "schema_pointer": "/allOf/0/unevaluatedProperties", + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", - "allOf": [ - { - "properties": { - "foo": true - }, - "unevaluatedProperties": false - } - ], - "anyOf": [ - { - "properties": { - "bar": true + "if": { + "properties": { + "foo": { + "const": "then" } - } - ] + }, + "required": [ + "foo" + ] + }, + "else": { + "properties": { + "baz": { + "type": "string" + } + }, + "required": [ + "baz" + ] + }, + "unevaluatedProperties": false }, "type": "schema" } ] ], [ + [ + + ], [ { - "data": 1, - "data_pointer": "/foo", + "data": "baz", + "data_pointer": "/baz", "schema": false, - "schema_pointer": "/anyOf/0/unevaluatedProperties", + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", - "allOf": [ - { - "properties": { - "foo": true - } - } - ], - "anyOf": [ - { - "properties": { - "bar": true - }, - "unevaluatedProperties": false - } - ] + "if": { + "properties": { + "foo": { + "const": "then" + } + }, + "required": [ + "foo" + ] + }, + "then": { + "properties": { + "bar": { + "type": "string" + } + }, + "required": [ + "bar" + ] + }, + "unevaluatedProperties": false }, "type": "schema" } ], [ { - "data": 1, - "data_pointer": "/foo", + "data": "baz", + "data_pointer": "/baz", "schema": false, - "schema_pointer": "/anyOf/0/unevaluatedProperties", + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", - "allOf": [ - { - "properties": { - "foo": true + "if": { + "properties": { + "foo": { + "const": "then" } - } - ], - "anyOf": [ - { - "properties": { - "bar": true - }, - "unevaluatedProperties": false - } - ] + }, + "required": [ + "foo" + ] + }, + "then": { + "properties": { + "bar": { + "type": "string" + } + }, + "required": [ + "bar" + ] + }, + "unevaluatedProperties": false }, "type": "schema" } ], [ - + { + "data": "else", + "data_pointer": "/foo", + "schema": false, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "if": { + "properties": { + "foo": { + "const": "then" + } + }, + "required": [ + "foo" + ] + }, + "then": { + "properties": { + "bar": { + "type": "string" + } + }, + "required": [ + "bar" + ] + }, + "unevaluatedProperties": false + }, + "type": "schema" + }, + { + "data": "baz", + "data_pointer": "/baz", + "schema": false, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "if": { + "properties": { + "foo": { + "const": "then" + } + }, + "required": [ + "foo" + ] + }, + "then": { + "properties": { + "bar": { + "type": "string" + } + }, + "required": [ + "bar" + ] + }, + "unevaluatedProperties": false + }, + "type": "schema" + } ] ], [ [ - ], - [ - ], [ { - "data": { - }, - "data_pointer": "/y", + "data": "bar", + "data_pointer": "/bar", "schema": false, "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", "properties": { - "x": { - "$ref": "#" + "foo": { + "type": "string" + } + }, + "dependentSchemas": { + "foo": { + "properties": { + "bar": { + "const": "bar" + } + }, + "required": [ + "bar" + ] } }, "unevaluatedProperties": false }, "type": "schema" } - ], + ] + ], + [ [ ], [ { - "data": { - }, - "data_pointer": "/x/y", + "data": "bar", + "data_pointer": "/bar", "schema": false, "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", "properties": { - "x": { - "$ref": "#" + "foo": { + "type": "string" } }, + "allOf": [ + true + ], "unevaluatedProperties": false }, "type": "schema" } - ], + ] + ], + [ [ ], [ { - "data": { - }, - "data_pointer": "/x/x/y", + "data": "baz", + "data_pointer": "/baz", "schema": false, "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", + "$ref": "#/$defs/bar", "properties": { - "x": { - "$ref": "#" + "foo": { + "type": "string" } }, - "unevaluatedProperties": false + "unevaluatedProperties": false, + "$defs": { + "bar": { + "properties": { + "bar": { + "type": "string" + } + } + } + } }, "type": "schema" } ] ], [ + [ + + ], [ { - "data": { - }, - "data_pointer": "", - "schema": { - "required": [ - "x" - ], - "properties": { - "x": true - } - }, - "schema_pointer": "/$defs/two", + "data": "baz", + "data_pointer": "/baz", + "schema": false, + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } + "type": "object", + "unevaluatedProperties": false, + "properties": { + "foo": { + "type": "string" } }, - "allOf": [ - { - "$ref": "#/$defs/one" - }, - { + "$ref": "#/$defs/bar", + "$defs": { + "bar": { "properties": { - "b": true + "bar": { + "type": "string" + } } - }, - { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } - } - ] } - ], - "unevaluatedProperties": false - }, - "type": "required", - "details": { - "missing_keys": [ - "x" - ] - } - }, - { - "data": { - }, - "data_pointer": "", - "schema": { - "required": [ - "y" - ], - "properties": { - "y": true } }, - "schema_pointer": "/allOf/2/oneOf/1", + "type": "schema" + } + ] + ], + [ + [ + + ], + [ + { + "data": "b", + "data_pointer": "/branches/foo", + "schema": false, + "schema_pointer": "/$defs/tree/properties/branches/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } + "$id": "https://example.com/unevaluated-properties-with-recursive-ref/extended-tree", + "$recursiveAnchor": true, + "$ref": "./tree", + "properties": { + "name": { + "type": "string" } }, - "allOf": [ - { - "$ref": "#/$defs/one" - }, - { + "$defs": { + "tree": { + "$id": "./tree", + "$recursiveAnchor": true, + "type": "object", "properties": { - "b": true - } - }, - { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } + "node": true, + "branches": { + "$comment": "unevaluatedProperties comes first so it's more likely to bugs errors with implementations that are sensitive to keyword ordering", + "unevaluatedProperties": false, + "$recursiveRef": "#" } + }, + "required": [ + "node" ] } - ], - "unevaluatedProperties": false + } }, - "type": "required", - "details": { - "missing_keys": [ - "y" - ] - } + "type": "schema" } - ], + ] + ], + [ [ { - "data": { - "a": 1, - "b": 1 - }, - "data_pointer": "", - "schema": { - "required": [ - "x" - ], - "properties": { - "x": true - } - }, - "schema_pointer": "/$defs/two", + "data": 1, + "data_pointer": "/foo", + "schema": false, + "schema_pointer": "/allOf/1/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } - } - }, "allOf": [ - { - "$ref": "#/$defs/one" - }, { "properties": { - "b": true + "foo": true } }, { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } - } - ] + "unevaluatedProperties": false } - ], - "unevaluatedProperties": false - }, - "type": "required", - "details": { - "missing_keys": [ - "x" ] - } - }, - { - "data": { - "a": 1, - "b": 1 - }, - "data_pointer": "", - "schema": { - "required": [ - "y" - ], - "properties": { - "y": true - } }, - "schema_pointer": "/allOf/2/oneOf/1", + "type": "schema" + } + ] + ], + [ + [ + { + "data": 1, + "data_pointer": "/foo", + "schema": false, + "schema_pointer": "/allOf/0/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } - } - }, "allOf": [ { - "$ref": "#/$defs/one" + "unevaluatedProperties": false }, { "properties": { - "b": true + "foo": true } - }, - { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } - } - ] } - ], - "unevaluatedProperties": false - }, - "type": "required", - "details": { - "missing_keys": [ - "y" ] - } + }, + "type": "schema" } + ] + ], + [ + [ + + ], + [ + + ] + ], + [ + [ + ], + [ + + ] + ], + [ [ { - "data": { - "x": 1, - "y": 1 - }, - "data_pointer": "", - "schema": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } - } - ] - }, - "schema_pointer": "/allOf/2", + "data": "foo", + "data_pointer": "/foo", + "schema": false, + "schema_pointer": "/allOf/0/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } + "type": "object", + "properties": { + "foo": { + "type": "string" } }, "allOf": [ { - "$ref": "#/$defs/one" - }, - { - "properties": { - "b": true - } - }, - { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } - } - ] + "unevaluatedProperties": false } ], - "unevaluatedProperties": false + "unevaluatedProperties": true }, - "type": "oneOf" - }, + "type": "schema" + } + ], + [ { - "data": 1, - "data_pointer": "/x", + "data": "foo", + "data_pointer": "/foo", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/allOf/0/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } + "type": "object", + "properties": { + "foo": { + "type": "string" } }, "allOf": [ { - "$ref": "#/$defs/one" - }, - { - "properties": { - "b": true - } - }, - { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } - } - ] + "unevaluatedProperties": false } ], - "unevaluatedProperties": false + "unevaluatedProperties": true }, "type": "schema" }, { - "data": 1, - "data_pointer": "/y", + "data": "bar", + "data_pointer": "/bar", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/allOf/0/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } + "type": "object", + "properties": { + "foo": { + "type": "string" } }, "allOf": [ { - "$ref": "#/$defs/one" - }, - { - "properties": { - "b": true - } - }, - { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } - } - ] + "unevaluatedProperties": false } ], - "unevaluatedProperties": false + "unevaluatedProperties": true }, "type": "schema" } - ], - [ - - ], - [ - - ], - [ - - ], + ] + ], + [ [ ], [ { - "data": { - "a": 1, - "b": 1, - "x": 1, - "y": 1 - }, - "data_pointer": "", - "schema": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, + "data": "bar", + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/allOf/0/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "allOf": [ { - "required": [ - "y" - ], "properties": { - "y": true - } + "foo": { + "type": "string" + } + }, + "unevaluatedProperties": false } - ] + ], + "unevaluatedProperties": true }, - "schema_pointer": "/allOf/2", + "type": "schema" + } + ] + ], + [ + [ + { + "data": "foo", + "data_pointer": "/foo", + "schema": false, + "schema_pointer": "/allOf/1/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } - } - }, + "type": "object", "allOf": [ - { - "$ref": "#/$defs/one" - }, { "properties": { - "b": true - } + "foo": { + "type": "string" + } + }, + "unevaluatedProperties": true }, { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } - } - ] + "unevaluatedProperties": false } - ], - "unevaluatedProperties": false + ] }, - "type": "oneOf" - }, + "type": "schema" + } + ], + [ { - "data": 1, - "data_pointer": "/x", + "data": "foo", + "data_pointer": "/foo", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/allOf/1/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "properties": { - "a": true - } - }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } - } - }, + "type": "object", "allOf": [ - { - "$ref": "#/$defs/one" - }, { "properties": { - "b": true - } + "foo": { + "type": "string" + } + }, + "unevaluatedProperties": true }, { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } - } - ] + "unevaluatedProperties": false } - ], - "unevaluatedProperties": false + ] }, "type": "schema" }, { - "data": 1, - "data_pointer": "/y", + "data": "bar", + "data_pointer": "/bar", "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "/allOf/1/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { + "type": "object", + "allOf": [ + { "properties": { - "a": true - } + "foo": { + "type": "string" + } + }, + "unevaluatedProperties": true }, - "two": { - "required": [ - "x" - ], - "properties": { - "x": true - } + { + "unevaluatedProperties": false } - }, + ] + }, + "type": "schema" + } + ] + ], + [ + [ + + ], + [ + { + "data": "bar", + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/allOf/1/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", "allOf": [ { - "$ref": "#/$defs/one" + "unevaluatedProperties": true }, { "properties": { - "b": true - } - }, - { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "y" - ], - "properties": { - "y": true - } + "foo": { + "type": "string" } - ] + }, + "unevaluatedProperties": false } - ], - "unevaluatedProperties": false + ] }, "type": "schema" } ] ], [ + [ + + ], [ { - "data": { - }, - "data_pointer": "", - "schema": { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - "schema_pointer": "/$defs/two/oneOf/0", + "data": "test", + "data_pointer": "/foo/faz", + "schema": false, + "schema_pointer": "/properties/foo/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true + "type": "object", + "properties": { + "foo": { + "type": "object", + "properties": { + "bar": { + "type": "string" } - ] - }, - "two": { - "oneOf": [ - { - "required": [ - "c" - ], - "properties": { - "c": true - } - }, - { - "required": [ - "d" - ], + }, + "unevaluatedProperties": false + } + }, + "anyOf": [ + { + "properties": { + "foo": { "properties": { - "d": true + "faz": { + "type": "string" + } } } - ] + } } - }, - "oneOf": [ + ] + }, + "type": "schema" + } + ] + ], + [ + [ + { + "data": 1, + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/allOf/0/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "allOf": [ { - "$ref": "#/$defs/one" - }, + "properties": { + "foo": true + }, + "unevaluatedProperties": false + } + ], + "anyOf": [ { - "required": [ - "a" - ], "properties": { - "a": true + "bar": true } } - ], - "unevaluatedProperties": false + ] }, - "type": "required", - "details": { - "missing_keys": [ - "c" + "type": "schema" + } + ], + [ + + ], + [ + { + "data": 1, + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/allOf/0/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "allOf": [ + { + "properties": { + "foo": true + }, + "unevaluatedProperties": false + } + ], + "anyOf": [ + { + "properties": { + "bar": true + } + } ] - } - }, + }, + "type": "schema" + } + ] + ], + [ + [ + { + "data": 1, + "data_pointer": "/foo", + "schema": false, + "schema_pointer": "/anyOf/0/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "allOf": [ + { + "properties": { + "foo": true + } + } + ], + "anyOf": [ + { + "properties": { + "bar": true + }, + "unevaluatedProperties": false + } + ] + }, + "type": "schema" + } + ], + [ + { + "data": 1, + "data_pointer": "/foo", + "schema": false, + "schema_pointer": "/anyOf/0/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "allOf": [ + { + "properties": { + "foo": true + } + } + ], + "anyOf": [ + { + "properties": { + "bar": true + }, + "unevaluatedProperties": false + } + ] + }, + "type": "schema" + } + ], + [ + + ] + ], + [ + [ + + ], + [ + + ], + [ + { + "data": { + }, + "data_pointer": "/y", + "schema": false, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "properties": { + "x": { + "$ref": "#" + } + }, + "unevaluatedProperties": false + }, + "type": "schema" + } + ], + [ + + ], + [ + { + "data": { + }, + "data_pointer": "/x/y", + "schema": false, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "properties": { + "x": { + "$ref": "#" + } + }, + "unevaluatedProperties": false + }, + "type": "schema" + } + ], + [ + + ], + [ + { + "data": { + }, + "data_pointer": "/x/x/y", + "schema": false, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "properties": { + "x": { + "$ref": "#" + } + }, + "unevaluatedProperties": false + }, + "type": "schema" + } + ] + ], + [ + [ { "data": { }, "data_pointer": "", "schema": { "required": [ - "d" + "x" ], "properties": { - "d": true + "x": true } }, - "schema_pointer": "/$defs/two/oneOf/1", + "schema_pointer": "/$defs/two", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] + "properties": { + "a": true + } }, "two": { + "required": [ + "x" + ], + "properties": { + "x": true + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/one" + }, + { + "properties": { + "b": true + } + }, + { "oneOf": [ { - "required": [ - "c" - ], - "properties": { - "c": true - } + "$ref": "#/$defs/two" }, { "required": [ - "d" + "y" ], "properties": { - "d": true + "y": true } } ] } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } ], "unevaluatedProperties": false }, "type": "required", "details": { "missing_keys": [ - "d" + "x" ] } }, @@ -24151,349 +24269,369 @@ "data_pointer": "", "schema": { "required": [ - "b" + "y" ], "properties": { - "b": true + "y": true } }, - "schema_pointer": "/$defs/one/oneOf/1", + "schema_pointer": "/allOf/2/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] + "properties": { + "a": true + } }, "two": { + "required": [ + "x" + ], + "properties": { + "x": true + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/one" + }, + { + "properties": { + "b": true + } + }, + { "oneOf": [ { - "required": [ - "c" - ], - "properties": { - "c": true - } + "$ref": "#/$defs/two" }, { "required": [ - "d" + "y" ], "properties": { - "d": true + "y": true } } ] } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } ], "unevaluatedProperties": false }, "type": "required", "details": { "missing_keys": [ - "b" + "y" ] } - }, + } + ], + [ { "data": { + "a": 1, + "b": 1 }, "data_pointer": "", "schema": { "required": [ - "xx" + "x" ], - "patternProperties": { + "properties": { "x": true } }, - "schema_pointer": "/$defs/one/oneOf/2", + "schema_pointer": "/$defs/two", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] + "properties": { + "a": true + } }, "two": { + "required": [ + "x" + ], + "properties": { + "x": true + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/one" + }, + { + "properties": { + "b": true + } + }, + { "oneOf": [ { - "required": [ - "c" - ], - "properties": { - "c": true - } + "$ref": "#/$defs/two" }, { "required": [ - "d" + "y" ], "properties": { - "d": true + "y": true } } ] } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } ], "unevaluatedProperties": false }, "type": "required", "details": { "missing_keys": [ - "xx" + "x" ] } }, { "data": { + "a": 1, + "b": 1 }, "data_pointer": "", "schema": { "required": [ - "all" + "y" ], - "unevaluatedProperties": true + "properties": { + "y": true + } }, - "schema_pointer": "/$defs/one/oneOf/3", + "schema_pointer": "/allOf/2/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] + "properties": { + "a": true + } }, "two": { + "required": [ + "x" + ], + "properties": { + "x": true + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/one" + }, + { + "properties": { + "b": true + } + }, + { "oneOf": [ { - "required": [ - "c" - ], - "properties": { - "c": true - } + "$ref": "#/$defs/two" }, { "required": [ - "d" + "y" ], "properties": { - "d": true + "y": true } } ] } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } ], "unevaluatedProperties": false }, "type": "required", "details": { "missing_keys": [ - "all" + "y" ] } - }, + } + ], + [ { "data": { - }, + "x": 1, + "y": 1 + }, "data_pointer": "", "schema": { - "required": [ - "a" - ], - "properties": { - "a": true - } + "oneOf": [ + { + "$ref": "#/$defs/two" + }, + { + "required": [ + "y" + ], + "properties": { + "y": true + } + } + ] }, - "schema_pointer": "/oneOf/1", + "schema_pointer": "/allOf/2", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { + "properties": { + "a": true + } + }, + "two": { + "required": [ + "x" + ], + "properties": { + "x": true + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/one" + }, + { + "properties": { + "b": true + } + }, + { "oneOf": [ { "$ref": "#/$defs/two" }, { "required": [ - "b" + "y" ], "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true + "y": true } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true } ] + } + ], + "unevaluatedProperties": false + }, + "type": "oneOf" + }, + { + "data": 1, + "data_pointer": "/x", + "schema": false, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$defs": { + "one": { + "properties": { + "a": true + } }, "two": { + "required": [ + "x" + ], + "properties": { + "x": true + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/one" + }, + { + "properties": { + "b": true + } + }, + { "oneOf": [ { - "required": [ - "c" - ], - "properties": { - "c": true - } + "$ref": "#/$defs/two" }, { "required": [ - "d" + "y" ], "properties": { - "d": true + "y": true } } ] } + ], + "unevaluatedProperties": false + }, + "type": "schema" + }, + { + "data": 1, + "data_pointer": "/y", + "schema": false, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$defs": { + "one": { + "properties": { + "a": true + } + }, + "two": { + "required": [ + "x" + ], + "properties": { + "x": true + } + } }, - "oneOf": [ + "allOf": [ { "$ref": "#/$defs/one" }, { - "required": [ - "a" - ], "properties": { - "a": true + "b": true } + }, + { + "oneOf": [ + { + "$ref": "#/$defs/two" + }, + { + "required": [ + "y" + ], + "properties": { + "y": true + } + } + ] } ], "unevaluatedProperties": false }, - "type": "required", - "details": { - "missing_keys": [ - "a" - ] - } + "type": "schema" } ], [ @@ -24512,157 +24650,193 @@ { "data": { "a": 1, - "b": 1 + "b": 1, + "x": 1, + "y": 1 }, "data_pointer": "", "schema": { + "oneOf": [ + { + "$ref": "#/$defs/two" + }, + { + "required": [ + "y" + ], + "properties": { + "y": true + } + } + ] + }, + "schema_pointer": "/allOf/2", + "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] + "properties": { + "a": true + } }, "two": { + "required": [ + "x" + ], + "properties": { + "x": true + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/one" + }, + { + "properties": { + "b": true + } + }, + { "oneOf": [ { - "required": [ - "c" - ], - "properties": { - "c": true - } + "$ref": "#/$defs/two" }, { "required": [ - "d" + "y" ], "properties": { - "d": true + "y": true } } ] } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } ], "unevaluatedProperties": false }, - "schema_pointer": "", + "type": "oneOf" + }, + { + "data": 1, + "data_pointer": "/x", + "schema": false, + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { + "properties": { + "a": true + } + }, + "two": { + "required": [ + "x" + ], + "properties": { + "x": true + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/one" + }, + { + "properties": { + "b": true + } + }, + { "oneOf": [ { "$ref": "#/$defs/two" }, { "required": [ - "b" + "y" ], "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true + "y": true } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true } ] + } + ], + "unevaluatedProperties": false + }, + "type": "schema" + }, + { + "data": 1, + "data_pointer": "/y", + "schema": false, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$defs": { + "one": { + "properties": { + "a": true + } }, "two": { + "required": [ + "x" + ], + "properties": { + "x": true + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/one" + }, + { + "properties": { + "b": true + } + }, + { "oneOf": [ { - "required": [ - "c" - ], - "properties": { - "c": true - } + "$ref": "#/$defs/two" }, { "required": [ - "d" + "y" ], "properties": { - "d": true + "y": true } } ] } - }, - "oneOf": [ - { - "$ref": "#/$defs/one" - }, - { - "required": [ - "a" - ], - "properties": { - "a": true - } - } ], "unevaluatedProperties": false }, - "type": "oneOf" + "type": "schema" } - ], + ] + ], + [ [ { "data": { - "a": 1, - "c": 1 }, "data_pointer": "", "schema": { + "required": [ + "c" + ], + "properties": { + "c": true + } + }, + "schema_pointer": "/$defs/two/oneOf/0", + "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { @@ -24730,7 +24904,26 @@ ], "unevaluatedProperties": false }, - "schema_pointer": "", + "type": "required", + "details": { + "missing_keys": [ + "c" + ] + } + }, + { + "data": { + }, + "data_pointer": "", + "schema": { + "required": [ + "d" + ], + "properties": { + "d": true + } + }, + "schema_pointer": "/$defs/two/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -24799,17 +24992,27 @@ ], "unevaluatedProperties": false }, - "type": "oneOf" - } - ], - [ + "type": "required", + "details": { + "missing_keys": [ + "d" + ] + } + }, { "data": { - "a": 1, - "d": 1 }, "data_pointer": "", "schema": { + "required": [ + "b" + ], + "properties": { + "b": true + } + }, + "schema_pointer": "/$defs/one/oneOf/1", + "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { @@ -24877,7 +25080,26 @@ ], "unevaluatedProperties": false }, - "schema_pointer": "", + "type": "required", + "details": { + "missing_keys": [ + "b" + ] + } + }, + { + "data": { + }, + "data_pointer": "", + "schema": { + "required": [ + "xx" + ], + "patternProperties": { + "x": true + } + }, + "schema_pointer": "/$defs/one/oneOf/2", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -24946,46 +25168,24 @@ ], "unevaluatedProperties": false }, - "type": "oneOf" - } - ], - [ + "type": "required", + "details": { + "missing_keys": [ + "xx" + ] + } + }, { "data": { - "b": 1, - "c": 1 }, "data_pointer": "", "schema": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] + "required": [ + "all" + ], + "unevaluatedProperties": true }, - "schema_pointer": "/$defs/one", + "schema_pointer": "/$defs/one/oneOf/3", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -25054,12 +25254,15 @@ ], "unevaluatedProperties": false }, - "type": "oneOf" + "type": "required", + "details": { + "missing_keys": [ + "all" + ] + } }, { "data": { - "b": 1, - "c": 1 }, "data_pointer": "", "schema": { @@ -25145,14 +25348,29 @@ "a" ] } - }, - { - "data": 1, - "data_pointer": "/b", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", + } + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + { + "data": { + "a": 1, + "b": 1 + }, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { "oneOf": [ @@ -25219,13 +25437,7 @@ ], "unevaluatedProperties": false }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/c", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -25294,47 +25506,17 @@ ], "unevaluatedProperties": false }, - "type": "schema" + "type": "oneOf" } ], [ { "data": { - "b": 1, - "d": 1 + "a": 1, + "c": 1 }, "data_pointer": "", "schema": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "schema_pointer": "/$defs/one", - "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { @@ -25402,23 +25584,7 @@ ], "unevaluatedProperties": false }, - "type": "oneOf" - }, - { - "data": { - "b": 1, - "d": 1 - }, - "data_pointer": "", - "schema": { - "required": [ - "a" - ], - "properties": { - "a": true - } - }, - "schema_pointer": "/oneOf/1", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -25487,19 +25653,17 @@ ], "unevaluatedProperties": false }, - "type": "required", - "details": { - "missing_keys": [ - "a" - ] - } - }, + "type": "oneOf" + } + ], + [ { - "data": 1, - "data_pointer": "/b", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { + "data": { + "a": 1, + "d": 1 + }, + "data_pointer": "", + "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { @@ -25567,13 +25731,7 @@ ], "unevaluatedProperties": false }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/d", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -25642,37 +25800,46 @@ ], "unevaluatedProperties": false }, - "type": "schema" + "type": "oneOf" } ], [ { "data": { - "c": 1, - "d": 1 + "b": 1, + "c": 1 }, "data_pointer": "", "schema": { "oneOf": [ + { + "$ref": "#/$defs/two" + }, { "required": [ - "c" + "b" ], "properties": { - "c": true + "b": true } }, { "required": [ - "d" + "xx" ], - "properties": { - "d": true + "patternProperties": { + "x": true } + }, + { + "required": [ + "all" + ], + "unevaluatedProperties": true } ] }, - "schema_pointer": "/$defs/two", + "schema_pointer": "/$defs/one", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -25745,19 +25912,19 @@ }, { "data": { - "c": 1, - "d": 1 + "b": 1, + "c": 1 }, "data_pointer": "", "schema": { "required": [ - "b" + "a" ], "properties": { - "b": true + "a": true } }, - "schema_pointer": "/$defs/one/oneOf/1", + "schema_pointer": "/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -25829,25 +25996,15 @@ "type": "required", "details": { "missing_keys": [ - "b" + "a" ] } }, { - "data": { - "c": 1, - "d": 1 - }, - "data_pointer": "", - "schema": { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - "schema_pointer": "/$defs/one/oneOf/2", + "data": 1, + "data_pointer": "/b", + "schema": false, + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -25916,26 +26073,13 @@ ], "unevaluatedProperties": false }, - "type": "required", - "details": { - "missing_keys": [ - "xx" - ] - } + "type": "schema" }, { - "data": { - "c": 1, - "d": 1 - }, - "data_pointer": "", - "schema": { - "required": [ - "all" - ], - "unevaluatedProperties": true - }, - "schema_pointer": "/$defs/one/oneOf/3", + "data": 1, + "data_pointer": "/c", + "schema": false, + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -26004,28 +26148,46 @@ ], "unevaluatedProperties": false }, - "type": "required", - "details": { - "missing_keys": [ - "all" - ] - } - }, + "type": "schema" + } + ], + [ { "data": { - "c": 1, + "b": 1, "d": 1 }, "data_pointer": "", "schema": { - "required": [ - "a" - ], - "properties": { - "a": true - } + "oneOf": [ + { + "$ref": "#/$defs/two" + }, + { + "required": [ + "b" + ], + "properties": { + "b": true + } + }, + { + "required": [ + "xx" + ], + "patternProperties": { + "x": true + } + }, + { + "required": [ + "all" + ], + "unevaluatedProperties": true + } + ] }, - "schema_pointer": "/oneOf/1", + "schema_pointer": "/$defs/one", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -26094,20 +26256,25 @@ ], "unevaluatedProperties": false }, - "type": "required", - "details": { - "missing_keys": [ - "a" - ] - } + "type": "oneOf" }, { - "data": 1, - "data_pointer": "/c", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", + "data": { + "b": 1, + "d": 1 + }, + "data_pointer": "", + "schema": { + "required": [ + "a" + ], + "properties": { + "a": true + } + }, + "schema_pointer": "/oneOf/1", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { "oneOf": [ @@ -26174,11 +26341,16 @@ ], "unevaluatedProperties": false }, - "type": "schema" + "type": "required", + "details": { + "missing_keys": [ + "a" + ] + } }, { "data": 1, - "data_pointer": "/d", + "data_pointer": "/b", "schema": false, "schema_pointer": "/unevaluatedProperties", "root_schema": { @@ -26250,18 +26422,10 @@ "unevaluatedProperties": false }, "type": "schema" - } - ], - [ - - ], - [ - - ], - [ + }, { "data": 1, - "data_pointer": "/foo", + "data_pointer": "/d", "schema": false, "schema_pointer": "/unevaluatedProperties", "root_schema": { @@ -26338,11 +26502,32 @@ [ { "data": { - "xx": 1, - "a": 1 + "c": 1, + "d": 1 }, "data_pointer": "", "schema": { + "oneOf": [ + { + "required": [ + "c" + ], + "properties": { + "c": true + } + }, + { + "required": [ + "d" + ], + "properties": { + "d": true + } + } + ] + }, + "schema_pointer": "/$defs/two", + "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { @@ -26410,7 +26595,23 @@ ], "unevaluatedProperties": false }, - "schema_pointer": "", + "type": "oneOf" + }, + { + "data": { + "c": 1, + "d": 1 + }, + "data_pointer": "", + "schema": { + "required": [ + "b" + ], + "properties": { + "b": true + } + }, + "schema_pointer": "/$defs/one/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -26479,46 +26680,28 @@ ], "unevaluatedProperties": false }, - "type": "oneOf" - } - ], - [ + "type": "required", + "details": { + "missing_keys": [ + "b" + ] + } + }, { "data": { - "xx": 1, - "b": 1 + "c": 1, + "d": 1 }, "data_pointer": "", "schema": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] + "required": [ + "xx" + ], + "patternProperties": { + "x": true + } }, - "schema_pointer": "/$defs/one", + "schema_pointer": "/$defs/one/oneOf/2", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -26587,23 +26770,26 @@ ], "unevaluatedProperties": false }, - "type": "oneOf" + "type": "required", + "details": { + "missing_keys": [ + "xx" + ] + } }, { "data": { - "xx": 1, - "b": 1 + "c": 1, + "d": 1 }, "data_pointer": "", "schema": { "required": [ - "a" + "all" ], - "properties": { - "a": true - } + "unevaluatedProperties": true }, - "schema_pointer": "/oneOf/1", + "schema_pointer": "/$defs/one/oneOf/3", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -26675,15 +26861,25 @@ "type": "required", "details": { "missing_keys": [ - "a" + "all" ] } }, { - "data": 1, - "data_pointer": "/xx", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "data": { + "c": 1, + "d": 1 + }, + "data_pointer": "", + "schema": { + "required": [ + "a" + ], + "properties": { + "a": true + } + }, + "schema_pointer": "/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -26752,11 +26948,16 @@ ], "unevaluatedProperties": false }, - "type": "schema" + "type": "required", + "details": { + "missing_keys": [ + "a" + ] + } }, { "data": 1, - "data_pointer": "/b", + "data_pointer": "/c", "schema": false, "schema_pointer": "/unevaluatedProperties", "root_schema": { @@ -26828,45 +27029,12 @@ "unevaluatedProperties": false }, "type": "schema" - } - ], - [ + }, { - "data": { - "xx": 1, - "c": 1 - }, - "data_pointer": "", - "schema": { - "oneOf": [ - { - "$ref": "#/$defs/two" - }, - { - "required": [ - "b" - ], - "properties": { - "b": true - } - }, - { - "required": [ - "xx" - ], - "patternProperties": { - "x": true - } - }, - { - "required": [ - "all" - ], - "unevaluatedProperties": true - } - ] - }, - "schema_pointer": "/$defs/one", + "data": 1, + "data_pointer": "/d", + "schema": false, + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -26935,23 +27103,21 @@ ], "unevaluatedProperties": false }, - "type": "oneOf" - }, + "type": "schema" + } + ], + [ + + ], + [ + + ], + [ { - "data": { - "xx": 1, - "c": 1 - }, - "data_pointer": "", - "schema": { - "required": [ - "a" - ], - "properties": { - "a": true - } - }, - "schema_pointer": "/oneOf/1", + "data": 1, + "data_pointer": "/foo", + "schema": false, + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -27020,19 +27186,17 @@ ], "unevaluatedProperties": false }, - "type": "required", - "details": { - "missing_keys": [ - "a" - ] - } - }, + "type": "schema" + } + ], + [ { - "data": 1, - "data_pointer": "/xx", - "schema": false, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { + "data": { + "xx": 1, + "a": 1 + }, + "data_pointer": "", + "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { @@ -27100,13 +27264,7 @@ ], "unevaluatedProperties": false }, - "type": "schema" - }, - { - "data": 1, - "data_pointer": "/c", - "schema": false, - "schema_pointer": "/unevaluatedProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -27175,14 +27333,14 @@ ], "unevaluatedProperties": false }, - "type": "schema" + "type": "oneOf" } ], [ { "data": { "xx": 1, - "d": 1 + "b": 1 }, "data_pointer": "", "schema": { @@ -27288,7 +27446,7 @@ { "data": { "xx": 1, - "d": 1 + "b": 1 }, "data_pointer": "", "schema": { @@ -27452,7 +27610,7 @@ }, { "data": 1, - "data_pointer": "/d", + "data_pointer": "/b", "schema": false, "schema_pointer": "/unevaluatedProperties", "root_schema": { @@ -27525,21 +27683,45 @@ }, "type": "schema" } - ], - [ - - ], - [ - ], [ { "data": { - "all": 1, - "a": 1 + "xx": 1, + "c": 1 }, "data_pointer": "", "schema": { + "oneOf": [ + { + "$ref": "#/$defs/two" + }, + { + "required": [ + "b" + ], + "properties": { + "b": true + } + }, + { + "required": [ + "xx" + ], + "patternProperties": { + "x": true + } + }, + { + "required": [ + "all" + ], + "unevaluatedProperties": true + } + ] + }, + "schema_pointer": "/$defs/one", + "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { "one": { @@ -27607,7 +27789,23 @@ ], "unevaluatedProperties": false }, - "schema_pointer": "", + "type": "oneOf" + }, + { + "data": { + "xx": 1, + "c": 1 + }, + "data_pointer": "", + "schema": { + "required": [ + "a" + ], + "properties": { + "a": true + } + }, + "schema_pointer": "/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "$defs": { @@ -27676,108 +27874,764 @@ ], "unevaluatedProperties": false }, - "type": "oneOf" - } - ] - ], - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ] - ], - [ - [ - - ] - ], - [ - [ - - ], - [ - { - "data": "b", - "data_pointer": "/a", - "schema": { - "type": "number" - }, - "schema_pointer": "/unevaluatedProperties", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "propertyNames": { - "maxLength": 1 - }, - "unevaluatedProperties": { - "type": "number" - } - }, - "type": "number" - } - ] - ], - [ - [ - - ], - [ + "type": "required", + "details": { + "missing_keys": [ + "a" + ] + } + }, { - "data": "a", - "data_pointer": "/bar", + "data": 1, + "data_pointer": "/xx", "schema": false, "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "if": { - "patternProperties": { - "foo": { - "type": "string" - } + "$defs": { + "one": { + "oneOf": [ + { + "$ref": "#/$defs/two" + }, + { + "required": [ + "b" + ], + "properties": { + "b": true + } + }, + { + "required": [ + "xx" + ], + "patternProperties": { + "x": true + } + }, + { + "required": [ + "all" + ], + "unevaluatedProperties": true + } + ] + }, + "two": { + "oneOf": [ + { + "required": [ + "c" + ], + "properties": { + "c": true + } + }, + { + "required": [ + "d" + ], + "properties": { + "d": true + } + } + ] } }, + "oneOf": [ + { + "$ref": "#/$defs/one" + }, + { + "required": [ + "a" + ], + "properties": { + "a": true + } + } + ], "unevaluatedProperties": false }, "type": "schema" - } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/uniqueItems.json": [ - [ - [ - - ], - [ + }, { - "data": [ - 1, - 1 - ], - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "uniqueItems": true - }, - "schema_pointer": "", + "data": 1, + "data_pointer": "/c", + "schema": false, + "schema_pointer": "/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "uniqueItems": true - }, - "type": "uniqueItems" + "$defs": { + "one": { + "oneOf": [ + { + "$ref": "#/$defs/two" + }, + { + "required": [ + "b" + ], + "properties": { + "b": true + } + }, + { + "required": [ + "xx" + ], + "patternProperties": { + "x": true + } + }, + { + "required": [ + "all" + ], + "unevaluatedProperties": true + } + ] + }, + "two": { + "oneOf": [ + { + "required": [ + "c" + ], + "properties": { + "c": true + } + }, + { + "required": [ + "d" + ], + "properties": { + "d": true + } + } + ] + } + }, + "oneOf": [ + { + "$ref": "#/$defs/one" + }, + { + "required": [ + "a" + ], + "properties": { + "a": true + } + } + ], + "unevaluatedProperties": false + }, + "type": "schema" + } + ], + [ + { + "data": { + "xx": 1, + "d": 1 + }, + "data_pointer": "", + "schema": { + "oneOf": [ + { + "$ref": "#/$defs/two" + }, + { + "required": [ + "b" + ], + "properties": { + "b": true + } + }, + { + "required": [ + "xx" + ], + "patternProperties": { + "x": true + } + }, + { + "required": [ + "all" + ], + "unevaluatedProperties": true + } + ] + }, + "schema_pointer": "/$defs/one", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$defs": { + "one": { + "oneOf": [ + { + "$ref": "#/$defs/two" + }, + { + "required": [ + "b" + ], + "properties": { + "b": true + } + }, + { + "required": [ + "xx" + ], + "patternProperties": { + "x": true + } + }, + { + "required": [ + "all" + ], + "unevaluatedProperties": true + } + ] + }, + "two": { + "oneOf": [ + { + "required": [ + "c" + ], + "properties": { + "c": true + } + }, + { + "required": [ + "d" + ], + "properties": { + "d": true + } + } + ] + } + }, + "oneOf": [ + { + "$ref": "#/$defs/one" + }, + { + "required": [ + "a" + ], + "properties": { + "a": true + } + } + ], + "unevaluatedProperties": false + }, + "type": "oneOf" + }, + { + "data": { + "xx": 1, + "d": 1 + }, + "data_pointer": "", + "schema": { + "required": [ + "a" + ], + "properties": { + "a": true + } + }, + "schema_pointer": "/oneOf/1", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$defs": { + "one": { + "oneOf": [ + { + "$ref": "#/$defs/two" + }, + { + "required": [ + "b" + ], + "properties": { + "b": true + } + }, + { + "required": [ + "xx" + ], + "patternProperties": { + "x": true + } + }, + { + "required": [ + "all" + ], + "unevaluatedProperties": true + } + ] + }, + "two": { + "oneOf": [ + { + "required": [ + "c" + ], + "properties": { + "c": true + } + }, + { + "required": [ + "d" + ], + "properties": { + "d": true + } + } + ] + } + }, + "oneOf": [ + { + "$ref": "#/$defs/one" + }, + { + "required": [ + "a" + ], + "properties": { + "a": true + } + } + ], + "unevaluatedProperties": false + }, + "type": "required", + "details": { + "missing_keys": [ + "a" + ] + } + }, + { + "data": 1, + "data_pointer": "/xx", + "schema": false, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$defs": { + "one": { + "oneOf": [ + { + "$ref": "#/$defs/two" + }, + { + "required": [ + "b" + ], + "properties": { + "b": true + } + }, + { + "required": [ + "xx" + ], + "patternProperties": { + "x": true + } + }, + { + "required": [ + "all" + ], + "unevaluatedProperties": true + } + ] + }, + "two": { + "oneOf": [ + { + "required": [ + "c" + ], + "properties": { + "c": true + } + }, + { + "required": [ + "d" + ], + "properties": { + "d": true + } + } + ] + } + }, + "oneOf": [ + { + "$ref": "#/$defs/one" + }, + { + "required": [ + "a" + ], + "properties": { + "a": true + } + } + ], + "unevaluatedProperties": false + }, + "type": "schema" + }, + { + "data": 1, + "data_pointer": "/d", + "schema": false, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$defs": { + "one": { + "oneOf": [ + { + "$ref": "#/$defs/two" + }, + { + "required": [ + "b" + ], + "properties": { + "b": true + } + }, + { + "required": [ + "xx" + ], + "patternProperties": { + "x": true + } + }, + { + "required": [ + "all" + ], + "unevaluatedProperties": true + } + ] + }, + "two": { + "oneOf": [ + { + "required": [ + "c" + ], + "properties": { + "c": true + } + }, + { + "required": [ + "d" + ], + "properties": { + "d": true + } + } + ] + } + }, + "oneOf": [ + { + "$ref": "#/$defs/one" + }, + { + "required": [ + "a" + ], + "properties": { + "a": true + } + } + ], + "unevaluatedProperties": false + }, + "type": "schema" + } + ], + [ + + ], + [ + + ], + [ + { + "data": { + "all": 1, + "a": 1 + }, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$defs": { + "one": { + "oneOf": [ + { + "$ref": "#/$defs/two" + }, + { + "required": [ + "b" + ], + "properties": { + "b": true + } + }, + { + "required": [ + "xx" + ], + "patternProperties": { + "x": true + } + }, + { + "required": [ + "all" + ], + "unevaluatedProperties": true + } + ] + }, + "two": { + "oneOf": [ + { + "required": [ + "c" + ], + "properties": { + "c": true + } + }, + { + "required": [ + "d" + ], + "properties": { + "d": true + } + } + ] + } + }, + "oneOf": [ + { + "$ref": "#/$defs/one" + }, + { + "required": [ + "a" + ], + "properties": { + "a": true + } + } + ], + "unevaluatedProperties": false + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$defs": { + "one": { + "oneOf": [ + { + "$ref": "#/$defs/two" + }, + { + "required": [ + "b" + ], + "properties": { + "b": true + } + }, + { + "required": [ + "xx" + ], + "patternProperties": { + "x": true + } + }, + { + "required": [ + "all" + ], + "unevaluatedProperties": true + } + ] + }, + "two": { + "oneOf": [ + { + "required": [ + "c" + ], + "properties": { + "c": true + } + }, + { + "required": [ + "d" + ], + "properties": { + "d": true + } + } + ] + } + }, + "oneOf": [ + { + "$ref": "#/$defs/one" + }, + { + "required": [ + "a" + ], + "properties": { + "a": true + } + } + ], + "unevaluatedProperties": false + }, + "type": "oneOf" + } + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ] + ], + [ + [ + + ], + [ + { + "data": "b", + "data_pointer": "/a", + "schema": { + "type": "number" + }, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "propertyNames": { + "maxLength": 1 + }, + "unevaluatedProperties": { + "type": "number" + } + }, + "type": "number" + } + ] + ], + [ + [ + + ], + [ + { + "data": "a", + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "if": { + "patternProperties": { + "foo": { + "type": "string" + } + } + }, + "unevaluatedProperties": false + }, + "type": "schema" + } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2019-09/uniqueItems.json": [ + [ + [ + + ], + [ + { + "data": [ + 1, + 1 + ], + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "uniqueItems": true + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "uniqueItems": true + }, + "type": "uniqueItems" } ], [ @@ -27962,185 +28816,25 @@ ], [ { - "data": [ - [ - "foo" - ], - [ - "bar" - ], - [ - "foo" - ] - ], - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "uniqueItems": true - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "uniqueItems": true - }, - "type": "uniqueItems" - } - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - { - "data": [ - { - }, - [ - 1 - ], - true, - null, - { - }, - 1 - ], - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "uniqueItems": true - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "uniqueItems": true - }, - "type": "uniqueItems" - } - ], - [ - - ], - [ - { - "data": [ - { - "a": 1, - "b": 2 - }, - { - "b": 2, - "a": 1 - } - ], - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "uniqueItems": true - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "uniqueItems": true - }, - "type": "uniqueItems" - } - ], - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - - ], - [ - { - "data": [ - false, - false - ], - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true - }, - "type": "uniqueItems" - } - ], - [ - { - "data": [ - true, - true + "data": [ + [ + "foo" + ], + [ + "bar" + ], + [ + "foo" + ] ], "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], "uniqueItems": true }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], "uniqueItems": true }, "type": "uniqueItems" @@ -28151,80 +28845,82 @@ ], [ + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { "data": [ - false, + { + }, + [ + 1 + ], true, - "foo", - "foo" + null, + { + }, + 1 ], "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], "uniqueItems": true }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], "uniqueItems": true }, "type": "uniqueItems" } + ], + [ + ], [ { "data": [ - true, - false, - "foo", - "foo" + { + "a": 1, + "b": 2 + }, + { + "b": 2, + "a": 1 + } ], "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], "uniqueItems": true }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], "uniqueItems": true }, "type": "uniqueItems" } + ], + [ + + ], + [ + ] ], [ @@ -28251,8 +28947,7 @@ "type": "boolean" } ], - "uniqueItems": true, - "additionalItems": false + "uniqueItems": true }, "schema_pointer": "", "root_schema": { @@ -28265,8 +28960,7 @@ "type": "boolean" } ], - "uniqueItems": true, - "additionalItems": false + "uniqueItems": true }, "type": "uniqueItems" } @@ -28279,150 +28973,18 @@ ], "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true, - "additionalItems": false - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true, - "additionalItems": false - }, - "type": "uniqueItems" - } - ], - [ - { - "data": null, - "data_pointer": "/2", - "schema": false, - "schema_pointer": "/additionalItems", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true, - "additionalItems": false - }, - "type": "schema" - } - ] - ], - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - { - "data": null, - "data_pointer": "/2", - "schema": false, - "schema_pointer": "/additionalItems", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "items": [ + { + "type": "boolean" + }, + { + "type": "boolean" + } + ], + "uniqueItems": true + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", "items": [ @@ -28433,345 +28995,302 @@ "type": "boolean" } ], - "uniqueItems": false, - "additionalItems": false + "uniqueItems": true }, - "type": "schema" + "type": "uniqueItems" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2019-09/unknownKeyword.json": [ - [ + ], + [ + + ], [ ], [ { - "data": null, + "data": [ + false, + true, + "foo", + "foo" + ], "data_pointer": "", "schema": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "schema_pointer": "/$defs/id_in_unknown0", - "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/id_in_unknown0" - }, + "items": [ { - "$ref": "#/$defs/id_in_unknown1" + "type": "boolean" }, { - "$ref": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json" - } - ] - }, - "type": "not" - }, - { - "data": null, - "data_pointer": "", - "schema": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "integer" - } + "type": "boolean" } - } + ], + "uniqueItems": true }, - "schema_pointer": "/$defs/id_in_unknown1", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/id_in_unknown0" - }, + "items": [ { - "$ref": "#/$defs/id_in_unknown1" + "type": "boolean" }, { - "$ref": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json" + "type": "boolean" } - ] + ], + "uniqueItems": true }, - "type": "not" - }, + "type": "uniqueItems" + } + ], + [ { - "data": null, + "data": [ + true, + false, + "foo", + "foo" + ], "data_pointer": "", "schema": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "string" - }, - "schema_pointer": "/$defs/real_id_in_schema", - "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ + "items": [ { - "$ref": "#/$defs/id_in_unknown0" + "type": "boolean" }, { - "$ref": "#/$defs/id_in_unknown1" + "type": "boolean" + } + ], + "uniqueItems": true + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "items": [ + { + "type": "boolean" }, { - "$ref": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json" + "type": "boolean" } - ] + ], + "uniqueItems": true }, - "type": "string" + "type": "uniqueItems" } + ] + ], + [ + [ + + ], + [ + ], [ { - "data": 1, + "data": [ + false, + false + ], "data_pointer": "", - "schema": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "schema_pointer": "/$defs/id_in_unknown0", - "root_schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ + "schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "items": [ { - "$ref": "#/$defs/id_in_unknown0" + "type": "boolean" }, { - "$ref": "#/$defs/id_in_unknown1" + "type": "boolean" + } + ], + "uniqueItems": true, + "additionalItems": false + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "items": [ + { + "type": "boolean" }, { - "$ref": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json" + "type": "boolean" } - ] + ], + "uniqueItems": true, + "additionalItems": false }, - "type": "not" - }, + "type": "uniqueItems" + } + ], + [ { - "data": 1, + "data": [ + true, + true + ], "data_pointer": "", "schema": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "integer" - } + "$schema": "https://json-schema.org/draft/2019-09/schema", + "items": [ + { + "type": "boolean" + }, + { + "type": "boolean" } - } + ], + "uniqueItems": true, + "additionalItems": false }, - "schema_pointer": "/$defs/id_in_unknown1", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/id_in_unknown0" - }, + "items": [ { - "$ref": "#/$defs/id_in_unknown1" + "type": "boolean" }, { - "$ref": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json" + "type": "boolean" } - ] + ], + "uniqueItems": true, + "additionalItems": false }, - "type": "not" - }, + "type": "uniqueItems" + } + ], + [ { - "data": 1, - "data_pointer": "", - "schema": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "string" - }, - "schema_pointer": "/$defs/real_id_in_schema", + "data": null, + "data_pointer": "/2", + "schema": false, + "schema_pointer": "/additionalItems", "root_schema": { "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ + "items": [ { - "$ref": "#/$defs/id_in_unknown0" + "type": "boolean" }, { - "$ref": "#/$defs/id_in_unknown1" + "type": "boolean" + } + ], + "uniqueItems": true, + "additionalItems": false + }, + "type": "schema" + } + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + { + "data": null, + "data_pointer": "/2", + "schema": false, + "schema_pointer": "/additionalItems", + "root_schema": { + "$schema": "https://json-schema.org/draft/2019-09/schema", + "items": [ + { + "type": "boolean" }, { - "$ref": "https://localhost:1234/draft2019-09/unknownKeyword/my_identifier.json" + "type": "boolean" } - ] + ], + "uniqueItems": false, + "additionalItems": false }, - "type": "string" + "type": "schema" } ] ] diff --git a/test/fixtures/draft2020-12.json b/test/fixtures/draft2020-12.json index 3dc0cae..adb0f95 100644 --- a/test/fixtures/draft2020-12.json +++ b/test/fixtures/draft2020-12.json @@ -1223,194 +1223,6 @@ [ [ - ], - [ - { - "data": { - "type": "null" - }, - "data_pointer": "", - "schema": { - "enum": [ - { - "$anchor": "my_anchor", - "type": "null" - } - ] - }, - "schema_pointer": "/$defs/anchor_in_enum", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "anchor_in_enum": { - "enum": [ - { - "$anchor": "my_anchor", - "type": "null" - } - ] - }, - "real_identifier_in_schema": { - "$anchor": "my_anchor", - "type": "string" - }, - "zzz_anchor_in_const": { - "const": { - "$anchor": "my_anchor", - "type": "null" - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/anchor_in_enum" - }, - { - "$ref": "#my_anchor" - } - ] - }, - "type": "enum" - }, - { - "data": { - "type": "null" - }, - "data_pointer": "", - "schema": { - "$anchor": "my_anchor", - "type": "string" - }, - "schema_pointer": "/$defs/real_identifier_in_schema", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "anchor_in_enum": { - "enum": [ - { - "$anchor": "my_anchor", - "type": "null" - } - ] - }, - "real_identifier_in_schema": { - "$anchor": "my_anchor", - "type": "string" - }, - "zzz_anchor_in_const": { - "const": { - "$anchor": "my_anchor", - "type": "null" - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/anchor_in_enum" - }, - { - "$ref": "#my_anchor" - } - ] - }, - "type": "string" - } - ], - [ - - ], - [ - { - "data": 1, - "data_pointer": "", - "schema": { - "enum": [ - { - "$anchor": "my_anchor", - "type": "null" - } - ] - }, - "schema_pointer": "/$defs/anchor_in_enum", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "anchor_in_enum": { - "enum": [ - { - "$anchor": "my_anchor", - "type": "null" - } - ] - }, - "real_identifier_in_schema": { - "$anchor": "my_anchor", - "type": "string" - }, - "zzz_anchor_in_const": { - "const": { - "$anchor": "my_anchor", - "type": "null" - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/anchor_in_enum" - }, - { - "$ref": "#my_anchor" - } - ] - }, - "type": "enum" - }, - { - "data": 1, - "data_pointer": "", - "schema": { - "$anchor": "my_anchor", - "type": "string" - }, - "schema_pointer": "/$defs/real_identifier_in_schema", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "anchor_in_enum": { - "enum": [ - { - "$anchor": "my_anchor", - "type": "null" - } - ] - }, - "real_identifier_in_schema": { - "$anchor": "my_anchor", - "type": "string" - }, - "zzz_anchor_in_const": { - "const": { - "$anchor": "my_anchor", - "type": "null" - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/anchor_in_enum" - }, - { - "$ref": "#my_anchor" - } - ] - }, - "type": "string" - } - ] - ], - [ - [ - ], [ { @@ -1446,41 +1258,6 @@ } ] ], - [ - [ - - ], - [ - { - "data": 1, - "data_pointer": "", - "schema": { - "const": { - "$anchor": "not_a_real_anchor" - } - }, - "schema_pointer": "/$defs/const_not_anchor", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "const_not_anchor": { - "const": { - "$anchor": "not_a_real_anchor" - } - } - }, - "if": { - "const": "skip not_a_real_anchor" - }, - "then": true, - "else": { - "$ref": "#/$defs/const_not_anchor" - } - }, - "type": "const" - } - ] - ], [ [ { @@ -5240,6 +5017,35 @@ "type": "integer" } ] + ], + [ + [ + + ], + [ + { + "data": 1, + "data_pointer": "/false", + "schema": false, + "schema_pointer": "/$defs/false", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$defs": { + "true": true, + "false": false + }, + "properties": { + "true": { + "$dynamicRef": "#/$defs/true" + }, + "false": { + "$dynamicRef": "#/$defs/false" + } + } + }, + "type": "schema" + } + ] ] ], "JSON-Schema-Test-Suite/tests/draft2020-12/enum.json": [ @@ -5681,19 +5487,25 @@ ], [ { - "data": 1, + "data": [ + 0 + ], "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "enum": [ - true + [ + false + ] ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "enum": [ - true + [ + false + ] ] }, "type": "enum" @@ -5701,20 +5513,128 @@ ], [ { - "data": 1.0, + "data": [ + 0.0 + ], "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "enum": [ - true + [ + false + ] ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "enum": [ - true - ] + [ + false + ] + ] + }, + "type": "enum" + } + ] + ], + [ + [ + + ], + [ + { + "data": 1, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + true + ] + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + true + ] + }, + "type": "enum" + } + ], + [ + { + "data": 1.0, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + true + ] + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + true + ] + }, + "type": "enum" + } + ] + ], + [ + [ + + ], + [ + { + "data": [ + 1 + ], + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + true + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + true + ] + ] + }, + "type": "enum" + } + ], + [ + { + "data": [ + 1.0 + ], + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + true + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + true + ] + ] }, "type": "enum" } @@ -5748,6 +5668,40 @@ ] ], + [ + [ + { + "data": [ + false + ], + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + 0 + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + 0 + ] + ] + }, + "type": "enum" + } + ], + [ + + ], + [ + + ] + ], [ [ { @@ -5776,6 +5730,40 @@ ] ], + [ + [ + { + "data": [ + true + ], + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + 1 + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "enum": [ + [ + 1 + ] + ] + }, + "type": "enum" + } + ], + [ + + ], + [ + + ] + ], [ [ @@ -6887,6 +6875,24 @@ ], [ + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/if-then-else.json": [ + [ + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + ] ], [ @@ -6895,200 +6901,51 @@ ], [ + ] + ], + [ + [ + ], [ { - "data": 1, + "data": -100, "data_pointer": "", "schema": { - "enum": [ - { - "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", - "type": "null" - } - ] + "minimum": -10 }, - "schema_pointer": "/$defs/id_in_enum", + "schema_pointer": "/then", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "id_in_enum": { - "enum": [ - { - "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", - "type": "null" - } - ] - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", - "type": "string" - }, - "zzz_id_in_const": { - "const": { - "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", - "type": "null" - } - } + "if": { + "exclusiveMaximum": 0 }, - "anyOf": [ - { - "$ref": "#/$defs/id_in_enum" - }, - { - "$ref": "https://localhost:1234/draft2020-12/id/my_identifier.json" - } - ] + "then": { + "minimum": -10 + } }, - "type": "enum" - }, + "type": "minimum" + } + ], + [ + + ] + ], + [ + [ + + ], + [ + + ], + [ { - "data": 1, + "data": 3, "data_pointer": "", "schema": { - "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", - "type": "string" + "multipleOf": 2 }, - "schema_pointer": "/$defs/real_id_in_schema", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "id_in_enum": { - "enum": [ - { - "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", - "type": "null" - } - ] - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", - "type": "string" - }, - "zzz_id_in_const": { - "const": { - "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", - "type": "null" - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/id_in_enum" - }, - { - "$ref": "https://localhost:1234/draft2020-12/id/my_identifier.json" - } - ] - }, - "type": "string" - } - ] - ], - [ - [ - - ], - [ - { - "data": 1, - "data_pointer": "", - "schema": { - "const": { - "$id": "not_a_real_id" - } - }, - "schema_pointer": "/$defs/const_not_id", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "const_not_id": { - "const": { - "$id": "not_a_real_id" - } - } - }, - "if": { - "const": "skip not_a_real_id" - }, - "then": true, - "else": { - "$ref": "#/$defs/const_not_id" - } - }, - "type": "const" - } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/if-then-else.json": [ - [ - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - { - "data": -100, - "data_pointer": "", - "schema": { - "minimum": -10 - }, - "schema_pointer": "/then", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "if": { - "exclusiveMaximum": 0 - }, - "then": { - "minimum": -10 - } - }, - "type": "minimum" - } - ], - [ - - ] - ], - [ - [ - - ], - [ - - ], - [ - { - "data": 3, - "data_pointer": "", - "schema": { - "multipleOf": 2 - }, - "schema_pointer": "/else", + "schema_pointer": "/else", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "if": { @@ -9641,512 +9498,427 @@ [ [ { - "data": "foo", + "data": 1, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "not": true + "not": { + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "not": true + "not": { + } }, "type": "not" } - ] - ], - [ - [ - - ] - ], - [ - [ - ], [ { - "data": { - "foo": 1 - }, + "data": "foo", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "not": { - "$comment": "this subschema must still produce annotations internally, even though the 'not' will ultimately discard them", - "anyOf": [ - true, - { - "properties": { - "foo": true - } - } - ], - "unevaluatedProperties": false } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "not": { - "$comment": "this subschema must still produce annotations internally, even though the 'not' will ultimately discard them", - "anyOf": [ - true, - { - "properties": { - "foo": true - } - } - ], - "unevaluatedProperties": false } }, "type": "not" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/oneOf.json": [ - [ - [ - - ], - [ - ], [ { - "data": 3, + "data": true, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, - "type": "oneOf" + "type": "not" } ], [ { - "data": 1.5, + "data": false, "data_pointer": "", "schema": { - "type": "integer" + "$schema": "https://json-schema.org/draft/2020-12/schema", + "not": { + } }, - "schema_pointer": "/oneOf/0", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, - "type": "integer" - }, + "type": "not" + } + ], + [ { - "data": 1.5, + "data": null, "data_pointer": "", "schema": { - "minimum": 2 + "$schema": "https://json-schema.org/draft/2020-12/schema", + "not": { + } }, - "schema_pointer": "/oneOf/1", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, - "type": "minimum" + "type": "not" } - ] - ], - [ + ], [ { - "data": 3, + "data": { + "foo": "bar" + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, - "type": "oneOf" - }, + "type": "not" + } + ], + [ { - "data": 3, + "data": { + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, - "type": "string" + "type": "not" } - ], - [ - ], [ { - "data": "foo", + "data": [ + "foo" + ], "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, - "type": "oneOf" + "type": "not" } - ] - ], - [ + ], [ { - "data": "foo", + "data": [ + + ], "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - true, - true, - true - ] + "not": { + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - true, - true, - true - ] + "not": { + } }, - "type": "oneOf" + "type": "not" } ] ], - [ - [ - - ] - ], [ [ { - "data": "foo", + "data": 1, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - true, - true, - false - ] + "not": true }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - true, - true, - false - ] + "not": true }, - "type": "oneOf" + "type": "not" } - ] - ], - [ + ], [ { "data": "foo", "data_pointer": "", - "schema": false, - "schema_pointer": "/oneOf/0", - "root_schema": { + "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - false, - false, - false - ] + "not": true }, - "type": "schema" - }, - { - "data": "foo", - "data_pointer": "", - "schema": false, - "schema_pointer": "/oneOf/1", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - false, - false, - false - ] + "not": true }, - "type": "schema" - }, + "type": "not" + } + ], + [ { - "data": "foo", + "data": true, "data_pointer": "", - "schema": false, - "schema_pointer": "/oneOf/2", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "not": true + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - false, - false, - false - ] + "not": true }, - "type": "schema" + "type": "not" } - ] - ], - [ - [ - - ], - [ - ], [ { - "data": { - "foo": "baz", - "bar": 2 - }, + "data": false, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - { - "properties": { - "bar": { - "type": "integer" - } - }, - "required": [ - "bar" - ] - }, - { - "properties": { - "foo": { - "type": "string" - } - }, - "required": [ - "foo" - ] - } - ] + "not": true }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - { - "properties": { - "bar": { - "type": "integer" - } - }, - "required": [ - "bar" - ] - }, - { - "properties": { - "foo": { - "type": "string" - } - }, - "required": [ - "foo" - ] - } - ] + "not": true }, - "type": "oneOf" + "type": "not" } ], [ { - "data": "quux", - "data_pointer": "/bar", + "data": null, + "data_pointer": "", "schema": { - "type": "integer" + "$schema": "https://json-schema.org/draft/2020-12/schema", + "not": true }, - "schema_pointer": "/oneOf/0/properties/bar", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - { - "properties": { - "bar": { - "type": "integer" - } - }, - "required": [ - "bar" - ] - }, - { - "properties": { - "foo": { - "type": "string" - } - }, - "required": [ - "foo" - ] - } - ] + "not": true }, - "type": "integer" - }, + "type": "not" + } + ], + [ { - "data": 2, - "data_pointer": "/foo", + "data": { + "foo": "bar" + }, + "data_pointer": "", "schema": { - "type": "string" + "$schema": "https://json-schema.org/draft/2020-12/schema", + "not": true }, - "schema_pointer": "/oneOf/1/properties/foo", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "oneOf": [ - { - "properties": { - "bar": { - "type": "integer" + "not": true + }, + "type": "not" + } + ], + [ + { + "data": { + }, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "not": true + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "not": true + }, + "type": "not" + } + ], + [ + { + "data": [ + "foo" + ], + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "not": true + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "not": true + }, + "type": "not" + } + ], + [ + { + "data": [ + + ], + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "not": true + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "not": true + }, + "type": "not" + } + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ] + ], + [ + [ + + ], + [ + { + "data": { + "foo": 1 + }, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "not": { + "$comment": "this subschema must still produce annotations internally, even though the 'not' will ultimately discard them", + "anyOf": [ + true, + { + "properties": { + "foo": true } - }, - "required": [ - "bar" - ] - }, - { - "properties": { - "foo": { - "type": "string" + } + ], + "unevaluatedProperties": false + } + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "not": { + "$comment": "this subschema must still produce annotations internally, even though the 'not' will ultimately discard them", + "anyOf": [ + true, + { + "properties": { + "foo": true } - }, - "required": [ - "foo" - ] - } - ] + } + ], + "unevaluatedProperties": false + } }, - "type": "string" + "type": "not" } ] - ], + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/oneOf.json": [ [ [ + ], + [ + ], [ { - "data": 123, + "data": 3, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "oneOf": [ { - "type": "number" + "type": "integer" }, { + "minimum": 2 } ] }, @@ -10155,596 +9927,514 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "oneOf": [ { - "type": "number" + "type": "integer" }, { + "minimum": 2 } ] }, "type": "oneOf" } - ] - ], - [ + ], [ { - "data": { - "bar": 2 - }, + "data": 1.5, "data_pointer": "", "schema": { - "required": [ - "foo", - "bar" - ] + "type": "integer" }, "schema_pointer": "/oneOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "type": "integer" }, { - "required": [ - "foo", - "baz" - ] + "minimum": 2 } ] }, - "type": "required", - "details": { - "missing_keys": [ - "foo" - ] - } + "type": "integer" }, { - "data": { - "bar": 2 - }, + "data": 1.5, "data_pointer": "", "schema": { - "required": [ - "foo", - "baz" - ] + "minimum": 2 }, "schema_pointer": "/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "type": "integer" }, { - "required": [ - "foo", - "baz" - ] + "minimum": 2 } ] }, - "type": "required", - "details": { - "missing_keys": [ - "foo", - "baz" - ] - } + "type": "minimum" } - ], - [ - - ], - [ - - ], + ] + ], + [ [ { - "data": { - "foo": 1, - "bar": 2, - "baz": 3 - }, + "data": 3, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", + "type": "string", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "minLength": 2 }, { - "required": [ - "foo", - "baz" - ] + "maxLength": 4 } ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", + "type": "string", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "minLength": 2 }, { - "required": [ - "foo", - "baz" - ] + "maxLength": 4 } ] }, "type": "oneOf" - } - ] - ], - [ - [ - - ], - [ - - ], - [ + }, { - "data": { - "foo": "foo", - "bar": 8 - }, + "data": 3, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", "oneOf": [ { - "properties": { - "bar": true, - "baz": true - }, - "required": [ - "bar" - ] + "minLength": 2 }, { - "properties": { - "foo": true - }, - "required": [ - "foo" - ] + "maxLength": 4 } ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", "oneOf": [ { - "properties": { - "bar": true, - "baz": true - }, - "required": [ - "bar" - ] + "minLength": 2 }, { - "properties": { - "foo": true - }, - "required": [ - "foo" - ] + "maxLength": 4 } ] }, - "type": "oneOf" + "type": "string" } + ], + [ + ], [ { - "data": { - "baz": "quux" - }, + "data": "foo", "data_pointer": "", "schema": { - "properties": { - "bar": true, - "baz": true - }, - "required": [ - "bar" - ] - }, - "schema_pointer": "/oneOf/0", - "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", "oneOf": [ { - "properties": { - "bar": true, - "baz": true - }, - "required": [ - "bar" - ] + "minLength": 2 }, { - "properties": { - "foo": true - }, - "required": [ - "foo" - ] + "maxLength": 4 } ] }, - "type": "required", - "details": { - "missing_keys": [ - "bar" - ] - } - }, - { - "data": { - "baz": "quux" - }, - "data_pointer": "", - "schema": { - "properties": { - "foo": true - }, - "required": [ - "foo" - ] - }, - "schema_pointer": "/oneOf/1", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", "oneOf": [ { - "properties": { - "bar": true, - "baz": true - }, - "required": [ - "bar" - ] + "minLength": 2 }, { - "properties": { - "foo": true - }, - "required": [ - "foo" - ] + "maxLength": 4 } ] }, - "type": "required", - "details": { - "missing_keys": [ - "foo" - ] - } + "type": "oneOf" } ] ], [ - [ - - ], [ { - "data": 123, + "data": "foo", "data_pointer": "", "schema": { - "type": "null" + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + true, + true, + true + ] }, - "schema_pointer": "/oneOf/0/oneOf/0", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "oneOf": [ - { - "oneOf": [ - { - "type": "null" - } - ] - } + true, + true, + true ] }, - "type": "null" + "type": "oneOf" } ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/bignum.json": [ - [ - [ - - ], - [ - - ] ], [ [ - ], - [ - ] ], [ [ { - "data": 98249283749234923498293171823948729348710298301928331, + "data": "foo", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" + "oneOf": [ + true, + true, + false + ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" + "oneOf": [ + true, + true, + false + ] }, - "type": "string" + "type": "oneOf" } ] ], - [ - [ - - ] - ], [ [ { - "data": 9.727837981879871e+26, + "data": "foo", "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "exclusiveMaximum": 9.727837981879871e+26 - }, - "schema_pointer": "", + "schema": false, + "schema_pointer": "/oneOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "exclusiveMaximum": 9.727837981879871e+26 + "oneOf": [ + false, + false, + false + ] }, - "type": "exclusiveMaximum" - } - ] - ], - [ - [ - - ] - ], - [ - [ + "type": "schema" + }, { - "data": -9.727837981879871e+26, + "data": "foo", "data_pointer": "", - "schema": { + "schema": false, + "schema_pointer": "/oneOf/1", + "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "exclusiveMinimum": -9.727837981879871e+26 + "oneOf": [ + false, + false, + false + ] }, - "schema_pointer": "", + "type": "schema" + }, + { + "data": "foo", + "data_pointer": "", + "schema": false, + "schema_pointer": "/oneOf/2", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "exclusiveMinimum": -9.727837981879871e+26 + "oneOf": [ + false, + false, + false + ] }, - "type": "exclusiveMinimum" + "type": "schema" } ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/cross-draft.json": [ - [ - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/dependencies-compatibility.json": [ + ], [ [ ], [ - ], - [ - ], [ { "data": { + "foo": "baz", "bar": 2 }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "bar": [ - "foo" - ] - } + "oneOf": [ + { + "properties": { + "bar": { + "type": "integer" + } + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ] + } + ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "bar": [ - "foo" - ] - } - }, - "type": "dependencies", - "details": { - "missing_keys": [ - "foo" + "oneOf": [ + { + "properties": { + "bar": { + "type": "integer" + } + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ] + } ] - } + }, + "type": "oneOf" } ], [ - - ], - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - - ], - [ - + { + "data": "quux", + "data_pointer": "/bar", + "schema": { + "type": "integer" + }, + "schema_pointer": "/oneOf/0/properties/bar", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "properties": { + "bar": { + "type": "integer" + } + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ] + } + ] + }, + "type": "integer" + }, + { + "data": 2, + "data_pointer": "/foo", + "schema": { + "type": "string" + }, + "schema_pointer": "/oneOf/1/properties/foo", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "properties": { + "bar": { + "type": "integer" + } + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": { + "type": "string" + } + }, + "required": [ + "foo" + ] + } + ] + }, + "type": "string" + } ] ], [ [ - ], - [ - - ], - [ - ], [ { - "data": { - "foo": 1, - "quux": 2 - }, + "data": 123, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "quux": [ - "foo", - "bar" - ] - } + "oneOf": [ + { + "type": "number" + }, + { + } + ] }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "quux": [ - "foo", - "bar" - ] - } - }, - "type": "dependencies", - "details": { - "missing_keys": [ - "bar" + "oneOf": [ + { + "type": "number" + }, + { + } ] - } + }, + "type": "oneOf" } - ], + ] + ], + [ [ { "data": { - "bar": 1, - "quux": 2 + "bar": 2 }, "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "quux": [ - "foo", - "bar" - ] - } + "required": [ + "foo", + "bar" + ] }, - "schema_pointer": "", + "schema_pointer": "/oneOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "quux": [ - "foo", - "bar" - ] - } + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } + ] }, - "type": "dependencies", + "type": "required", "details": { "missing_keys": [ "foo" ] } - } - ], - [ + }, { "data": { - "quux": 1 + "bar": 2 }, "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "quux": [ - "foo", - "bar" - ] - } + "required": [ + "foo", + "baz" + ] }, - "schema_pointer": "", + "schema_pointer": "/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "quux": [ - "foo", - "bar" - ] - } + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } + ] }, - "type": "dependencies", + "type": "required", "details": { "missing_keys": [ "foo", - "bar" + "baz" ] } } - ] - ], - [ + ], [ ], @@ -10754,76 +10444,49 @@ [ { "data": { - "foo\nbar": 1, - "foo": 2 + "foo": 1, + "bar": 2, + "baz": 3 }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "foo\nbar": [ - "foo\rbar" - ], - "foo\"bar": [ - "foo'bar" - ] - } - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "foo\nbar": [ - "foo\rbar" - ], - "foo\"bar": [ - "foo'bar" - ] - } - }, - "type": "dependencies", - "details": { - "missing_keys": [ - "foo\rbar" + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } ] - } - } - ], - [ - { - "data": { - "foo\"bar": 2 - }, - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "foo\nbar": [ - "foo\rbar" - ], - "foo\"bar": [ - "foo'bar" - ] - } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "foo\nbar": [ - "foo\rbar" - ], - "foo\"bar": [ - "foo'bar" - ] - } - }, - "type": "dependencies", - "details": { - "missing_keys": [ - "foo'bar" + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } ] - } + }, + "type": "oneOf" } ] ], @@ -10836,114 +10499,147 @@ ], [ { - "data": "quux", - "data_pointer": "/foo", + "data": { + "foo": "foo", + "bar": 8 + }, + "data_pointer": "", "schema": { - "type": "integer" + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": true + }, + "required": [ + "foo" + ] + } + ] }, - "schema_pointer": "/dependencies/bar/properties/foo", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "bar": { + "oneOf": [ + { "properties": { - "foo": { - "type": "integer" - }, - "bar": { - "type": "integer" - } - } + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": true + }, + "required": [ + "foo" + ] } - } + ] }, - "type": "integer" + "type": "oneOf" } ], [ { - "data": "quux", - "data_pointer": "/bar", + "data": { + "baz": "quux" + }, + "data_pointer": "", "schema": { - "type": "integer" + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] }, - "schema_pointer": "/dependencies/bar/properties/bar", + "schema_pointer": "/oneOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "bar": { + "oneOf": [ + { "properties": { - "foo": { - "type": "integer" - }, - "bar": { - "type": "integer" - } - } - } - } - }, - "type": "integer" - } - ], - [ - { - "data": "quux", - "data_pointer": "/foo", - "schema": { - "type": "integer" - }, - "schema_pointer": "/dependencies/bar/properties/foo", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "bar": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { "properties": { - "foo": { - "type": "integer" - }, - "bar": { - "type": "integer" - } - } + "foo": true + }, + "required": [ + "foo" + ] } - } + ] }, - "type": "integer" + "type": "required", + "details": { + "missing_keys": [ + "bar" + ] + } }, { - "data": "quux", - "data_pointer": "/bar", + "data": { + "baz": "quux" + }, + "data_pointer": "", "schema": { - "type": "integer" + "properties": { + "foo": true + }, + "required": [ + "foo" + ] }, - "schema_pointer": "/dependencies/bar/properties/bar", + "schema_pointer": "/oneOf/1", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "bar": { + "oneOf": [ + { "properties": { - "foo": { - "type": "integer" - }, - "bar": { - "type": "integer" - } - } + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": true + }, + "required": [ + "foo" + ] } - } + ] }, - "type": "integer" + "type": "required", + "details": { + "missing_keys": [ + "foo" + ] + } } - ], - [ - - ], - [ - - ], - [ - ] ], [ @@ -10952,45 +10648,30 @@ ], [ { - "data": { - "bar": 2 - }, + "data": 123, "data_pointer": "", - "schema": false, - "schema_pointer": "/dependencies/bar", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "foo": true, - "bar": false - } - }, - "type": "schema" - } - ], - [ - { - "data": { - "foo": 1, - "bar": 2 + "schema": { + "type": "null" }, - "data_pointer": "", - "schema": false, - "schema_pointer": "/dependencies/bar", + "schema_pointer": "/oneOf/0/oneOf/0", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "foo": true, - "bar": false - } + "oneOf": [ + { + "oneOf": [ + { + "type": "null" + } + ] + } + ] }, - "type": "schema" + "type": "null" } - ], - [ - ] - ], + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/anchor.json": [ [ [ @@ -10998,119 +10679,200 @@ [ { "data": { - "foo'bar": { - "foo\"bar": 1 - } + "type": "null" }, "data_pointer": "", "schema": { - "required": [ - "foo\"bar" + "enum": [ + { + "$anchor": "my_anchor", + "type": "null" + } ] }, - "schema_pointer": "/dependencies/foo'bar", + "schema_pointer": "/$defs/anchor_in_enum", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "foo\tbar": { - "minProperties": 4 - }, - "foo'bar": { - "required": [ - "foo\"bar" + "$defs": { + "anchor_in_enum": { + "enum": [ + { + "$anchor": "my_anchor", + "type": "null" + } ] + }, + "real_identifier_in_schema": { + "$anchor": "my_anchor", + "type": "string" + }, + "zzz_anchor_in_const": { + "const": { + "$anchor": "my_anchor", + "type": "null" + } + } + }, + "anyOf": [ + { + "$ref": "#/$defs/anchor_in_enum" + }, + { + "$ref": "#my_anchor" } - } - }, - "type": "required", - "details": { - "missing_keys": [ - "foo\"bar" ] - } - } - ], - [ + }, + "type": "enum" + }, { "data": { - "foo\tbar": 1, - "a": 2 + "type": "null" }, "data_pointer": "", "schema": { - "minProperties": 4 + "$anchor": "my_anchor", + "type": "string" }, - "schema_pointer": "/dependencies/foo\tbar", + "schema_pointer": "/$defs/real_identifier_in_schema", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "foo\tbar": { - "minProperties": 4 - }, - "foo'bar": { - "required": [ - "foo\"bar" + "$defs": { + "anchor_in_enum": { + "enum": [ + { + "$anchor": "my_anchor", + "type": "null" + } ] + }, + "real_identifier_in_schema": { + "$anchor": "my_anchor", + "type": "string" + }, + "zzz_anchor_in_const": { + "const": { + "$anchor": "my_anchor", + "type": "null" + } } - } + }, + "anyOf": [ + { + "$ref": "#/$defs/anchor_in_enum" + }, + { + "$ref": "#my_anchor" + } + ] }, - "type": "minProperties" + "type": "string" } + ], + [ + ], [ { - "data": { - "foo'bar": 1 - }, + "data": 1, "data_pointer": "", "schema": { - "required": [ - "foo\"bar" + "enum": [ + { + "$anchor": "my_anchor", + "type": "null" + } ] }, - "schema_pointer": "/dependencies/foo'bar", + "schema_pointer": "/$defs/anchor_in_enum", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "dependencies": { - "foo\tbar": { - "minProperties": 4 - }, - "foo'bar": { - "required": [ - "foo\"bar" + "$defs": { + "anchor_in_enum": { + "enum": [ + { + "$anchor": "my_anchor", + "type": "null" + } ] + }, + "real_identifier_in_schema": { + "$anchor": "my_anchor", + "type": "string" + }, + "zzz_anchor_in_const": { + "const": { + "$anchor": "my_anchor", + "type": "null" + } + } + }, + "anyOf": [ + { + "$ref": "#/$defs/anchor_in_enum" + }, + { + "$ref": "#my_anchor" } - } - }, - "type": "required", - "details": { - "missing_keys": [ - "foo\"bar" ] - } - } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/ecmascript-regex.json": [ - [ - [ + }, + "type": "enum" + }, { - "data": "abc\\n", + "data": 1, "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^abc$" + "$anchor": "my_anchor", + "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/$defs/real_identifier_in_schema", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^abc$" + "$defs": { + "anchor_in_enum": { + "enum": [ + { + "$anchor": "my_anchor", + "type": "null" + } + ] + }, + "real_identifier_in_schema": { + "$anchor": "my_anchor", + "type": "string" + }, + "zzz_anchor_in_const": { + "const": { + "$anchor": "my_anchor", + "type": "null" + } + } + }, + "anyOf": [ + { + "$ref": "#/$defs/anchor_in_enum" + }, + { + "$ref": "#my_anchor" + } + ] }, - "type": "pattern" + "type": "string" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/bignum.json": [ + [ + [ + + ], + [ + + ] + ], + [ + [ + ], [ @@ -11119,22 +10881,22 @@ [ [ { - "data": "\\t", + "data": 98249283749234923498293171823948729348710298301928331, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\t$" + "type": "string" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\t$" + "type": "string" }, - "type": "pattern" + "type": "string" } - ], + ] + ], + [ [ ] @@ -11142,22 +10904,22 @@ [ [ { - "data": "\\cC", + "data": 9.727837981879871e+26, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\cC$" + "exclusiveMaximum": 9.727837981879871e+26 }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\cC$" + "exclusiveMaximum": 9.727837981879871e+26 }, - "type": "pattern" + "type": "exclusiveMaximum" } - ], + ] + ], + [ [ ] @@ -11165,85 +10927,84 @@ [ [ { - "data": "\\cc", + "data": -9.727837981879871e+26, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\cc$" + "exclusiveMinimum": -9.727837981879871e+26 }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\cc$" + "exclusiveMinimum": -9.727837981879871e+26 }, - "type": "pattern" + "type": "exclusiveMinimum" } - ], + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/cross-draft.json": [ + [ [ ] - ], + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/dependencies-compatibility.json": [ [ [ ], [ - { - "data": "߀", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\d$" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\d$" - }, - "type": "pattern" - } + + ], + [ + ], [ { - "data": "߀", + "data": { + "bar": 2 + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\d$" + "dependencies": { + "bar": [ + "foo" + ] + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\d$" + "dependencies": { + "bar": [ + "foo" + ] + } }, - "type": "pattern" + "type": "dependencies", + "details": { + "missing_keys": [ + "foo" + ] + } } + ], + [ + + ], + [ + + ], + [ + ] ], [ [ - { - "data": "0", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\D$" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\D$" - }, - "type": "pattern" - } + ], [ @@ -11255,47 +11016,114 @@ [ [ + ], + [ + + ], + [ + ], [ { - "data": "é", + "data": { + "foo": 1, + "quux": 2 + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\w$" - }, + "dependencies": { + "quux": [ + "foo", + "bar" + ] + } + }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\w$" + "dependencies": { + "quux": [ + "foo", + "bar" + ] + } }, - "type": "pattern" + "type": "dependencies", + "details": { + "missing_keys": [ + "bar" + ] + } } - ] - ], - [ + ], [ { - "data": "a", + "data": { + "bar": 1, + "quux": 2 + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\W$" + "dependencies": { + "quux": [ + "foo", + "bar" + ] + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\W$" + "dependencies": { + "quux": [ + "foo", + "bar" + ] + } }, - "type": "pattern" + "type": "dependencies", + "details": { + "missing_keys": [ + "foo" + ] + } } ], [ - + { + "data": { + "quux": 1 + }, + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "dependencies": { + "quux": [ + "foo", + "bar" + ] + } + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "dependencies": { + "quux": [ + "foo", + "bar" + ] + } + }, + "type": "dependencies", + "details": { + "missing_keys": [ + "foo", + "bar" + ] + } + } ] ], [ @@ -11304,260 +11132,439 @@ ], [ - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ { - "data": "\u0001", + "data": { + "foo\nbar": 1, + "foo": 2 + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\s$" + "dependencies": { + "foo\nbar": [ + "foo\rbar" + ], + "foo\"bar": [ + "foo'bar" + ] + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\s$" + "dependencies": { + "foo\nbar": [ + "foo\rbar" + ], + "foo\"bar": [ + "foo'bar" + ] + } }, - "type": "pattern" + "type": "dependencies", + "details": { + "missing_keys": [ + "foo\rbar" + ] + } } ], [ { - "data": "–", + "data": { + "foo\"bar": 2 + }, "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\s$" + "dependencies": { + "foo\nbar": [ + "foo\rbar" + ], + "foo\"bar": [ + "foo'bar" + ] + } }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\s$" + "dependencies": { + "foo\nbar": [ + "foo\rbar" + ], + "foo\"bar": [ + "foo'bar" + ] + } }, - "type": "pattern" + "type": "dependencies", + "details": { + "missing_keys": [ + "foo'bar" + ] + } } ] ], [ [ - { - "data": " ", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\S$" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\S$" - }, - "type": "pattern" - } + + ], + [ + ], [ { - "data": "\t", - "data_pointer": "", + "data": "quux", + "data_pointer": "/foo", "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\S$" + "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/dependencies/bar/properties/foo", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "bar": { + "properties": { + "foo": { + "type": "integer" + }, + "bar": { + "type": "integer" + } + } + } + } }, - "type": "pattern" + "type": "integer" } ], [ { - "data": "\u000b", - "data_pointer": "", + "data": "quux", + "data_pointer": "/bar", "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\S$" + "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/dependencies/bar/properties/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "bar": { + "properties": { + "foo": { + "type": "integer" + }, + "bar": { + "type": "integer" + } + } + } + } }, - "type": "pattern" + "type": "integer" } ], [ { - "data": "\f", - "data_pointer": "", + "data": "quux", + "data_pointer": "/foo", "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\S$" + "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/dependencies/bar/properties/foo", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\S$" - }, - "type": "pattern" + "dependencies": { + "bar": { + "properties": { + "foo": { + "type": "integer" + }, + "bar": { + "type": "integer" + } + } + } + } + }, + "type": "integer" + }, + { + "data": "quux", + "data_pointer": "/bar", + "schema": { + "type": "integer" + }, + "schema_pointer": "/dependencies/bar/properties/bar", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "dependencies": { + "bar": { + "properties": { + "foo": { + "type": "integer" + }, + "bar": { + "type": "integer" + } + } + } + } + }, + "type": "integer" } + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + ], [ { - "data": " ", + "data": { + "bar": 2 + }, "data_pointer": "", - "schema": { + "schema": false, + "schema_pointer": "/dependencies/bar", + "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "foo": true, + "bar": false + } }, - "schema_pointer": "", + "type": "schema" + } + ], + [ + { + "data": { + "foo": 1, + "bar": 2 + }, + "data_pointer": "", + "schema": false, + "schema_pointer": "/dependencies/bar", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "foo": true, + "bar": false + } }, - "type": "pattern" + "type": "schema" } + ], + [ + + ] + ], + [ + [ + ], [ { - "data": "", + "data": { + "foo'bar": { + "foo\"bar": 1 + } + }, "data_pointer": "", "schema": { + "required": [ + "foo\"bar" + ] + }, + "schema_pointer": "/dependencies/foo'bar", + "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "foo\tbar": { + "minProperties": 4 + }, + "foo'bar": { + "required": [ + "foo\"bar" + ] + } + } }, - "schema_pointer": "", + "type": "required", + "details": { + "missing_keys": [ + "foo\"bar" + ] + } + } + ], + [ + { + "data": { + "foo\tbar": 1, + "a": 2 + }, + "data_pointer": "", + "schema": { + "minProperties": 4 + }, + "schema_pointer": "/dependencies/foo\tbar", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "pattern": "^\\S$" + "dependencies": { + "foo\tbar": { + "minProperties": 4 + }, + "foo'bar": { + "required": [ + "foo\"bar" + ] + } + } }, - "type": "pattern" + "type": "minProperties" } ], [ { - "data": "\n", + "data": { + "foo'bar": 1 + }, + "data_pointer": "", + "schema": { + "required": [ + "foo\"bar" + ] + }, + "schema_pointer": "/dependencies/foo'bar", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "dependencies": { + "foo\tbar": { + "minProperties": 4 + }, + "foo'bar": { + "required": [ + "foo\"bar" + ] + } + } + }, + "type": "required", + "details": { + "missing_keys": [ + "foo\"bar" + ] + } + } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/ecmascript-regex.json": [ + [ + [ + { + "data": "abc\\n", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "string", - "pattern": "^\\S$" + "pattern": "^abc$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "string", - "pattern": "^\\S$" + "pattern": "^abc$" }, "type": "pattern" } ], + [ + + ] + ], + [ [ { - "data": "
", + "data": "\\t", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "string", - "pattern": "^\\S$" + "pattern": "^\\t$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "string", - "pattern": "^\\S$" + "pattern": "^\\t$" }, "type": "pattern" } ], + [ + + ] + ], + [ [ { - "data": " ", + "data": "\\cC", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "string", - "pattern": "^\\S$" + "pattern": "^\\cC$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "string", - "pattern": "^\\S$" + "pattern": "^\\cC$" }, "type": "pattern" } ], [ - ], - [ - ] ], [ - [ - - ], - [ - - ], - [ - - ], [ { - "data": "LES HIVERS DE MON ENFANCE ÉTAIENT DES SAISONS LONGUES, LONGUES. NOUS VIVIONS EN TROIS LIEUX: L'ÉCOLE, L'ÉGLISE ET LA PATINOIRE; MAIS LA VRAIE VIE ÉTAIT SUR LA PATINOIRE.", + "data": "\\cc", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "\\p{Letter}cole" + "type": "string", + "pattern": "^\\cc$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "\\p{Letter}cole" + "type": "string", + "pattern": "^\\cc$" }, "type": "pattern" } + ], + [ + ] ], [ @@ -11566,82 +11573,105 @@ ], [ { - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", + "data": "߀", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "\\wcole" + "type": "string", + "pattern": "^\\d$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "\\wcole" + "type": "string", + "pattern": "^\\d$" }, "type": "pattern" } ], [ { - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", + "data": "߀", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "\\wcole" + "type": "string", + "pattern": "^\\d$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "\\wcole" + "type": "string", + "pattern": "^\\d$" }, "type": "pattern" } - ], + ] + ], + [ [ { - "data": "LES HIVERS DE MON ENFANCE ÉTAIENT DES SAISONS LONGUES, LONGUES. NOUS VIVIONS EN TROIS LIEUX: L'ÉCOLE, L'ÉGLISE ET LA PATINOIRE; MAIS LA VRAIE VIE ÉTAIT SUR LA PATINOIRE.", + "data": "0", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "\\wcole" + "type": "string", + "pattern": "^\\D$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "\\wcole" + "type": "string", + "pattern": "^\\D$" }, "type": "pattern" } + ], + [ + + ], + [ + ] ], [ + [ + + ], [ { - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", + "data": "é", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "[a-z]cole" + "type": "string", + "pattern": "^\\w$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "[a-z]cole" + "type": "string", + "pattern": "^\\w$" }, "type": "pattern" } - ], + ] + ], + [ [ { - "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", + "data": "a", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "[a-z]cole" + "type": "string", + "pattern": "^\\W$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "[a-z]cole" + "type": "string", + "pattern": "^\\W$" }, "type": "pattern" } @@ -11653,35 +11683,63 @@ [ [ + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "-%#", + "data": "\u0001", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "^\\d+$" + "type": "string", + "pattern": "^\\s$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "^\\d+$" + "type": "string", + "pattern": "^\\s$" }, "type": "pattern" } ], [ { - "data": "৪২", + "data": "–", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "^\\d+$" + "type": "string", + "pattern": "^\\s$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "^\\d+$" + "type": "string", + "pattern": "^\\s$" }, "type": "pattern" } @@ -11690,358 +11748,173 @@ [ [ { - "data": "\\a", - "data_pointer": "/pattern", + "data": " ", + "data_pointer": "", "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "string", - "format": "regex" + "pattern": "^\\S$" }, - "schema_pointer": "/properties/pattern", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/validation", - "$dynamicAnchor": "meta", - "title": "Validation vocabulary meta-schema", - "type": [ - "object", - "boolean" - ], - "properties": { - "type": { - "anyOf": [ - { - "$ref": "#/$defs/simpleTypes" - }, - { - "type": "array", - "items": { - "$ref": "#/$defs/simpleTypes" - }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "const": true, - "enum": { - "type": "array", - "items": true - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { - "$ref": "#/$defs/nonNegativeInteger" - }, - "minLength": { - "$ref": "#/$defs/nonNegativeIntegerDefault0" - }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { - "$ref": "#/$defs/nonNegativeInteger" - }, - "minItems": { - "$ref": "#/$defs/nonNegativeIntegerDefault0" - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxContains": { - "$ref": "#/$defs/nonNegativeInteger" - }, - "minContains": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 1 - }, - "maxProperties": { - "$ref": "#/$defs/nonNegativeInteger" - }, - "minProperties": { - "$ref": "#/$defs/nonNegativeIntegerDefault0" - }, - "required": { - "$ref": "#/$defs/stringArray" - }, - "dependentRequired": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/stringArray" - } - } - }, - "$defs": { - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 0 - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [ - - ] - } - } + "type": "string", + "pattern": "^\\S$" }, - "type": "format" + "type": "pattern" } - ] - ], - [ - [ - ], [ { - "data": "-%#", + "data": "\t", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "^\\p{digit}+$" + "type": "string", + "pattern": "^\\S$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "^\\p{digit}+$" + "type": "string", + "pattern": "^\\S$" }, "type": "pattern" } - ], - [ - - ] - ], - [ - [ - - ], - [ - - ], - [ - ], [ { - "data": "PAS DE VRAIE VIE", - "data_pointer": "/L'ÉCOLE", - "schema": false, - "schema_pointer": "/additionalProperties", - "root_schema": { + "data": "\u000b", + "data_pointer": "", + "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "patternProperties": { - "\\p{Letter}cole": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\S$" }, - "type": "schema" - } - ] - ], - [ - [ - - ], - [ - { - "data": "pas de vraie vie", - "data_pointer": "/l'école", - "schema": false, - "schema_pointer": "/additionalProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "patternProperties": { - "\\wcole": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\S$" }, - "type": "schema" + "type": "pattern" } ], [ { - "data": "pas de vraie vie", - "data_pointer": "/l'école", - "schema": false, - "schema_pointer": "/additionalProperties", + "data": "\f", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^\\S$" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "patternProperties": { - "\\wcole": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\S$" }, - "type": "schema" + "type": "pattern" } ], [ { - "data": "PAS DE VRAIE VIE", - "data_pointer": "/L'ÉCOLE", - "schema": false, - "schema_pointer": "/additionalProperties", - "root_schema": { + "data": " ", + "data_pointer": "", + "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "patternProperties": { - "\\wcole": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\S$" }, - "type": "schema" - } - ] - ], - [ - [ - { - "data": "pas de vraie vie", - "data_pointer": "/l'école", - "schema": false, - "schema_pointer": "/additionalProperties", + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "patternProperties": { - "[a-z]cole": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\S$" }, - "type": "schema" + "type": "pattern" } ], [ { - "data": "pas de vraie vie", - "data_pointer": "/l'école", - "schema": false, - "schema_pointer": "/additionalProperties", + "data": "", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^\\S$" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "patternProperties": { - "[a-z]cole": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\S$" }, - "type": "schema" + "type": "pattern" } - ], - [ - - ] - ], - [ - [ - ], [ { - "data": "spending the year dead for tax reasons", - "data_pointer": "/-%#", - "schema": false, - "schema_pointer": "/additionalProperties", + "data": "\n", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^\\S$" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "patternProperties": { - "^\\d+$": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\S$" }, - "type": "schema" + "type": "pattern" } ], [ { - "data": "khajit has wares if you have coin", - "data_pointer": "/৪২", - "schema": false, - "schema_pointer": "/additionalProperties", + "data": "
", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^\\S$" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "patternProperties": { - "^\\d+$": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\S$" }, - "type": "schema" + "type": "pattern" } - ] - ], - [ - [ - ], [ { - "data": "spending the year dead for tax reasons", - "data_pointer": "/-%#", - "schema": false, - "schema_pointer": "/additionalProperties", + "data": " ", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "string", + "pattern": "^\\S$" + }, + "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "patternProperties": { - "^\\p{digit}+$": true - }, - "additionalProperties": false + "type": "string", + "pattern": "^\\S$" }, - "type": "schema" + "type": "pattern" } ], [ - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/float-overflow.json": [ - [ + ], [ ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/date-time.json": [ + ], [ [ @@ -12051,248 +11924,311 @@ ], [ - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ { - "data": "1998-12-31T23:59:61Z", + "data": "LES HIVERS DE MON ENFANCE ÉTAIENT DES SAISONS LONGUES, LONGUES. NOUS VIVIONS EN TROIS LIEUX: L'ÉCOLE, L'ÉGLISE ET LA PATINOIRE; MAIS LA VRAIE VIE ÉTAIT SUR LA PATINOIRE.", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "\\p{Letter}cole" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "\\p{Letter}cole" }, - "type": "format" + "type": "pattern" } + ] + ], + [ + [ + ], [ { - "data": "1998-12-31T23:58:60Z", + "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "\\wcole" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "\\wcole" }, - "type": "format" + "type": "pattern" } ], [ { - "data": "1998-12-31T22:59:60Z", + "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "\\wcole" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "\\wcole" }, - "type": "format" + "type": "pattern" } ], [ { - "data": "1990-02-31T15:59:59.123-08:00", + "data": "LES HIVERS DE MON ENFANCE ÉTAIENT DES SAISONS LONGUES, LONGUES. NOUS VIVIONS EN TROIS LIEUX: L'ÉCOLE, L'ÉGLISE ET LA PATINOIRE; MAIS LA VRAIE VIE ÉTAIT SUR LA PATINOIRE.", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "\\wcole" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "\\wcole" }, - "type": "format" + "type": "pattern" } - ], + ] + ], + [ [ { - "data": "1990-12-31T15:59:59-24:00", + "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "[a-z]cole" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "[a-z]cole" }, - "type": "format" + "type": "pattern" } ], [ { - "data": "1963-06-19T08:30:06.28123+01:00Z", + "data": "Les hivers de mon enfance étaient des saisons longues, longues. Nous vivions en trois lieux: l'école, l'église et la patinoire; mais la vraie vie était sur la patinoire.", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "[a-z]cole" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "[a-z]cole" }, - "type": "format" + "type": "pattern" } ], [ - { - "data": "06/19/1963 08:30:06 PST", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" - }, - "type": "format" - } - ], + + ] + ], + [ [ ], [ { - "data": "2013-350T01:01:01", + "data": "-%#", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "^\\d+$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "^\\d+$" }, - "type": "format" + "type": "pattern" } ], [ { - "data": "1963-6-19T08:30:06.283185Z", + "data": "৪২", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "^\\d+$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "^\\d+$" }, - "type": "format" + "type": "pattern" } - ], + ] + ], + [ [ { - "data": "1963-06-1T08:30:06.283185Z", - "data_pointer": "", + "data": "\\a", + "data_pointer": "/pattern", "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "type": "string", + "format": "regex" }, - "schema_pointer": "", + "schema_pointer": "/properties/pattern", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "$id": "https://json-schema.org/draft/2020-12/meta/validation", + "$dynamicAnchor": "meta", + "title": "Validation vocabulary meta-schema", + "type": [ + "object", + "boolean" + ], + "properties": { + "type": { + "anyOf": [ + { + "$ref": "#/$defs/simpleTypes" + }, + { + "type": "array", + "items": { + "$ref": "#/$defs/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "const": true, + "enum": { + "type": "array", + "items": true + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { + "$ref": "#/$defs/nonNegativeInteger" + }, + "minLength": { + "$ref": "#/$defs/nonNegativeIntegerDefault0" + }, + "pattern": { + "type": "string", + "format": "regex" + }, + "maxItems": { + "$ref": "#/$defs/nonNegativeInteger" + }, + "minItems": { + "$ref": "#/$defs/nonNegativeIntegerDefault0" + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxContains": { + "$ref": "#/$defs/nonNegativeInteger" + }, + "minContains": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 1 + }, + "maxProperties": { + "$ref": "#/$defs/nonNegativeInteger" + }, + "minProperties": { + "$ref": "#/$defs/nonNegativeIntegerDefault0" + }, + "required": { + "$ref": "#/$defs/stringArray" + }, + "dependentRequired": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/stringArray" + } + } + }, + "$defs": { + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "$ref": "#/$defs/nonNegativeInteger", + "default": 0 + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [ + + ] + } + } }, "type": "format" } - ], + ] + ], + [ [ - { - "data": "1963-06-1৪T00:00:00Z", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" - }, - "type": "format" - } + ], [ { - "data": "1963-06-11T0৪:00:00Z", + "data": "-%#", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "^\\p{digit}+$" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date-time" + "pattern": "^\\p{digit}+$" }, - "type": "format" + "type": "pattern" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/date.json": [ - [ - [ - - ], - [ - - ], - [ - ], [ - ], - [ - - ], + ] + ], + [ [ ], @@ -12304,225 +12240,335 @@ ], [ { - "data": "2020-01-32", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" - }, - "schema_pointer": "", + "data": "PAS DE VRAIE VIE", + "data_pointer": "/L'ÉCOLE", + "schema": false, + "schema_pointer": "/additionalProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "type": "object", + "patternProperties": { + "\\p{Letter}cole": true + }, + "additionalProperties": false }, - "type": "format" + "type": "schema" } - ], + ] + ], + [ [ ], [ { - "data": "2021-02-29", - "data_pointer": "", - "schema": { + "data": "pas de vraie vie", + "data_pointer": "/l'école", + "schema": false, + "schema_pointer": "/additionalProperties", + "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "type": "object", + "patternProperties": { + "\\wcole": true + }, + "additionalProperties": false }, - "schema_pointer": "", + "type": "schema" + } + ], + [ + { + "data": "pas de vraie vie", + "data_pointer": "/l'école", + "schema": false, + "schema_pointer": "/additionalProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "type": "object", + "patternProperties": { + "\\wcole": true + }, + "additionalProperties": false }, - "type": "format" + "type": "schema" } ], [ - - ], + { + "data": "PAS DE VRAIE VIE", + "data_pointer": "/L'ÉCOLE", + "schema": false, + "schema_pointer": "/additionalProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "patternProperties": { + "\\wcole": true + }, + "additionalProperties": false + }, + "type": "schema" + } + ] + ], + [ [ { - "data": "2020-02-30", - "data_pointer": "", - "schema": { + "data": "pas de vraie vie", + "data_pointer": "/l'école", + "schema": false, + "schema_pointer": "/additionalProperties", + "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "type": "object", + "patternProperties": { + "[a-z]cole": true + }, + "additionalProperties": false }, - "schema_pointer": "", + "type": "schema" + } + ], + [ + { + "data": "pas de vraie vie", + "data_pointer": "/l'école", + "schema": false, + "schema_pointer": "/additionalProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "type": "object", + "patternProperties": { + "[a-z]cole": true + }, + "additionalProperties": false }, - "type": "format" + "type": "schema" } ], [ + ] + ], + [ + [ + ], [ { - "data": "2020-03-32", - "data_pointer": "", - "schema": { + "data": "spending the year dead for tax reasons", + "data_pointer": "/-%#", + "schema": false, + "schema_pointer": "/additionalProperties", + "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "type": "object", + "patternProperties": { + "^\\d+$": true + }, + "additionalProperties": false }, - "schema_pointer": "", + "type": "schema" + } + ], + [ + { + "data": "khajit has wares if you have coin", + "data_pointer": "/৪২", + "schema": false, + "schema_pointer": "/additionalProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "type": "object", + "patternProperties": { + "^\\d+$": true + }, + "additionalProperties": false }, - "type": "format" + "type": "schema" } - ], + ] + ], + [ [ ], [ { - "data": "2020-04-31", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" - }, - "schema_pointer": "", + "data": "spending the year dead for tax reasons", + "data_pointer": "/-%#", + "schema": false, + "schema_pointer": "/additionalProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "type": "object", + "patternProperties": { + "^\\p{digit}+$": true + }, + "additionalProperties": false }, - "type": "format" + "type": "schema" } ], [ + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/float-overflow.json": [ + [ + [ + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/date-time.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "2020-05-32", + "data": "1998-12-31T23:59:61Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "type": "format" } - ], - [ - ], [ { - "data": "2020-06-31", + "data": "1998-12-31T23:58:60Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "type": "format" } - ], - [ - ], [ { - "data": "2020-07-32", + "data": "1998-12-31T22:59:60Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "type": "format" } - ], - [ - ], [ { - "data": "2020-08-32", + "data": "1990-02-31T15:59:59.123-08:00", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "type": "format" } - ], - [ - ], [ { - "data": "2020-09-31", + "data": "1990-12-31T15:59:59-24:00", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "type": "format" } - ], - [ - ], [ { - "data": "2020-10-32", + "data": "1963-06-19T08:30:06.28123+01:00Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "type": "format" } - ], - [ - ], [ { - "data": "2020-11-31", + "data": "06/19/1963 08:30:06 PST", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "type": "format" } @@ -12532,87 +12578,115 @@ ], [ { - "data": "2020-12-32", + "data": "2013-350T01:01:01", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "type": "format" } ], [ { - "data": "2020-13-01", + "data": "1963-6-19T08:30:06.283185Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "type": "format" } ], [ { - "data": "06/19/1963", + "data": "1963-06-1T08:30:06.283185Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "type": "format" } ], [ { - "data": "2013-350", + "data": "1963-06-1৪T00:00:00Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "type": "format" } ], [ { - "data": "1998-1-20", + "data": "1963-06-11T0৪:00:00Z", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "date" + "format": "date-time" }, "type": "format" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/date.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "1998-01-1", + "data": "2020-01-32", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -12625,10 +12699,13 @@ }, "type": "format" } + ], + [ + ], [ { - "data": "1998-13-01", + "data": "2021-02-29", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -12641,10 +12718,13 @@ }, "type": "format" } + ], + [ + ], [ { - "data": "1998-04-31", + "data": "2020-02-30", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -12657,10 +12737,13 @@ }, "type": "format" } + ], + [ + ], [ { - "data": "2021-02-29", + "data": "2020-03-32", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -12679,7 +12762,7 @@ ], [ { - "data": "1963-06-1৪", + "data": "2020-04-31", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -12692,10 +12775,13 @@ }, "type": "format" } + ], + [ + ], [ { - "data": "20230328", + "data": "2020-05-32", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -12708,10 +12794,13 @@ }, "type": "format" } + ], + [ + ], [ { - "data": "2023-W01", + "data": "2020-06-31", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -12724,10 +12813,13 @@ }, "type": "format" } + ], + [ + ], [ { - "data": "2023-W13-2", + "data": "2020-07-32", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -12740,10 +12832,13 @@ }, "type": "format" } + ], + [ + ], [ { - "data": "2022W527", + "data": "2020-08-32", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -12756,367 +12851,297 @@ }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/duration.json": [ - [ - [ - - ], - [ - ], [ ], [ - + { + "data": "2020-09-31", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "date" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "date" + }, + "type": "format" + } ], [ ], [ - + { + "data": "2020-10-32", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "date" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "date" + }, + "type": "format" + } ], [ ], [ { - "data": "PT1D", + "data": "2020-11-31", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "type": "format" } + ], + [ + ], [ { - "data": "P", + "data": "2020-12-32", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "type": "format" } ], [ { - "data": "P1YT", + "data": "2020-13-01", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "type": "format" } ], [ { - "data": "PT", + "data": "06/19/1963", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "type": "format" } ], [ { - "data": "P2D1Y", + "data": "2013-350", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "type": "format" } ], [ { - "data": "P1D2H", + "data": "1998-1-20", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "type": "format" } ], [ { - "data": "P2S", + "data": "1998-01-1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "type": "format" } - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ { - "data": "P1Y2W", + "data": "1998-13-01", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "type": "format" } ], [ { - "data": "P২Y", + "data": "1998-04-31", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "type": "format" } ], [ { - "data": "P1", + "data": "2021-02-29", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "duration" + "format": "date" }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/email.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ ], [ { - "data": "2962", + "data": "1963-06-1৪", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "email" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "email" - }, - "type": "format" - } - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - { - "data": ".test@example.com", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "email" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "email" + "format": "date" }, "type": "format" } ], [ { - "data": "test.@example.com", + "data": "20230328", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "email" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "email" + "format": "date" }, "type": "format" } - ], - [ - ], [ { - "data": "te..st@example.com", + "data": "2023-W01", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "email" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "email" + "format": "date" }, "type": "format" } ], [ { - "data": "joe.bloggs@invalid=domain.com", + "data": "2023-W13-2", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "email" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "email" + "format": "date" }, "type": "format" } ], [ { - "data": "joe.bloggs@[127.0.0.300]", + "data": "2022W527", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "email" + "format": "date" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "email" + "format": "date" }, "type": "format" } ] ] ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/hostname.json": [ + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/duration.json": [ [ [ @@ -13138,153 +13163,115 @@ ], [ - ], - [ - - ], - [ - { - "data": "-a-host-name-that-starts-with--", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" - }, - "type": "format" - } - ], - [ - { - "data": "not_a_valid_host_name", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" - }, - "type": "format" - } ], [ { - "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component", + "data": "PT1D", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" + "format": "duration" }, "type": "format" } ], [ { - "data": "-hostname", + "data": "P", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" + "format": "duration" }, "type": "format" } ], [ { - "data": "hostname-", + "data": "P1YT", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" + "format": "duration" }, "type": "format" } ], [ { - "data": "_hostname", + "data": "PT", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" + "format": "duration" }, "type": "format" } ], [ { - "data": "hostname_", + "data": "P2D1Y", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" + "format": "duration" }, "type": "format" } ], [ { - "data": "host_name", + "data": "P1D2H", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" + "format": "duration" }, "type": "format" } - ], - [ - ], [ { - "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com", + "data": "P2S", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "hostname" + "format": "duration" }, "type": "format" } @@ -13303,22 +13290,6 @@ ], [ - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/idn-email.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - ], [ @@ -13331,42 +13302,55 @@ ], [ { - "data": "2962", + "data": "P1Y2W", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-email" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-email" + "format": "duration" }, "type": "format" } ], [ - + { + "data": "P২Y", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "duration" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "duration" + }, + "type": "format" + } ], [ { - "data": "2962", + "data": "P1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-email" + "format": "duration" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-email" + "format": "duration" }, "type": "format" } ] ] ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/idn-hostname.json": [ + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/email.json": [ [ [ @@ -13391,64 +13375,72 @@ ], [ { - "data": "〮실례.테스트", + "data": "2962", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "email" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "email" }, "type": "format" } ], [ - { - "data": "실〮례.테스트", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" - }, - "type": "format" - } + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트", + "data": ".test@example.com", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "email" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "email" }, "type": "format" } ], [ { - "data": "-> $1.00 <--", + "data": "test.@example.com", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "email" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "email" }, "type": "format" } @@ -13458,128 +13450,223 @@ ], [ { - "data": "xn--X", + "data": "te..st@example.com", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "email" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "email" }, "type": "format" } ], [ { - "data": "XN--aa---o47jg78q", + "data": "joe.bloggs@invalid=domain.com", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "email" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "email" }, "type": "format" } ], [ { - "data": "-hello", + "data": "joe.bloggs@[127.0.0.300]", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "email" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "email" }, "type": "format" } - ], + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/hostname.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], [ { - "data": "hello-", + "data": "-a-host-name-that-starts-with--", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "hostname" }, "type": "format" } ], [ { - "data": "-hello-", + "data": "not_a_valid_host_name", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "hostname" }, "type": "format" } ], [ { - "data": "ःhello", + "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "hostname" }, "type": "format" } ], [ { - "data": "̀hello", + "data": "-hostname", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "hostname" }, "type": "format" } ], [ { - "data": "҈hello", + "data": "hostname-", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "hostname" + }, + "type": "format" + } + ], + [ + { + "data": "_hostname", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "hostname" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "hostname" + }, + "type": "format" + } + ], + [ + { + "data": "hostname_", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "hostname" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "hostname" + }, + "type": "format" + } + ], + [ + { + "data": "host_name", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "hostname" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "hostname" + }, + "type": "format" + } + ], + [ + + ], + [ + { + "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "hostname" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "hostname" }, "type": "format" } @@ -13589,42 +13676,104 @@ ], [ + ], + [ + + ], + [ + + ], + [ + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/idn-email.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "ـߺ", + "data": "2962", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "idn-email" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "idn-email" }, "type": "format" } + ], + [ + ], [ { - "data": "〱〲〳〴〵〮〯〻", + "data": "2962", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "idn-email" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "idn-hostname" + "format": "idn-email" }, "type": "format" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/idn-hostname.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "a·l", + "data": "〮실례.테스트", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13640,7 +13789,7 @@ ], [ { - "data": "·l", + "data": "실〮례.테스트", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13656,7 +13805,7 @@ ], [ { - "data": "l·a", + "data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13672,7 +13821,7 @@ ], [ { - "data": "l·", + "data": "-> $1.00 <--", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13691,7 +13840,7 @@ ], [ { - "data": "α͵S", + "data": "xn--X", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13707,7 +13856,7 @@ ], [ { - "data": "α͵", + "data": "XN--aa---o47jg78q", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13720,13 +13869,10 @@ }, "type": "format" } - ], - [ - ], [ { - "data": "A׳ב", + "data": "-hello", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13742,7 +13888,7 @@ ], [ { - "data": "׳ב", + "data": "hello-", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13755,13 +13901,10 @@ }, "type": "format" } - ], - [ - ], [ { - "data": "A״ב", + "data": "-hello-", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13777,7 +13920,7 @@ ], [ { - "data": "״ב", + "data": "ःhello", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13790,13 +13933,10 @@ }, "type": "format" } - ], - [ - ], [ { - "data": "def・abc", + "data": "̀hello", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13812,7 +13952,7 @@ ], [ { - "data": "・", + "data": "҈hello", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13831,13 +13971,10 @@ ], [ - ], - [ - ], [ { - "data": "٠۰", + "data": "ـߺ", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13850,16 +13987,10 @@ }, "type": "format" } - ], - [ - - ], - [ - ], [ { - "data": "क‍ष", + "data": "〱〲〳〴〵〮〯〻", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13875,7 +14006,7 @@ ], [ { - "data": "‍ष", + "data": "a·l", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13888,148 +14019,86 @@ }, "type": "format" } - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/ipv4.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ { - "data": "127.0.0.0.1", + "data": "·l", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "256.256.256.256", + "data": "l·a", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "127.0", + "data": "l·", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" + "format": "idn-hostname" }, "type": "format" } ], [ - { - "data": "0x7f000001", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" - }, - "type": "format" - } + ], [ { - "data": "2130706433", + "data": "α͵S", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "087.10.0.1", + "data": "α͵", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" + "format": "idn-hostname" }, "type": "format" } @@ -14039,124 +14108,102 @@ ], [ { - "data": "1২7.0.0.1", + "data": "A׳ב", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "192.168.1.0/24", + "data": "׳ב", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv4" + "format": "idn-hostname" }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/ipv6.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ ], [ { - "data": "12345::", + "data": "A״ב", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } - ], - [ - ], [ { - "data": "::abcef", + "data": "״ב", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } + ], + [ + ], [ { - "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1", + "data": "def・abc", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": "::laptop", + "data": "・", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } @@ -14172,48 +14219,54 @@ ], [ { - "data": ":2:3:4:5:6:7:8", + "data": "٠۰", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } + ], + [ + + ], + [ + ], [ { - "data": "1:2:3:4:5:6:7:", + "data": "क‍ष", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } ], [ { - "data": ":2:3:4::8", + "data": "‍ष", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "idn-hostname" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "idn-hostname" }, "type": "format" } @@ -14222,20 +14275,44 @@ ], [ - { - "data": "1::d6::42", - "data_pointer": "", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" - }, - "schema_pointer": "", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" - }, - "type": "format" - } + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/ipv4.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ @@ -14245,141 +14322,163 @@ ], [ { - "data": "1::2:192.168.256.1", + "data": "127.0.0.0.1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "type": "format" } ], [ { - "data": "1::2:192.168.ff.1", + "data": "256.256.256.256", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "type": "format" } - ], - [ - ], [ { - "data": "1:2:3:4:5:::8", + "data": "127.0", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "type": "format" } - ], - [ - ], [ { - "data": "1:2:3:4:5:6:7", + "data": "0x7f000001", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "type": "format" } ], [ { - "data": "1", + "data": "2130706433", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "type": "format" } ], [ { - "data": "127.0.0.1", + "data": "087.10.0.1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "type": "format" } + ], + [ + ], [ { - "data": "1:2:3:4:1.2.3", + "data": "1২7.0.0.1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "type": "format" } ], [ { - "data": " ::1", + "data": "192.168.1.0/24", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "ipv6" + "format": "ipv4" }, "type": "format" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/ipv6.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "::1 ", + "data": "12345::", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -14392,10 +14491,13 @@ }, "type": "format" } + ], + [ + ], [ { - "data": "fe80::/64", + "data": "::abcef", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -14411,7 +14513,7 @@ ], [ { - "data": "fe80::a%eth1", + "data": "1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -14424,13 +14526,10 @@ }, "type": "format" } - ], - [ - ], [ { - "data": "100:100:100:100:100:100:255.255.255.255.255", + "data": "::laptop", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -14443,10 +14542,19 @@ }, "type": "format" } + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "100:100:100:100:100:100:100:255.255.255.255", + "data": ":2:3:4:5:6:7:8", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -14462,7 +14570,7 @@ ], [ { - "data": "1:2:3:4:5:6:7:৪", + "data": "1:2:3:4:5:6:7:", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -14478,7 +14586,7 @@ ], [ { - "data": "1:2::192.16৪.0.1", + "data": ":2:3:4::8", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -14491,50 +14599,22 @@ }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/iri-reference.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ ], [ { - "data": "\\\\WINDOWS\\filëßåré", + "data": "1::d6::42", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "iri-reference" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "iri-reference" + "format": "ipv6" }, "type": "format" } @@ -14547,398 +14627,426 @@ ], [ { - "data": "#ƒräg\\mênt", + "data": "1::2:192.168.256.1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "iri-reference" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "iri-reference" + "format": "ipv6" }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/iri.json": [ - [ - [ - ], [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - + { + "data": "1::2:192.168.ff.1", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "ipv6" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "ipv6" + }, + "type": "format" + } ], [ ], [ - + { + "data": "1:2:3:4:5:::8", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "ipv6" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "ipv6" + }, + "type": "format" + } ], [ ], [ { - "data": "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334", + "data": "1:2:3:4:5:6:7", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "iri" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "iri" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "/abc", + "data": "1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "iri" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "iri" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "\\\\WINDOWS\\filëßåré", + "data": "127.0.0.1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "iri" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "iri" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "âππ", + "data": "1:2:3:4:1.2.3", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "iri" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "iri" + "format": "ipv6" }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/json-pointer.json": [ - [ - [ - - ], - [ - - ], - [ - - ], - [ - ], [ - - ], - [ - + { + "data": " ::1", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "ipv6" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "ipv6" + }, + "type": "format" + } ], [ - + { + "data": "::1 ", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "ipv6" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "ipv6" + }, + "type": "format" + } ], [ { - "data": "/foo/bar~", + "data": "fe80::/64", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - ], [ { - "data": "#", + "data": "fe80::a%eth1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } + ], + [ + ], [ { - "data": "#/", + "data": "100:100:100:100:100:100:255.255.255.255.255", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "#a", + "data": "100:100:100:100:100:100:100:255.255.255.255", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "/~0~", + "data": "1:2:3:4:5:6:7:৪", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } ], [ { - "data": "/~0/~", + "data": "1:2::192.16৪.0.1", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "ipv6" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "ipv6" }, "type": "format" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/iri-reference.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "/~2", + "data": "\\\\WINDOWS\\filëßåré", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "iri-reference" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "iri-reference" }, "type": "format" } + ], + [ + + ], + [ + ], [ { - "data": "/~-1", + "data": "#ƒräg\\mênt", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "iri-reference" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "iri-reference" }, "type": "format" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/iri.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": "/~~", + "data": "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "iri" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "iri" }, "type": "format" } ], [ { - "data": "a", + "data": "/abc", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "iri" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "iri" }, "type": "format" } ], [ { - "data": "0", + "data": "\\\\WINDOWS\\filëßåré", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "iri" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "iri" }, "type": "format" } ], [ { - "data": "a/a", + "data": "âππ", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "iri" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "json-pointer" + "format": "iri" }, "type": "format" } ] ] ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/regex.json": [ + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/json-pointer.json": [ [ [ @@ -14963,24 +15071,47 @@ ], [ { - "data": "^(abc]", + "data": "/foo/bar~", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "regex" + "format": "json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "regex" + "format": "json-pointer" }, "type": "format" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/relative-json-pointer.json": [ - [ + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], [ ], @@ -15013,43 +15144,294 @@ ], [ { - "data": "/foo/bar", + "data": "#", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "relative-json-pointer" + "format": "json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "relative-json-pointer" + "format": "json-pointer" }, "type": "format" } ], [ { - "data": "-1/foo/bar", + "data": "#/", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "relative-json-pointer" + "format": "json-pointer" }, "schema_pointer": "", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "relative-json-pointer" + "format": "json-pointer" }, "type": "format" } ], [ { - "data": "+1/foo/bar", + "data": "#a", "data_pointer": "", "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "relative-json-pointer" + "format": "json-pointer" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "type": "format" + } + ], + [ + { + "data": "/~0~", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "type": "format" + } + ], + [ + { + "data": "/~0/~", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "type": "format" + } + ], + [ + { + "data": "/~2", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "type": "format" + } + ], + [ + { + "data": "/~-1", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "type": "format" + } + ], + [ + { + "data": "/~~", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "type": "format" + } + ], + [ + { + "data": "a", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "type": "format" + } + ], + [ + { + "data": "0", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "type": "format" + } + ], + [ + { + "data": "a/a", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "json-pointer" + }, + "type": "format" + } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/regex.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + { + "data": "^(abc]", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "regex" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "regex" + }, + "type": "format" + } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/relative-json-pointer.json": [ + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + { + "data": "/foo/bar", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "relative-json-pointer" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "relative-json-pointer" + }, + "type": "format" + } + ], + [ + { + "data": "-1/foo/bar", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "relative-json-pointer" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "relative-json-pointer" + }, + "type": "format" + } + ], + [ + { + "data": "+1/foo/bar", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "relative-json-pointer" }, "schema_pointer": "", "root_schema": { @@ -16138,14 +16520,112 @@ ] ] ], - "JSON-Schema-Test-Suite/tests/draft2020-12/optional/no-schema.json": [ + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/id.json": [ [ [ + ], + [ + ], [ { - "data": "a", + "data": 1, + "data_pointer": "", + "schema": { + "enum": [ + { + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", + "type": "null" + } + ] + }, + "schema_pointer": "/$defs/id_in_enum", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$defs": { + "id_in_enum": { + "enum": [ + { + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", + "type": "null" + } + ] + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", + "type": "string" + }, + "zzz_id_in_const": { + "const": { + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", + "type": "null" + } + } + }, + "anyOf": [ + { + "$ref": "#/$defs/id_in_enum" + }, + { + "$ref": "https://localhost:1234/draft2020-12/id/my_identifier.json" + } + ] + }, + "type": "enum" + }, + { + "data": 1, + "data_pointer": "", + "schema": { + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", + "type": "string" + }, + "schema_pointer": "/$defs/real_id_in_schema", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$defs": { + "id_in_enum": { + "enum": [ + { + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", + "type": "null" + } + ] + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", + "type": "string" + }, + "zzz_id_in_const": { + "const": { + "$id": "https://localhost:1234/draft2020-12/id/my_identifier.json", + "type": "null" + } + } + }, + "anyOf": [ + { + "$ref": "#/$defs/id_in_enum" + }, + { + "$ref": "https://localhost:1234/draft2020-12/id/my_identifier.json" + } + ] + }, + "type": "string" + } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/no-schema.json": [ + [ + [ + + ], + [ + { + "data": "a", "data_pointer": "", "schema": { "minLength": 2 @@ -16372,113 +16852,360 @@ ] ] ], - "JSON-Schema-Test-Suite/tests/draft2020-12/pattern.json": [ + "JSON-Schema-Test-Suite/tests/draft2020-12/optional/unknownKeyword.json": [ [ [ ], [ { - "data": "abc", + "data": null, "data_pointer": "", "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "^a*$" + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "schema_pointer": "", + "schema_pointer": "/$defs/id_in_unknown0", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "pattern": "^a*$" + "$defs": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } + } + }, + "anyOf": [ + { + "$ref": "#/$defs/id_in_unknown0" + }, + { + "$ref": "#/$defs/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json" + } + ] }, - "type": "pattern" - } - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ] - ], - [ - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft2020-12/patternProperties.json": [ - [ - [ - - ], - [ - - ], - [ + "type": "not" + }, { - "data": "bar", - "data_pointer": "/foo", + "data": null, + "data_pointer": "", "schema": { - "type": "integer" + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } }, - "schema_pointer": "/patternProperties/f.*o", + "schema_pointer": "/$defs/id_in_unknown1", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "patternProperties": { - "f.*o": { - "type": "integer" + "$defs": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } } - } + }, + "anyOf": [ + { + "$ref": "#/$defs/id_in_unknown0" + }, + { + "$ref": "#/$defs/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json" + } + ] }, - "type": "integer" - } - ], - [ + "type": "not" + }, { - "data": "bar", - "data_pointer": "/foo", + "data": null, + "data_pointer": "", "schema": { - "type": "integer" + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "string" }, - "schema_pointer": "/patternProperties/f.*o", + "schema_pointer": "/$defs/real_id_in_schema", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "patternProperties": { - "f.*o": { - "type": "integer" + "$defs": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } + } + }, + "anyOf": [ + { + "$ref": "#/$defs/id_in_unknown0" + }, + { + "$ref": "#/$defs/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json" } + ] + }, + "type": "string" + } + ], + [ + { + "data": 1, + "data_pointer": "", + "schema": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "null" + } + ] } }, - "type": "integer" + "schema_pointer": "/$defs/id_in_unknown0", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$defs": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } + } + }, + "anyOf": [ + { + "$ref": "#/$defs/id_in_unknown0" + }, + { + "$ref": "#/$defs/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json" + } + ] + }, + "type": "not" }, { - "data": "baz", - "data_pointer": "/foooooo", + "data": 1, + "data_pointer": "", "schema": { - "type": "integer" + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } }, - "schema_pointer": "/patternProperties/f.*o", + "schema_pointer": "/$defs/id_in_unknown1", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "patternProperties": { - "f.*o": { - "type": "integer" + "$defs": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } } - } + }, + "anyOf": [ + { + "$ref": "#/$defs/id_in_unknown0" + }, + { + "$ref": "#/$defs/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json" + } + ] }, - "type": "integer" + "type": "not" + }, + { + "data": 1, + "data_pointer": "", + "schema": { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "string" + }, + "schema_pointer": "/$defs/real_id_in_schema", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$defs": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } + } + }, + "anyOf": [ + { + "$ref": "#/$defs/id_in_unknown0" + }, + { + "$ref": "#/$defs/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json" + } + ] + }, + "type": "string" + } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/pattern.json": [ + [ + [ + + ], + [ + { + "data": "abc", + "data_pointer": "", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "pattern": "^a*$" + }, + "schema_pointer": "", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "pattern": "^a*$" + }, + "type": "pattern" } ], [ @@ -16489,12 +17216,25 @@ ], [ + ], + [ + + ], + [ + + ], + [ + ] ], [ [ - ], + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft2020-12/patternProperties.json": [ + [ [ ], @@ -16504,19 +17244,16 @@ [ { "data": "bar", - "data_pointer": "/a", + "data_pointer": "/foo", "schema": { "type": "integer" }, - "schema_pointer": "/patternProperties/a*", + "schema_pointer": "/patternProperties/f.*o", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "patternProperties": { - "a*": { + "f.*o": { "type": "integer" - }, - "aaa*": { - "maximum": 20 } } }, @@ -16525,8 +17262,86 @@ ], [ { - "data": 31, - "data_pointer": "/aaaa", + "data": "bar", + "data_pointer": "/foo", + "schema": { + "type": "integer" + }, + "schema_pointer": "/patternProperties/f.*o", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "patternProperties": { + "f.*o": { + "type": "integer" + } + } + }, + "type": "integer" + }, + { + "data": "baz", + "data_pointer": "/foooooo", + "schema": { + "type": "integer" + }, + "schema_pointer": "/patternProperties/f.*o", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "patternProperties": { + "f.*o": { + "type": "integer" + } + } + }, + "type": "integer" + } + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ + { + "data": "bar", + "data_pointer": "/a", + "schema": { + "type": "integer" + }, + "schema_pointer": "/patternProperties/a*", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "patternProperties": { + "a*": { + "type": "integer" + }, + "aaa*": { + "maximum": 20 + } + } + }, + "type": "integer" + } + ], + [ + { + "data": 31, + "data_pointer": "/aaaa", "schema": { "maximum": 20 }, @@ -21258,6 +22073,40 @@ [ [ + ], + [ + { + "data": "baz", + "data_pointer": "/2", + "schema": false, + "schema_pointer": "/unevaluatedItems", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "unevaluatedItems": false, + "prefixItems": [ + { + "type": "string" + } + ], + "$ref": "#/$defs/bar", + "$defs": { + "bar": { + "prefixItems": [ + true, + { + "type": "string" + } + ] + } + } + }, + "type": "schema" + } + ] + ], + [ + [ + ], [ { @@ -21267,8 +22116,8 @@ "schema_pointer": "/$defs/baseSchema/unevaluatedItems", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/derived", - "$ref": "/baseSchema", + "$id": "https://example.com/unevaluated-items-with-dynamic-ref/derived", + "$ref": "./baseSchema", "$defs": { "derived": { "$dynamicAnchor": "addons", @@ -21280,7 +22129,7 @@ ] }, "baseSchema": { - "$id": "/baseSchema", + "$id": "./baseSchema", "$comment": "unevaluatedItems comes first so it's more likely to catch bugs with implementations that are sensitive to keyword ordering", "unevaluatedItems": false, "type": "array", @@ -22764,6 +23613,40 @@ [ [ + ], + [ + { + "data": "baz", + "data_pointer": "/baz", + "schema": false, + "schema_pointer": "/unevaluatedProperties", + "root_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "unevaluatedProperties": false, + "properties": { + "foo": { + "type": "string" + } + }, + "$ref": "#/$defs/bar", + "$defs": { + "bar": { + "properties": { + "bar": { + "type": "string" + } + } + } + } + }, + "type": "schema" + } + ] + ], + [ + [ + ], [ { @@ -22773,8 +23656,8 @@ "schema_pointer": "/$defs/baseSchema/unevaluatedProperties", "root_schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/derived", - "$ref": "/baseSchema", + "$id": "https://example.com/unevaluated-properties-with-dynamic-ref/derived", + "$ref": "./baseSchema", "$defs": { "derived": { "$dynamicAnchor": "addons", @@ -22785,7 +23668,7 @@ } }, "baseSchema": { - "$id": "/baseSchema", + "$id": "./baseSchema", "$comment": "unevaluatedProperties comes first so it's more likely to catch bugs with implementations that are sensitive to keyword ordering", "unevaluatedProperties": false, "type": "object", @@ -28418,341 +29301,6 @@ ] ] ], - "JSON-Schema-Test-Suite/tests/draft2020-12/unknownKeyword.json": [ - [ - [ - - ], - [ - { - "data": null, - "data_pointer": "", - "schema": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "schema_pointer": "/$defs/id_in_unknown0", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/id_in_unknown0" - }, - { - "$ref": "#/$defs/id_in_unknown1" - }, - { - "$ref": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json" - } - ] - }, - "type": "not" - }, - { - "data": null, - "data_pointer": "", - "schema": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - }, - "schema_pointer": "/$defs/id_in_unknown1", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/id_in_unknown0" - }, - { - "$ref": "#/$defs/id_in_unknown1" - }, - { - "$ref": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json" - } - ] - }, - "type": "not" - }, - { - "data": null, - "data_pointer": "", - "schema": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "string" - }, - "schema_pointer": "/$defs/real_id_in_schema", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/id_in_unknown0" - }, - { - "$ref": "#/$defs/id_in_unknown1" - }, - { - "$ref": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json" - } - ] - }, - "type": "string" - } - ], - [ - { - "data": 1, - "data_pointer": "", - "schema": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "schema_pointer": "/$defs/id_in_unknown0", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/id_in_unknown0" - }, - { - "$ref": "#/$defs/id_in_unknown1" - }, - { - "$ref": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json" - } - ] - }, - "type": "not" - }, - { - "data": 1, - "data_pointer": "", - "schema": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - }, - "schema_pointer": "/$defs/id_in_unknown1", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/id_in_unknown0" - }, - { - "$ref": "#/$defs/id_in_unknown1" - }, - { - "$ref": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json" - } - ] - }, - "type": "not" - }, - { - "data": 1, - "data_pointer": "", - "schema": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "string" - }, - "schema_pointer": "/$defs/real_id_in_schema", - "root_schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/$defs/id_in_unknown0" - }, - { - "$ref": "#/$defs/id_in_unknown1" - }, - { - "$ref": "https://localhost:1234/draft2020-12/unknownKeyword/my_identifier.json" - } - ] - }, - "type": "string" - } - ] - ] - ], "JSON-Schema-Test-Suite/tests/draft2020-12/vocabulary.json": [ [ [ diff --git a/test/fixtures/draft4.json b/test/fixtures/draft4.json index 9850ed7..c59edb8 100644 --- a/test/fixtures/draft4.json +++ b/test/fixtures/draft4.json @@ -2941,6 +2941,59 @@ [ [ + ], + [ + { + "data": [ + 0 + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + false + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + false + ] + ] + }, + "type": "enum" + } + ], + [ + { + "data": [ + 0.0 + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + false + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + false + ] + ] + }, + "type": "enum" + } + ] + ], + [ + [ + ], [ { @@ -2979,6 +3032,59 @@ } ] ], + [ + [ + + ], + [ + { + "data": [ + 1 + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + true + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + true + ] + ] + }, + "type": "enum" + } + ], + [ + { + "data": [ + 1.0 + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + true + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + true + ] + ] + }, + "type": "enum" + } + ] + ], [ [ { @@ -3005,6 +3111,38 @@ ] ], + [ + [ + { + "data": [ + false + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + 0 + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + 0 + ] + ] + }, + "type": "enum" + } + ], + [ + + ], + [ + + ] + ], [ [ { @@ -3031,6 +3169,38 @@ ] ], + [ + [ + { + "data": [ + true + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + 1 + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + 1 + ] + ] + }, + "type": "enum" + } + ], + [ + + ], + [ + + ] + ], [ [ @@ -3177,102 +3347,6 @@ ] ] ], - "JSON-Schema-Test-Suite/tests/draft4/id.json": [ - [ - [ - - ], - [ - - ], - [ - { - "data": 1, - "data_pointer": "", - "schema": { - "enum": [ - { - "id": "https://localhost:1234/my_identifier.json", - "type": "null" - } - ] - }, - "schema_pointer": "/definitions/id_in_enum", - "root_schema": { - "definitions": { - "id_in_enum": { - "enum": [ - { - "id": "https://localhost:1234/my_identifier.json", - "type": "null" - } - ] - }, - "real_id_in_schema": { - "id": "https://localhost:1234/my_identifier.json", - "type": "string" - }, - "zzz_id_in_const": { - "const": { - "id": "https://localhost:1234/my_identifier.json", - "type": "null" - } - } - }, - "anyOf": [ - { - "$ref": "#/definitions/id_in_enum" - }, - { - "$ref": "https://localhost:1234/my_identifier.json" - } - ] - }, - "type": "enum" - }, - { - "data": 1, - "data_pointer": "", - "schema": { - "id": "https://localhost:1234/my_identifier.json", - "type": "string" - }, - "schema_pointer": "/definitions/real_id_in_schema", - "root_schema": { - "definitions": { - "id_in_enum": { - "enum": [ - { - "id": "https://localhost:1234/my_identifier.json", - "type": "null" - } - ] - }, - "real_id_in_schema": { - "id": "https://localhost:1234/my_identifier.json", - "type": "string" - }, - "zzz_id_in_const": { - "const": { - "id": "https://localhost:1234/my_identifier.json", - "type": "null" - } - } - }, - "anyOf": [ - { - "$ref": "#/definitions/id_in_enum" - }, - { - "$ref": "https://localhost:1234/my_identifier.json" - } - ] - }, - "type": "string" - } - ] - ] - ], "JSON-Schema-Test-Suite/tests/draft4/infinite-loop-detection.json": [ [ [ @@ -4533,6 +4607,164 @@ ], [ + ] + ], + [ + [ + { + "data": 1, + "data_pointer": "", + "schema": { + "not": { + } + }, + "schema_pointer": "", + "root_schema": { + "not": { + } + }, + "type": "not" + } + ], + [ + { + "data": "foo", + "data_pointer": "", + "schema": { + "not": { + } + }, + "schema_pointer": "", + "root_schema": { + "not": { + } + }, + "type": "not" + } + ], + [ + { + "data": true, + "data_pointer": "", + "schema": { + "not": { + } + }, + "schema_pointer": "", + "root_schema": { + "not": { + } + }, + "type": "not" + } + ], + [ + { + "data": false, + "data_pointer": "", + "schema": { + "not": { + } + }, + "schema_pointer": "", + "root_schema": { + "not": { + } + }, + "type": "not" + } + ], + [ + { + "data": null, + "data_pointer": "", + "schema": { + "not": { + } + }, + "schema_pointer": "", + "root_schema": { + "not": { + } + }, + "type": "not" + } + ], + [ + { + "data": { + "foo": "bar" + }, + "data_pointer": "", + "schema": { + "not": { + } + }, + "schema_pointer": "", + "root_schema": { + "not": { + } + }, + "type": "not" + } + ], + [ + { + "data": { + }, + "data_pointer": "", + "schema": { + "not": { + } + }, + "schema_pointer": "", + "root_schema": { + "not": { + } + }, + "type": "not" + } + ], + [ + { + "data": [ + "foo" + ], + "data_pointer": "", + "schema": { + "not": { + } + }, + "schema_pointer": "", + "root_schema": { + "not": { + } + }, + "type": "not" + } + ], + [ + { + "data": [ + + ], + "data_pointer": "", + "schema": { + "not": { + } + }, + "schema_pointer": "", + "root_schema": { + "not": { + } + }, + "type": "not" + } + ] + ], + [ + [ + ] ] ], @@ -7202,6 +7434,102 @@ ] ] ], + "JSON-Schema-Test-Suite/tests/draft4/optional/id.json": [ + [ + [ + + ], + [ + + ], + [ + { + "data": 1, + "data_pointer": "", + "schema": { + "enum": [ + { + "id": "https://localhost:1234/my_identifier.json", + "type": "null" + } + ] + }, + "schema_pointer": "/definitions/id_in_enum", + "root_schema": { + "definitions": { + "id_in_enum": { + "enum": [ + { + "id": "https://localhost:1234/my_identifier.json", + "type": "null" + } + ] + }, + "real_id_in_schema": { + "id": "https://localhost:1234/my_identifier.json", + "type": "string" + }, + "zzz_id_in_const": { + "const": { + "id": "https://localhost:1234/my_identifier.json", + "type": "null" + } + } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_enum" + }, + { + "$ref": "https://localhost:1234/my_identifier.json" + } + ] + }, + "type": "enum" + }, + { + "data": 1, + "data_pointer": "", + "schema": { + "id": "https://localhost:1234/my_identifier.json", + "type": "string" + }, + "schema_pointer": "/definitions/real_id_in_schema", + "root_schema": { + "definitions": { + "id_in_enum": { + "enum": [ + { + "id": "https://localhost:1234/my_identifier.json", + "type": "null" + } + ] + }, + "real_id_in_schema": { + "id": "https://localhost:1234/my_identifier.json", + "type": "string" + }, + "zzz_id_in_const": { + "const": { + "id": "https://localhost:1234/my_identifier.json", + "type": "null" + } + } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_enum" + }, + { + "$ref": "https://localhost:1234/my_identifier.json" + } + ] + }, + "type": "string" + } + ] + ] + ], "JSON-Schema-Test-Suite/tests/draft4/optional/non-bmp-regex.json": [ [ [ diff --git a/test/fixtures/draft6.json b/test/fixtures/draft6.json index 4ae2b50..e4cd7b6 100644 --- a/test/fixtures/draft6.json +++ b/test/fixtures/draft6.json @@ -4138,6 +4138,59 @@ [ [ + ], + [ + { + "data": [ + 0 + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + false + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + false + ] + ] + }, + "type": "enum" + } + ], + [ + { + "data": [ + 0.0 + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + false + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + false + ] + ] + }, + "type": "enum" + } + ] + ], + [ + [ + ], [ { @@ -4176,6 +4229,59 @@ } ] ], + [ + [ + + ], + [ + { + "data": [ + 1 + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + true + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + true + ] + ] + }, + "type": "enum" + } + ], + [ + { + "data": [ + 1.0 + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + true + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + true + ] + ] + }, + "type": "enum" + } + ] + ], [ [ { @@ -4202,6 +4308,38 @@ ] ], + [ + [ + { + "data": [ + false + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + 0 + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + 0 + ] + ] + }, + "type": "enum" + } + ], + [ + + ], + [ + + ] + ], [ [ { @@ -4228,6 +4366,38 @@ ] ], + [ + [ + { + "data": [ + true + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + 1 + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + 1 + ] + ] + }, + "type": "enum" + } + ], + [ + + ], + [ + + ] + ], [ [ @@ -4510,330 +4680,76 @@ ] ] ], - "JSON-Schema-Test-Suite/tests/draft6/id.json": [ + "JSON-Schema-Test-Suite/tests/draft6/infinite-loop-detection.json": [ [ [ - ], - [ - ], [ { - "data": 1, - "data_pointer": "", + "data": "a string", + "data_pointer": "/foo", "schema": { - "enum": [ - { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "null" - } - ] + "type": "integer" }, - "schema_pointer": "/definitions/id_in_enum", + "schema_pointer": "/definitions/int", "root_schema": { "definitions": { - "id_in_enum": { - "enum": [ - { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "null" - } - ] - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "string" - }, - "zzz_id_in_const": { - "const": { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "null" - } + "int": { + "type": "integer" } }, - "anyOf": [ + "allOf": [ { - "$ref": "#/definitions/id_in_enum" + "properties": { + "foo": { + "$ref": "#/definitions/int" + } + } }, { - "$ref": "https://localhost:1234/id/my_identifier.json" + "additionalProperties": { + "$ref": "#/definitions/int" + } } ] }, - "type": "enum" + "type": "integer" }, { - "data": 1, - "data_pointer": "", + "data": "a string", + "data_pointer": "/foo", "schema": { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "string" + "type": "integer" }, - "schema_pointer": "/definitions/real_id_in_schema", + "schema_pointer": "/definitions/int", "root_schema": { "definitions": { - "id_in_enum": { - "enum": [ - { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "null" - } - ] - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "string" - }, - "zzz_id_in_const": { - "const": { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "null" - } + "int": { + "type": "integer" } }, - "anyOf": [ + "allOf": [ { - "$ref": "#/definitions/id_in_enum" + "properties": { + "foo": { + "$ref": "#/definitions/int" + } + } }, { - "$ref": "https://localhost:1234/id/my_identifier.json" + "additionalProperties": { + "$ref": "#/definitions/int" + } } ] }, - "type": "string" + "type": "integer" } ] - ], - [ - [ - - ], - [ - { - "data": 1, - "data_pointer": "", - "schema": { - "const": "skip not_a_real_anchor" - }, - "schema_pointer": "/oneOf/0", - "root_schema": { - "definitions": { - "const_not_anchor": { - "const": { - "$id": "#not_a_real_anchor" - } - } - }, - "oneOf": [ - { - "const": "skip not_a_real_anchor" - }, - { - "allOf": [ - { - "not": { - "const": "skip not_a_real_anchor" - } - }, - { - "$ref": "#/definitions/const_not_anchor" - } - ] - } - ] - }, - "type": "const" - }, - { - "data": 1, - "data_pointer": "", - "schema": { - "const": { - "$id": "#not_a_real_anchor" - } - }, - "schema_pointer": "/definitions/const_not_anchor", - "root_schema": { - "definitions": { - "const_not_anchor": { - "const": { - "$id": "#not_a_real_anchor" - } - } - }, - "oneOf": [ - { - "const": "skip not_a_real_anchor" - }, - { - "allOf": [ - { - "not": { - "const": "skip not_a_real_anchor" - } - }, - { - "$ref": "#/definitions/const_not_anchor" - } - ] - } - ] - }, - "type": "const" - } - ] - ], - [ - [ - - ], - [ - { - "data": 1, - "data_pointer": "", - "schema": { - "const": "skip not_a_real_id" - }, - "schema_pointer": "/oneOf/0", - "root_schema": { - "definitions": { - "const_not_id": { - "const": { - "$id": "not_a_real_id" - } - } - }, - "oneOf": [ - { - "const": "skip not_a_real_id" - }, - { - "allOf": [ - { - "not": { - "const": "skip not_a_real_id" - } - }, - { - "$ref": "#/definitions/const_not_id" - } - ] - } - ] - }, - "type": "const" - }, - { - "data": 1, - "data_pointer": "", - "schema": { - "const": { - "$id": "not_a_real_id" - } - }, - "schema_pointer": "/definitions/const_not_id", - "root_schema": { - "definitions": { - "const_not_id": { - "const": { - "$id": "not_a_real_id" - } - } - }, - "oneOf": [ - { - "const": "skip not_a_real_id" - }, - { - "allOf": [ - { - "not": { - "const": "skip not_a_real_id" - } - }, - { - "$ref": "#/definitions/const_not_id" - } - ] - } - ] - }, - "type": "const" - } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft6/infinite-loop-detection.json": [ - [ - [ - - ], - [ - { - "data": "a string", - "data_pointer": "/foo", - "schema": { - "type": "integer" - }, - "schema_pointer": "/definitions/int", - "root_schema": { - "definitions": { - "int": { - "type": "integer" - } - }, - "allOf": [ - { - "properties": { - "foo": { - "$ref": "#/definitions/int" - } - } - }, - { - "additionalProperties": { - "$ref": "#/definitions/int" - } - } - ] - }, - "type": "integer" - }, - { - "data": "a string", - "data_pointer": "/foo", - "schema": { - "type": "integer" - }, - "schema_pointer": "/definitions/int", - "root_schema": { - "definitions": { - "int": { - "type": "integer" - } - }, - "allOf": [ - { - "properties": { - "foo": { - "$ref": "#/definitions/int" - } - } - }, - { - "additionalProperties": { - "$ref": "#/definitions/int" - } - } - ] - }, - "type": "integer" - } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft6/items.json": [ + ] + ], + "JSON-Schema-Test-Suite/tests/draft6/items.json": [ [ [ @@ -6112,329 +6028,345 @@ [ [ { - "data": "foo", + "data": 1, "data_pointer": "", "schema": { - "not": true + "not": { + } }, "schema_pointer": "", "root_schema": { - "not": true + "not": { + } }, "type": "not" } - ] - ], - [ - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft6/oneOf.json": [ - [ - [ - - ], - [ - ], [ { - "data": 3, + "data": "foo", "data_pointer": "", "schema": { - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, - "type": "oneOf" + "type": "not" } ], [ { - "data": 1.5, + "data": true, "data_pointer": "", "schema": { - "type": "integer" + "not": { + } }, - "schema_pointer": "/oneOf/0", + "schema_pointer": "", "root_schema": { - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, - "type": "integer" - }, + "type": "not" + } + ], + [ { - "data": 1.5, + "data": false, "data_pointer": "", "schema": { - "minimum": 2 + "not": { + } }, - "schema_pointer": "/oneOf/1", + "schema_pointer": "", "root_schema": { - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, - "type": "minimum" + "type": "not" } - ] - ], - [ + ], [ { - "data": 3, + "data": null, "data_pointer": "", "schema": { - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, - "type": "oneOf" - }, + "type": "not" + } + ], + [ { - "data": 3, + "data": { + "foo": "bar" + }, "data_pointer": "", "schema": { - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, - "type": "string" + "type": "not" } - ], - [ - ], [ { - "data": "foo", + "data": { + }, "data_pointer": "", "schema": { - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, - "type": "oneOf" + "type": "not" } - ] - ], - [ + ], [ { - "data": "foo", + "data": [ + "foo" + ], "data_pointer": "", "schema": { - "oneOf": [ - true, - true, - true - ] + "not": { + } }, "schema_pointer": "", "root_schema": { - "oneOf": [ - true, - true, - true - ] + "not": { + } }, - "type": "oneOf" + "type": "not" } - ] - ], - [ - [ - - ] - ], - [ + ], [ { - "data": "foo", + "data": [ + + ], "data_pointer": "", "schema": { - "oneOf": [ - true, - true, - false - ] + "not": { + } }, "schema_pointer": "", "root_schema": { - "oneOf": [ - true, - true, - false - ] + "not": { + } }, - "type": "oneOf" + "type": "not" } ] ], [ [ { - "data": "foo", + "data": 1, "data_pointer": "", - "schema": false, - "schema_pointer": "/oneOf/0", - "root_schema": { - "oneOf": [ - false, - false, - false - ] + "schema": { + "not": true }, - "type": "schema" - }, - { - "data": "foo", - "data_pointer": "", - "schema": false, - "schema_pointer": "/oneOf/1", + "schema_pointer": "", "root_schema": { - "oneOf": [ - false, - false, - false - ] + "not": true }, - "type": "schema" - }, + "type": "not" + } + ], + [ { "data": "foo", "data_pointer": "", - "schema": false, - "schema_pointer": "/oneOf/2", + "schema": { + "not": true + }, + "schema_pointer": "", "root_schema": { - "oneOf": [ - false, - false, - false - ] + "not": true }, - "type": "schema" + "type": "not" } - ] - ], - [ - [ - ], [ - + { + "data": true, + "data_pointer": "", + "schema": { + "not": true + }, + "schema_pointer": "", + "root_schema": { + "not": true + }, + "type": "not" + } + ], + [ + { + "data": false, + "data_pointer": "", + "schema": { + "not": true + }, + "schema_pointer": "", + "root_schema": { + "not": true + }, + "type": "not" + } + ], + [ + { + "data": null, + "data_pointer": "", + "schema": { + "not": true + }, + "schema_pointer": "", + "root_schema": { + "not": true + }, + "type": "not" + } ], [ { "data": { - "foo": "baz", - "bar": 2 + "foo": "bar" + }, + "data_pointer": "", + "schema": { + "not": true + }, + "schema_pointer": "", + "root_schema": { + "not": true + }, + "type": "not" + } + ], + [ + { + "data": { + }, + "data_pointer": "", + "schema": { + "not": true + }, + "schema_pointer": "", + "root_schema": { + "not": true + }, + "type": "not" + } + ], + [ + { + "data": [ + "foo" + ], + "data_pointer": "", + "schema": { + "not": true + }, + "schema_pointer": "", + "root_schema": { + "not": true + }, + "type": "not" + } + ], + [ + { + "data": [ + + ], + "data_pointer": "", + "schema": { + "not": true + }, + "schema_pointer": "", + "root_schema": { + "not": true }, + "type": "not" + } + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft6/oneOf.json": [ + [ + [ + + ], + [ + + ], + [ + { + "data": 3, "data_pointer": "", "schema": { "oneOf": [ { - "properties": { - "bar": { - "type": "integer" - } - }, - "required": [ - "bar" - ] + "type": "integer" }, { - "properties": { - "foo": { - "type": "string" - } - }, - "required": [ - "foo" - ] + "minimum": 2 } ] }, @@ -6442,24 +6374,10 @@ "root_schema": { "oneOf": [ { - "properties": { - "bar": { - "type": "integer" - } - }, - "required": [ - "bar" - ] + "type": "integer" }, { - "properties": { - "foo": { - "type": "string" - } - }, - "required": [ - "foo" - ] + "minimum": 2 } ] }, @@ -6468,226 +6386,131 @@ ], [ { - "data": "quux", - "data_pointer": "/bar", + "data": 1.5, + "data_pointer": "", "schema": { "type": "integer" }, - "schema_pointer": "/oneOf/0/properties/bar", + "schema_pointer": "/oneOf/0", "root_schema": { "oneOf": [ { - "properties": { - "bar": { - "type": "integer" - } - }, - "required": [ - "bar" - ] + "type": "integer" }, { - "properties": { - "foo": { - "type": "string" - } - }, - "required": [ - "foo" - ] + "minimum": 2 } ] }, "type": "integer" }, { - "data": 2, - "data_pointer": "/foo", + "data": 1.5, + "data_pointer": "", "schema": { - "type": "string" + "minimum": 2 }, - "schema_pointer": "/oneOf/1/properties/foo", + "schema_pointer": "/oneOf/1", "root_schema": { "oneOf": [ { - "properties": { - "bar": { - "type": "integer" - } - }, - "required": [ - "bar" - ] + "type": "integer" }, { - "properties": { - "foo": { - "type": "string" - } - }, - "required": [ - "foo" - ] + "minimum": 2 } ] }, - "type": "string" + "type": "minimum" } ] ], [ - [ - - ], [ { - "data": 123, + "data": 3, "data_pointer": "", "schema": { + "type": "string", "oneOf": [ { - "type": "number" + "minLength": 2 }, { + "maxLength": 4 } ] }, "schema_pointer": "", "root_schema": { + "type": "string", "oneOf": [ { - "type": "number" + "minLength": 2 }, { + "maxLength": 4 } ] }, "type": "oneOf" - } - ] - ], - [ - [ + }, { - "data": { - "bar": 2 - }, + "data": 3, "data_pointer": "", "schema": { - "required": [ - "foo", - "bar" - ] - }, - "schema_pointer": "/oneOf/0", - "root_schema": { - "type": "object", + "type": "string", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "minLength": 2 }, { - "required": [ - "foo", - "baz" - ] + "maxLength": 4 } ] }, - "type": "required", - "details": { - "missing_keys": [ - "foo" - ] - } - }, - { - "data": { - "bar": 2 - }, - "data_pointer": "", - "schema": { - "required": [ - "foo", - "baz" - ] - }, - "schema_pointer": "/oneOf/1", + "schema_pointer": "", "root_schema": { - "type": "object", + "type": "string", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "minLength": 2 }, { - "required": [ - "foo", - "baz" - ] + "maxLength": 4 } ] }, - "type": "required", - "details": { - "missing_keys": [ - "foo", - "baz" - ] - } + "type": "string" } ], [ - ], - [ - ], [ { - "data": { - "foo": 1, - "bar": 2, - "baz": 3 - }, + "data": "foo", "data_pointer": "", "schema": { - "type": "object", + "type": "string", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "minLength": 2 }, { - "required": [ - "foo", - "baz" - ] + "maxLength": 4 } ] }, "schema_pointer": "", "root_schema": { - "type": "object", + "type": "string", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "minLength": 2 }, { - "required": [ - "foo", - "baz" - ] + "maxLength": 4 } ] }, @@ -6695,6 +6518,105 @@ } ] ], + [ + [ + { + "data": "foo", + "data_pointer": "", + "schema": { + "oneOf": [ + true, + true, + true + ] + }, + "schema_pointer": "", + "root_schema": { + "oneOf": [ + true, + true, + true + ] + }, + "type": "oneOf" + } + ] + ], + [ + [ + + ] + ], + [ + [ + { + "data": "foo", + "data_pointer": "", + "schema": { + "oneOf": [ + true, + true, + false + ] + }, + "schema_pointer": "", + "root_schema": { + "oneOf": [ + true, + true, + false + ] + }, + "type": "oneOf" + } + ] + ], + [ + [ + { + "data": "foo", + "data_pointer": "", + "schema": false, + "schema_pointer": "/oneOf/0", + "root_schema": { + "oneOf": [ + false, + false, + false + ] + }, + "type": "schema" + }, + { + "data": "foo", + "data_pointer": "", + "schema": false, + "schema_pointer": "/oneOf/1", + "root_schema": { + "oneOf": [ + false, + false, + false + ] + }, + "type": "schema" + }, + { + "data": "foo", + "data_pointer": "", + "schema": false, + "schema_pointer": "/oneOf/2", + "root_schema": { + "oneOf": [ + false, + false, + false + ] + }, + "type": "schema" + } + ] + ], [ [ @@ -6705,16 +6627,17 @@ [ { "data": { - "foo": "foo", - "bar": 8 + "foo": "baz", + "bar": 2 }, "data_pointer": "", "schema": { "oneOf": [ { "properties": { - "bar": true, - "baz": true + "bar": { + "type": "integer" + } }, "required": [ "bar" @@ -6722,7 +6645,9 @@ }, { "properties": { - "foo": true + "foo": { + "type": "string" + } }, "required": [ "foo" @@ -6735,8 +6660,9 @@ "oneOf": [ { "properties": { - "bar": true, - "baz": true + "bar": { + "type": "integer" + } }, "required": [ "bar" @@ -6744,7 +6670,9 @@ }, { "properties": { - "foo": true + "foo": { + "type": "string" + } }, "required": [ "foo" @@ -6757,26 +6685,19 @@ ], [ { - "data": { - "baz": "quux" - }, - "data_pointer": "", + "data": "quux", + "data_pointer": "/bar", "schema": { - "properties": { - "bar": true, - "baz": true - }, - "required": [ - "bar" - ] + "type": "integer" }, - "schema_pointer": "/oneOf/0", + "schema_pointer": "/oneOf/0/properties/bar", "root_schema": { "oneOf": [ { "properties": { - "bar": true, - "baz": true + "bar": { + "type": "integer" + } }, "required": [ "bar" @@ -6784,7 +6705,9 @@ }, { "properties": { - "foo": true + "foo": { + "type": "string" + } }, "required": [ "foo" @@ -6792,33 +6715,22 @@ } ] }, - "type": "required", - "details": { - "missing_keys": [ - "bar" - ] - } + "type": "integer" }, { - "data": { - "baz": "quux" - }, - "data_pointer": "", + "data": 2, + "data_pointer": "/foo", "schema": { - "properties": { - "foo": true - }, - "required": [ - "foo" - ] + "type": "string" }, - "schema_pointer": "/oneOf/1", + "schema_pointer": "/oneOf/1/properties/foo", "root_schema": { "oneOf": [ { "properties": { - "bar": true, - "baz": true + "bar": { + "type": "integer" + } }, "required": [ "bar" @@ -6826,7 +6738,9 @@ }, { "properties": { - "foo": true + "foo": { + "type": "string" + } }, "required": [ "foo" @@ -6834,12 +6748,7 @@ } ] }, - "type": "required", - "details": { - "missing_keys": [ - "foo" - ] - } + "type": "string" } ] ], @@ -6852,240 +6761,335 @@ "data": 123, "data_pointer": "", "schema": { - "type": "null" - }, - "schema_pointer": "/oneOf/0/oneOf/0", - "root_schema": { "oneOf": [ { - "oneOf": [ - { - "type": "null" - } - ] + "type": "number" + }, + { } ] }, - "type": "null" - } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft6/optional/bignum.json": [ - [ - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - - ] - ], - [ - [ - { - "data": 98249283749234923498293171823948729348710298301928331, - "data_pointer": "", - "schema": { - "type": "string" - }, "schema_pointer": "", "root_schema": { - "type": "string" + "oneOf": [ + { + "type": "number" + }, + { + } + ] }, - "type": "string" + "type": "oneOf" } ] ], - [ - [ - - ] - ], [ [ { - "data": 9.727837981879871e+26, - "data_pointer": "", - "schema": { - "exclusiveMaximum": 9.727837981879871e+26 - }, - "schema_pointer": "", - "root_schema": { - "exclusiveMaximum": 9.727837981879871e+26 + "data": { + "bar": 2 }, - "type": "exclusiveMaximum" - } - ] - ], - [ - [ - - ] - ], - [ - [ - { - "data": -9.727837981879871e+26, "data_pointer": "", "schema": { - "exclusiveMinimum": -9.727837981879871e+26 + "required": [ + "foo", + "bar" + ] }, - "schema_pointer": "", + "schema_pointer": "/oneOf/0", "root_schema": { - "exclusiveMinimum": -9.727837981879871e+26 + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } + ] }, - "type": "exclusiveMinimum" - } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft6/optional/ecmascript-regex.json": [ - [ - [ + "type": "required", + "details": { + "missing_keys": [ + "foo" + ] + } + }, { - "data": "abc\\n", + "data": { + "bar": 2 + }, "data_pointer": "", "schema": { - "type": "string", - "pattern": "^abc$" + "required": [ + "foo", + "baz" + ] }, - "schema_pointer": "", + "schema_pointer": "/oneOf/1", "root_schema": { - "type": "string", - "pattern": "^abc$" + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } + ] }, - "type": "pattern" + "type": "required", + "details": { + "missing_keys": [ + "foo", + "baz" + ] + } } ], [ - ] - ], - [ + ], + [ + + ], [ { - "data": "\\t", + "data": { + "foo": 1, + "bar": 2, + "baz": 3 + }, "data_pointer": "", "schema": { - "type": "string", - "pattern": "^\\t$" + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } + ] }, "schema_pointer": "", "root_schema": { - "type": "string", - "pattern": "^\\t$" + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } + ] }, - "type": "pattern" + "type": "oneOf" } - ], - [ - ] ], [ [ - { - "data": "\\cC", - "data_pointer": "", - "schema": { - "type": "string", - "pattern": "^\\cC$" - }, - "schema_pointer": "", - "root_schema": { - "type": "string", - "pattern": "^\\cC$" - }, - "type": "pattern" - } + ], [ - ] - ], - [ + ], [ { - "data": "\\cc", + "data": { + "foo": "foo", + "bar": 8 + }, "data_pointer": "", "schema": { - "type": "string", - "pattern": "^\\cc$" + "oneOf": [ + { + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": true + }, + "required": [ + "foo" + ] + } + ] }, "schema_pointer": "", "root_schema": { - "type": "string", - "pattern": "^\\cc$" + "oneOf": [ + { + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": true + }, + "required": [ + "foo" + ] + } + ] }, - "type": "pattern" + "type": "oneOf" } - ], - [ - - ] - ], - [ - [ - ], [ { - "data": "߀", + "data": { + "baz": "quux" + }, "data_pointer": "", "schema": { - "type": "string", - "pattern": "^\\d$" + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] }, - "schema_pointer": "", + "schema_pointer": "/oneOf/0", "root_schema": { - "type": "string", - "pattern": "^\\d$" + "oneOf": [ + { + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": true + }, + "required": [ + "foo" + ] + } + ] }, - "type": "pattern" - } - ], - [ + "type": "required", + "details": { + "missing_keys": [ + "bar" + ] + } + }, { - "data": "߀", + "data": { + "baz": "quux" + }, "data_pointer": "", "schema": { - "type": "string", - "pattern": "^\\d$" + "properties": { + "foo": true + }, + "required": [ + "foo" + ] }, - "schema_pointer": "", + "schema_pointer": "/oneOf/1", "root_schema": { - "type": "string", - "pattern": "^\\d$" + "oneOf": [ + { + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": true + }, + "required": [ + "foo" + ] + } + ] }, - "type": "pattern" + "type": "required", + "details": { + "missing_keys": [ + "foo" + ] + } } ] ], [ + [ + + ], [ { - "data": "0", + "data": 123, "data_pointer": "", "schema": { - "type": "string", - "pattern": "^\\D$" + "type": "null" }, - "schema_pointer": "", + "schema_pointer": "/oneOf/0/oneOf/0", "root_schema": { - "type": "string", - "pattern": "^\\D$" + "oneOf": [ + { + "oneOf": [ + { + "type": "null" + } + ] + } + ] }, - "type": "pattern" + "type": "null" } - ], + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft6/optional/bignum.json": [ + [ [ ], @@ -7097,109 +7101,322 @@ [ ], + [ + + ] + ], + [ [ { - "data": "é", + "data": 98249283749234923498293171823948729348710298301928331, "data_pointer": "", "schema": { - "type": "string", - "pattern": "^\\w$" + "type": "string" }, "schema_pointer": "", "root_schema": { - "type": "string", - "pattern": "^\\w$" + "type": "string" }, - "type": "pattern" + "type": "string" } ] ], + [ + [ + + ] + ], [ [ { - "data": "a", + "data": 9.727837981879871e+26, "data_pointer": "", "schema": { - "type": "string", - "pattern": "^\\W$" + "exclusiveMaximum": 9.727837981879871e+26 }, "schema_pointer": "", "root_schema": { - "type": "string", - "pattern": "^\\W$" + "exclusiveMaximum": 9.727837981879871e+26 }, - "type": "pattern" + "type": "exclusiveMaximum" } - ], - [ - ] ], [ [ - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], + ] + ], + [ [ { - "data": "\u0001", + "data": -9.727837981879871e+26, "data_pointer": "", "schema": { - "type": "string", - "pattern": "^\\s$" + "exclusiveMinimum": -9.727837981879871e+26 }, "schema_pointer": "", "root_schema": { - "type": "string", - "pattern": "^\\s$" + "exclusiveMinimum": -9.727837981879871e+26 }, - "type": "pattern" + "type": "exclusiveMinimum" } - ], + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft6/optional/ecmascript-regex.json": [ + [ [ { - "data": "–", + "data": "abc\\n", "data_pointer": "", "schema": { "type": "string", - "pattern": "^\\s$" + "pattern": "^abc$" }, "schema_pointer": "", "root_schema": { "type": "string", - "pattern": "^\\s$" + "pattern": "^abc$" }, "type": "pattern" } + ], + [ + ] ], [ [ { - "data": " ", + "data": "\\t", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\t$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\t$" + }, + "type": "pattern" + } + ], + [ + + ] + ], + [ + [ + { + "data": "\\cC", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\cC$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\cC$" + }, + "type": "pattern" + } + ], + [ + + ] + ], + [ + [ + { + "data": "\\cc", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\cc$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\cc$" + }, + "type": "pattern" + } + ], + [ + + ] + ], + [ + [ + + ], + [ + { + "data": "߀", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\d$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\d$" + }, + "type": "pattern" + } + ], + [ + { + "data": "߀", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\d$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\d$" + }, + "type": "pattern" + } + ] + ], + [ + [ + { + "data": "0", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\D$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\D$" + }, + "type": "pattern" + } + ], + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + { + "data": "é", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\w$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\w$" + }, + "type": "pattern" + } + ] + ], + [ + [ + { + "data": "a", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\W$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\W$" + }, + "type": "pattern" + } + ], + [ + + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + { + "data": "\u0001", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\s$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\s$" + }, + "type": "pattern" + } + ], + [ + { + "data": "–", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\s$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\s$" + }, + "type": "pattern" + } + ] + ], + [ + [ + { + "data": " ", "data_pointer": "", "schema": { "type": "string", @@ -9228,234 +9445,326 @@ ] ] ], - "JSON-Schema-Test-Suite/tests/draft6/optional/non-bmp-regex.json": [ + "JSON-Schema-Test-Suite/tests/draft6/optional/id.json": [ [ [ ], [ - ], - [ - ], [ { - "data": "🐉", + "data": 1, "data_pointer": "", "schema": { - "pattern": "^🐲*$" + "enum": [ + { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "null" + } + ] }, - "schema_pointer": "", + "schema_pointer": "/definitions/id_in_enum", "root_schema": { - "pattern": "^🐲*$" - }, - "type": "pattern" - } - ], - [ - { - "data": "🐉🐉", - "data_pointer": "", - "schema": { - "pattern": "^🐲*$" - }, - "schema_pointer": "", + "definitions": { + "id_in_enum": { + "enum": [ + { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "null" + } + ] + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "string" + }, + "zzz_id_in_const": { + "const": { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "null" + } + } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_enum" + }, + { + "$ref": "https://localhost:1234/id/my_identifier.json" + } + ] + }, + "type": "enum" + }, + { + "data": 1, + "data_pointer": "", + "schema": { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "string" + }, + "schema_pointer": "/definitions/real_id_in_schema", "root_schema": { - "pattern": "^🐲*$" + "definitions": { + "id_in_enum": { + "enum": [ + { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "null" + } + ] + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "string" + }, + "zzz_id_in_const": { + "const": { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "null" + } + } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_enum" + }, + { + "$ref": "https://localhost:1234/id/my_identifier.json" + } + ] }, - "type": "pattern" + "type": "string" } + ] + ], + [ + [ + ], [ { - "data": "D", + "data": 1, "data_pointer": "", "schema": { - "pattern": "^🐲*$" + "const": "skip not_a_real_anchor" }, - "schema_pointer": "", + "schema_pointer": "/oneOf/0", "root_schema": { - "pattern": "^🐲*$" + "definitions": { + "const_not_anchor": { + "const": { + "$id": "#not_a_real_anchor" + } + } + }, + "oneOf": [ + { + "const": "skip not_a_real_anchor" + }, + { + "allOf": [ + { + "not": { + "const": "skip not_a_real_anchor" + } + }, + { + "$ref": "#/definitions/const_not_anchor" + } + ] + } + ] }, - "type": "pattern" - } - ], - [ + "type": "const" + }, { - "data": "DD", + "data": 1, "data_pointer": "", "schema": { - "pattern": "^🐲*$" + "const": { + "$id": "#not_a_real_anchor" + } }, - "schema_pointer": "", + "schema_pointer": "/definitions/const_not_anchor", "root_schema": { - "pattern": "^🐲*$" + "definitions": { + "const_not_anchor": { + "const": { + "$id": "#not_a_real_anchor" + } + } + }, + "oneOf": [ + { + "const": "skip not_a_real_anchor" + }, + { + "allOf": [ + { + "not": { + "const": "skip not_a_real_anchor" + } + }, + { + "$ref": "#/definitions/const_not_anchor" + } + ] + } + ] }, - "type": "pattern" + "type": "const" } ] ], [ [ - ], - [ - - ], - [ - ], [ { - "data": "hello", - "data_pointer": "/🐲", + "data": 1, + "data_pointer": "", "schema": { - "type": "integer" + "const": "skip not_a_real_id" }, - "schema_pointer": "/patternProperties/^🐲*$", + "schema_pointer": "/oneOf/0", "root_schema": { - "patternProperties": { - "^🐲*$": { - "type": "integer" + "definitions": { + "const_not_id": { + "const": { + "$id": "not_a_real_id" + } } - } + }, + "oneOf": [ + { + "const": "skip not_a_real_id" + }, + { + "allOf": [ + { + "not": { + "const": "skip not_a_real_id" + } + }, + { + "$ref": "#/definitions/const_not_id" + } + ] + } + ] }, - "type": "integer" - } - ], - [ + "type": "const" + }, { - "data": "hello", - "data_pointer": "/🐲🐲", + "data": 1, + "data_pointer": "", "schema": { - "type": "integer" + "const": { + "$id": "not_a_real_id" + } }, - "schema_pointer": "/patternProperties/^🐲*$", + "schema_pointer": "/definitions/const_not_id", "root_schema": { - "patternProperties": { - "^🐲*$": { - "type": "integer" + "definitions": { + "const_not_id": { + "const": { + "$id": "not_a_real_id" + } } - } + }, + "oneOf": [ + { + "const": "skip not_a_real_id" + }, + { + "allOf": [ + { + "not": { + "const": "skip not_a_real_id" + } + }, + { + "$ref": "#/definitions/const_not_id" + } + ] + } + ] }, - "type": "integer" + "type": "const" } ] ] ], - "JSON-Schema-Test-Suite/tests/draft6/pattern.json": [ + "JSON-Schema-Test-Suite/tests/draft6/optional/non-bmp-regex.json": [ [ [ + ], + [ + + ], + [ + ], [ { - "data": "abc", + "data": "🐉", "data_pointer": "", "schema": { - "pattern": "^a*$" + "pattern": "^🐲*$" }, "schema_pointer": "", "root_schema": { - "pattern": "^a*$" + "pattern": "^🐲*$" }, "type": "pattern" } - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ] - ], - [ - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft6/patternProperties.json": [ - [ - [ - - ], - [ - ], [ { - "data": "bar", - "data_pointer": "/foo", + "data": "🐉🐉", + "data_pointer": "", "schema": { - "type": "integer" + "pattern": "^🐲*$" }, - "schema_pointer": "/patternProperties/f.*o", + "schema_pointer": "", "root_schema": { - "patternProperties": { - "f.*o": { - "type": "integer" - } - } + "pattern": "^🐲*$" }, - "type": "integer" + "type": "pattern" } ], [ { - "data": "bar", - "data_pointer": "/foo", + "data": "D", + "data_pointer": "", "schema": { - "type": "integer" + "pattern": "^🐲*$" }, - "schema_pointer": "/patternProperties/f.*o", + "schema_pointer": "", "root_schema": { - "patternProperties": { - "f.*o": { - "type": "integer" - } - } + "pattern": "^🐲*$" }, - "type": "integer" - }, + "type": "pattern" + } + ], + [ { - "data": "baz", - "data_pointer": "/foooooo", + "data": "DD", + "data_pointer": "", "schema": { - "type": "integer" + "pattern": "^🐲*$" }, - "schema_pointer": "/patternProperties/f.*o", + "schema_pointer": "", "root_schema": { - "patternProperties": { - "f.*o": { - "type": "integer" - } - } + "pattern": "^🐲*$" }, - "type": "integer" + "type": "pattern" } - ], - [ - - ], - [ - - ], - [ - ] ], [ @@ -9470,19 +9779,16 @@ ], [ { - "data": "bar", - "data_pointer": "/a", + "data": "hello", + "data_pointer": "/🐲", "schema": { "type": "integer" }, - "schema_pointer": "/patternProperties/a*", + "schema_pointer": "/patternProperties/^🐲*$", "root_schema": { "patternProperties": { - "a*": { + "^🐲*$": { "type": "integer" - }, - "aaa*": { - "maximum": 20 } } }, @@ -9491,66 +9797,25 @@ ], [ { - "data": 31, - "data_pointer": "/aaaa", - "schema": { - "maximum": 20 - }, - "schema_pointer": "/patternProperties/aaa*", - "root_schema": { - "patternProperties": { - "a*": { - "type": "integer" - }, - "aaa*": { - "maximum": 20 - } - } - }, - "type": "maximum" - } - ], - [ - { - "data": "foo", - "data_pointer": "/aaa", + "data": "hello", + "data_pointer": "/🐲🐲", "schema": { "type": "integer" }, - "schema_pointer": "/patternProperties/a*", + "schema_pointer": "/patternProperties/^🐲*$", "root_schema": { "patternProperties": { - "a*": { + "^🐲*$": { "type": "integer" - }, - "aaa*": { - "maximum": 20 } } }, "type": "integer" - }, - { - "data": 31, - "data_pointer": "/aaaa", - "schema": { - "maximum": 20 - }, - "schema_pointer": "/patternProperties/aaa*", - "root_schema": { - "patternProperties": { - "a*": { - "type": "integer" - }, - "aaa*": { - "maximum": 20 - } - } - }, - "type": "maximum" } ] - ], + ] + ], + "JSON-Schema-Test-Suite/tests/draft6/optional/unknownKeyword.json": [ [ [ @@ -9558,294 +9823,351 @@ [ { "data": null, - "data_pointer": "/a31b", + "data_pointer": "", "schema": { - "type": "boolean" + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "schema_pointer": "/patternProperties/[0-9]{2,}", + "schema_pointer": "/definitions/id_in_unknown0", "root_schema": { - "patternProperties": { - "[0-9]{2,}": { - "type": "boolean" + "definitions": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "X_": { + "real_id_in_schema": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } } - } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_unknown0" + }, + { + "$ref": "#/definitions/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" + } + ] }, - "type": "boolean" - } - ], - [ - - ], - [ + "type": "not" + }, { - "data": 3, - "data_pointer": "/a_X_3", + "data": null, + "data_pointer": "", "schema": { - "type": "string" + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } }, - "schema_pointer": "/patternProperties/X_", + "schema_pointer": "/definitions/id_in_unknown1", "root_schema": { - "patternProperties": { - "[0-9]{2,}": { - "type": "boolean" + "definitions": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "X_": { + "real_id_in_schema": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } } - } - }, - "type": "string" - } - ] - ], - [ - [ - - ], - [ - { - "data": 2, - "data_pointer": "/bar", - "schema": false, - "schema_pointer": "/patternProperties/b.*", - "root_schema": { - "patternProperties": { - "f.*": true, - "b.*": false - } - }, - "type": "schema" - } - ], - [ - { - "data": 2, - "data_pointer": "/bar", - "schema": false, - "schema_pointer": "/patternProperties/b.*", - "root_schema": { - "patternProperties": { - "f.*": true, - "b.*": false - } - }, - "type": "schema" - } - ], - [ - { - "data": 1, - "data_pointer": "/foobar", - "schema": false, - "schema_pointer": "/patternProperties/b.*", - "root_schema": { - "patternProperties": { - "f.*": true, - "b.*": false - } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_unknown0" + }, + { + "$ref": "#/definitions/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" + } + ] }, - "type": "schema" - } - ], - [ - - ] - ], - [ - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft6/properties.json": [ - [ - [ - - ], - [ + "type": "not" + }, { - "data": { - }, - "data_pointer": "/bar", + "data": null, + "data_pointer": "", "schema": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", "type": "string" }, - "schema_pointer": "/properties/bar", + "schema_pointer": "/definitions/real_id_in_schema", "root_schema": { - "properties": { - "foo": { - "type": "integer" + "definitions": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "bar": { + "real_id_in_schema": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } } - } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_unknown0" + }, + { + "$ref": "#/definitions/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" + } + ] }, "type": "string" } ], [ { - "data": [ - - ], - "data_pointer": "/foo", + "data": 1, + "data_pointer": "", "schema": { - "type": "integer" + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "schema_pointer": "/properties/foo", + "schema_pointer": "/definitions/id_in_unknown0", "root_schema": { - "properties": { - "foo": { - "type": "integer" + "definitions": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "bar": { + "real_id_in_schema": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } } - } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_unknown0" + }, + { + "$ref": "#/definitions/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" + } + ] }, - "type": "integer" + "type": "not" }, { - "data": { - }, - "data_pointer": "/bar", + "data": 1, + "data_pointer": "", "schema": { - "type": "string" + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } }, - "schema_pointer": "/properties/bar", + "schema_pointer": "/definitions/id_in_unknown1", "root_schema": { - "properties": { - "foo": { - "type": "integer" + "definitions": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "bar": { + "real_id_in_schema": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } } - } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_unknown0" + }, + { + "$ref": "#/definitions/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" + } + ] }, - "type": "string" - } - ], - [ - - ], - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ + "type": "not" + }, { - "data": [ - 1, - 2, - 3, - 4 - ], - "data_pointer": "/foo", + "data": 1, + "data_pointer": "", "schema": { - "type": "array", - "maxItems": 3 + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "string" }, - "schema_pointer": "/properties/foo", + "schema_pointer": "/definitions/real_id_in_schema", "root_schema": { - "properties": { - "foo": { - "type": "array", - "maxItems": 3 + "definitions": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "bar": { - "type": "array" + "real_id_in_schema": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } } }, - "patternProperties": { - "f.o": { - "minItems": 2 + "anyOf": [ + { + "$ref": "#/definitions/id_in_unknown0" + }, + { + "$ref": "#/definitions/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" } - }, - "additionalProperties": { - "type": "integer" - } + ] }, - "type": "maxItems" + "type": "string" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft6/pattern.json": [ + [ + [ + ], [ { - "data": [ - - ], - "data_pointer": "/foo", + "data": "abc", + "data_pointer": "", "schema": { - "minItems": 2 + "pattern": "^a*$" }, - "schema_pointer": "/patternProperties/f.o", + "schema_pointer": "", "root_schema": { - "properties": { - "foo": { - "type": "array", - "maxItems": 3 - }, - "bar": { - "type": "array" - } - }, - "patternProperties": { - "f.o": { - "minItems": 2 - } - }, - "additionalProperties": { - "type": "integer" - } + "pattern": "^a*$" }, - "type": "minItems" + "type": "pattern" } ], [ ], [ - { - "data": [ - ], - "data_pointer": "/fxo", - "schema": { - "minItems": 2 - }, - "schema_pointer": "/patternProperties/f.o", - "root_schema": { - "properties": { - "foo": { - "type": "array", - "maxItems": 3 - }, - "bar": { - "type": "array" - } - }, - "patternProperties": { - "f.o": { - "minItems": 2 - } - }, - "additionalProperties": { - "type": "integer" - } - }, - "type": "minItems" - } ], [ @@ -9854,36 +10176,19 @@ ], [ - { - "data": "foo", - "data_pointer": "/quux", - "schema": { - "type": "integer" - }, - "schema_pointer": "/additionalProperties", - "root_schema": { - "properties": { - "foo": { - "type": "array", - "maxItems": 3 - }, - "bar": { - "type": "array" - } - }, - "patternProperties": { - "f.o": { - "minItems": 2 - } - }, - "additionalProperties": { - "type": "integer" - } - }, - "type": "integer" - } + + ], + [ + ] ], + [ + [ + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft6/patternProperties.json": [ [ [ @@ -9893,508 +10198,487 @@ ], [ { - "data": 2, - "data_pointer": "/bar", - "schema": false, - "schema_pointer": "/properties/bar", + "data": "bar", + "data_pointer": "/foo", + "schema": { + "type": "integer" + }, + "schema_pointer": "/patternProperties/f.*o", "root_schema": { - "properties": { - "foo": true, - "bar": false + "patternProperties": { + "f.*o": { + "type": "integer" + } } }, - "type": "schema" + "type": "integer" } ], [ { - "data": 2, - "data_pointer": "/bar", - "schema": false, - "schema_pointer": "/properties/bar", + "data": "bar", + "data_pointer": "/foo", + "schema": { + "type": "integer" + }, + "schema_pointer": "/patternProperties/f.*o", "root_schema": { - "properties": { - "foo": true, - "bar": false + "patternProperties": { + "f.*o": { + "type": "integer" + } } }, - "type": "schema" + "type": "integer" + }, + { + "data": "baz", + "data_pointer": "/foooooo", + "schema": { + "type": "integer" + }, + "schema_pointer": "/patternProperties/f.*o", + "root_schema": { + "patternProperties": { + "f.*o": { + "type": "integer" + } + } + }, + "type": "integer" } + ], + [ + + ], + [ + + ], + [ + ] ], [ [ + ], + [ + + ], + [ + ], [ { - "data": "1", - "data_pointer": "/foo\nbar", + "data": "bar", + "data_pointer": "/a", "schema": { - "type": "number" + "type": "integer" }, - "schema_pointer": "/properties/foo\nbar", + "schema_pointer": "/patternProperties/a*", "root_schema": { - "properties": { - "foo\nbar": { - "type": "number" + "patternProperties": { + "a*": { + "type": "integer" }, - "foo\"bar": { - "type": "number" - }, - "foo\\bar": { - "type": "number" - }, - "foo\rbar": { - "type": "number" - }, - "foo\tbar": { - "type": "number" - }, - "foo\fbar": { - "type": "number" + "aaa*": { + "maximum": 20 } } }, - "type": "number" - }, + "type": "integer" + } + ], + [ { - "data": "1", - "data_pointer": "/foo\"bar", + "data": 31, + "data_pointer": "/aaaa", "schema": { - "type": "number" + "maximum": 20 }, - "schema_pointer": "/properties/foo\"bar", + "schema_pointer": "/patternProperties/aaa*", "root_schema": { - "properties": { - "foo\nbar": { - "type": "number" - }, - "foo\"bar": { - "type": "number" - }, - "foo\\bar": { - "type": "number" - }, - "foo\rbar": { - "type": "number" - }, - "foo\tbar": { - "type": "number" + "patternProperties": { + "a*": { + "type": "integer" }, - "foo\fbar": { - "type": "number" + "aaa*": { + "maximum": 20 } } }, - "type": "number" - }, + "type": "maximum" + } + ], + [ { - "data": "1", - "data_pointer": "/foo\\bar", + "data": "foo", + "data_pointer": "/aaa", "schema": { - "type": "number" + "type": "integer" }, - "schema_pointer": "/properties/foo\\bar", + "schema_pointer": "/patternProperties/a*", "root_schema": { - "properties": { - "foo\nbar": { - "type": "number" - }, - "foo\"bar": { - "type": "number" - }, - "foo\\bar": { - "type": "number" - }, - "foo\rbar": { - "type": "number" - }, - "foo\tbar": { - "type": "number" + "patternProperties": { + "a*": { + "type": "integer" }, - "foo\fbar": { - "type": "number" + "aaa*": { + "maximum": 20 } } }, - "type": "number" + "type": "integer" }, { - "data": "1", - "data_pointer": "/foo\rbar", + "data": 31, + "data_pointer": "/aaaa", "schema": { - "type": "number" + "maximum": 20 }, - "schema_pointer": "/properties/foo\rbar", + "schema_pointer": "/patternProperties/aaa*", "root_schema": { - "properties": { - "foo\nbar": { - "type": "number" - }, - "foo\"bar": { - "type": "number" - }, - "foo\\bar": { - "type": "number" - }, - "foo\rbar": { - "type": "number" - }, - "foo\tbar": { - "type": "number" + "patternProperties": { + "a*": { + "type": "integer" }, - "foo\fbar": { - "type": "number" + "aaa*": { + "maximum": 20 } } }, - "type": "number" - }, + "type": "maximum" + } + ] + ], + [ + [ + + ], + [ { - "data": "1", - "data_pointer": "/foo\tbar", + "data": null, + "data_pointer": "/a31b", "schema": { - "type": "number" + "type": "boolean" }, - "schema_pointer": "/properties/foo\tbar", + "schema_pointer": "/patternProperties/[0-9]{2,}", "root_schema": { - "properties": { - "foo\nbar": { - "type": "number" - }, - "foo\"bar": { - "type": "number" - }, - "foo\\bar": { - "type": "number" - }, - "foo\rbar": { - "type": "number" - }, - "foo\tbar": { - "type": "number" + "patternProperties": { + "[0-9]{2,}": { + "type": "boolean" }, - "foo\fbar": { - "type": "number" + "X_": { + "type": "string" } } }, - "type": "number" - }, + "type": "boolean" + } + ], + [ + + ], + [ { - "data": "1", - "data_pointer": "/foo\fbar", + "data": 3, + "data_pointer": "/a_X_3", "schema": { - "type": "number" + "type": "string" }, - "schema_pointer": "/properties/foo\fbar", + "schema_pointer": "/patternProperties/X_", "root_schema": { - "properties": { - "foo\nbar": { - "type": "number" - }, - "foo\"bar": { - "type": "number" - }, - "foo\\bar": { - "type": "number" - }, - "foo\rbar": { - "type": "number" - }, - "foo\tbar": { - "type": "number" + "patternProperties": { + "[0-9]{2,}": { + "type": "boolean" }, - "foo\fbar": { - "type": "number" + "X_": { + "type": "string" } } }, - "type": "number" + "type": "string" } ] ], [ [ - ] - ], - [ - [ - - ], - [ - ], [ - + { + "data": 2, + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/patternProperties/b.*", + "root_schema": { + "patternProperties": { + "f.*": true, + "b.*": false + } + }, + "type": "schema" + } ], [ { - "data": "foo", - "data_pointer": "/__proto__", - "schema": { - "type": "number" - }, - "schema_pointer": "/properties/__proto__", + "data": 2, + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/patternProperties/b.*", "root_schema": { - "properties": { - "__proto__": { - "type": "number" - }, - "toString": { - "properties": { - "length": { - "type": "string" - } - } - }, - "constructor": { - "type": "number" - } + "patternProperties": { + "f.*": true, + "b.*": false } }, - "type": "number" + "type": "schema" } ], [ { - "data": 37, - "data_pointer": "/toString/length", - "schema": { - "type": "string" - }, - "schema_pointer": "/properties/toString/properties/length", + "data": 1, + "data_pointer": "/foobar", + "schema": false, + "schema_pointer": "/patternProperties/b.*", "root_schema": { - "properties": { - "__proto__": { - "type": "number" - }, - "toString": { - "properties": { - "length": { - "type": "string" - } - } - }, - "constructor": { - "type": "number" - } + "patternProperties": { + "f.*": true, + "b.*": false } }, - "type": "string" + "type": "schema" } ], [ - { - "data": { - "length": 37 - }, - "data_pointer": "/constructor", - "schema": { - "type": "number" - }, - "schema_pointer": "/properties/constructor", - "root_schema": { - "properties": { - "__proto__": { - "type": "number" - }, - "toString": { - "properties": { - "length": { - "type": "string" - } - } - }, - "constructor": { - "type": "number" - } - } - }, - "type": "number" - } - ], + + ] + ], + [ [ ] ] ], - "JSON-Schema-Test-Suite/tests/draft6/propertyNames.json": [ + "JSON-Schema-Test-Suite/tests/draft6/properties.json": [ [ [ ], [ { - "data": "foobar", - "data_pointer": "", + "data": { + }, + "data_pointer": "/bar", "schema": { - "maxLength": 3 + "type": "string" }, - "schema_pointer": "/propertyNames", + "schema_pointer": "/properties/bar", "root_schema": { - "propertyNames": { - "maxLength": 3 + "properties": { + "foo": { + "type": "integer" + }, + "bar": { + "type": "string" + } } }, - "type": "maxLength" + "type": "string" } ], [ + { + "data": [ - ], - [ - - ], - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ + ], + "data_pointer": "/foo", + "schema": { + "type": "integer" + }, + "schema_pointer": "/properties/foo", + "root_schema": { + "properties": { + "foo": { + "type": "integer" + }, + "bar": { + "type": "string" + } + } + }, + "type": "integer" + }, { - "data": "aaA", - "data_pointer": "", + "data": { + }, + "data_pointer": "/bar", "schema": { - "pattern": "^a+$" + "type": "string" }, - "schema_pointer": "/propertyNames", + "schema_pointer": "/properties/bar", "root_schema": { - "propertyNames": { - "pattern": "^a+$" + "properties": { + "foo": { + "type": "integer" + }, + "bar": { + "type": "string" + } } }, - "type": "pattern" + "type": "string" } ], [ - ] - ], - [ - [ - ], [ - ] - ], - [ - [ - { - "data": "foo", - "data_pointer": "", - "schema": false, - "schema_pointer": "/propertyNames", - "root_schema": { - "propertyNames": false - }, - "type": "schema" - } ], [ ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft6/ref.json": [ + ], [ [ - ], - [ - ], [ { - "data": false, - "data_pointer": "/bar", - "schema": false, - "schema_pointer": "/additionalProperties", + "data": [ + 1, + 2, + 3, + 4 + ], + "data_pointer": "/foo", + "schema": { + "type": "array", + "maxItems": 3 + }, + "schema_pointer": "/properties/foo", "root_schema": { "properties": { "foo": { - "$ref": "#" + "type": "array", + "maxItems": 3 + }, + "bar": { + "type": "array" } }, - "additionalProperties": false + "patternProperties": { + "f.o": { + "minItems": 2 + } + }, + "additionalProperties": { + "type": "integer" + } }, - "type": "schema" + "type": "maxItems" } ], [ { - "data": false, - "data_pointer": "/foo/bar", - "schema": false, - "schema_pointer": "/additionalProperties", + "data": [ + + ], + "data_pointer": "/foo", + "schema": { + "minItems": 2 + }, + "schema_pointer": "/patternProperties/f.o", "root_schema": { "properties": { "foo": { - "$ref": "#" + "type": "array", + "maxItems": 3 + }, + "bar": { + "type": "array" } }, - "additionalProperties": false + "patternProperties": { + "f.o": { + "minItems": 2 + } + }, + "additionalProperties": { + "type": "integer" + } }, - "type": "schema" + "type": "minItems" } - ] - ], - [ + ], [ ], [ { - "data": true, - "data_pointer": "/bar", + "data": [ + + ], + "data_pointer": "/fxo", "schema": { - "type": "integer" + "minItems": 2 }, - "schema_pointer": "/properties/foo", + "schema_pointer": "/patternProperties/f.o", "root_schema": { "properties": { "foo": { - "type": "integer" + "type": "array", + "maxItems": 3 }, "bar": { - "$ref": "#/properties/foo" + "type": "array" + } + }, + "patternProperties": { + "f.o": { + "minItems": 2 } + }, + "additionalProperties": { + "type": "integer" } }, - "type": "integer" + "type": "minItems" } - ] - ], - [ + ], + [ + + ], [ ], [ { "data": "foo", - "data_pointer": "/1", + "data_pointer": "/quux", "schema": { "type": "integer" }, - "schema_pointer": "/items/0", + "schema_pointer": "/additionalProperties", "root_schema": { - "items": [ - { - "type": "integer" + "properties": { + "foo": { + "type": "array", + "maxItems": 3 }, - { - "$ref": "#/items/0" + "bar": { + "type": "array" } - ] + }, + "patternProperties": { + "f.o": { + "minItems": 2 + } + }, + "additionalProperties": { + "type": "integer" + } }, "type": "integer" } @@ -10402,118 +10686,40 @@ ], [ [ - { - "data": "aoeu", - "data_pointer": "/slash", - "schema": { - "type": "integer" - }, - "schema_pointer": "/definitions/slash~1field", - "root_schema": { - "definitions": { - "tilde~field": { - "type": "integer" - }, - "slash/field": { - "type": "integer" - }, - "percent%field": { - "type": "integer" - } - }, - "properties": { - "tilde": { - "$ref": "#/definitions/tilde~0field" - }, - "slash": { - "$ref": "#/definitions/slash~1field" - }, - "percent": { - "$ref": "#/definitions/percent%25field" - } - } - }, - "type": "integer" - } + + ], + [ + ], [ { - "data": "aoeu", - "data_pointer": "/tilde", - "schema": { - "type": "integer" - }, - "schema_pointer": "/definitions/tilde~0field", + "data": 2, + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/properties/bar", "root_schema": { - "definitions": { - "tilde~field": { - "type": "integer" - }, - "slash/field": { - "type": "integer" - }, - "percent%field": { - "type": "integer" - } - }, "properties": { - "tilde": { - "$ref": "#/definitions/tilde~0field" - }, - "slash": { - "$ref": "#/definitions/slash~1field" - }, - "percent": { - "$ref": "#/definitions/percent%25field" - } + "foo": true, + "bar": false } }, - "type": "integer" + "type": "schema" } ], [ { - "data": "aoeu", - "data_pointer": "/percent", - "schema": { - "type": "integer" - }, - "schema_pointer": "/definitions/percent%field", + "data": 2, + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/properties/bar", "root_schema": { - "definitions": { - "tilde~field": { - "type": "integer" - }, - "slash/field": { - "type": "integer" - }, - "percent%field": { - "type": "integer" - } - }, "properties": { - "tilde": { - "$ref": "#/definitions/tilde~0field" - }, - "slash": { - "$ref": "#/definitions/slash~1field" - }, - "percent": { - "$ref": "#/definitions/percent%25field" - } + "foo": true, + "bar": false } }, - "type": "integer" + "type": "schema" } - ], - [ - - ], - [ - - ], - [ - ] ], [ @@ -10522,371 +10728,331 @@ ], [ { - "data": "a", - "data_pointer": "", + "data": "1", + "data_pointer": "/foo\nbar", "schema": { - "type": "integer" + "type": "number" }, - "schema_pointer": "/definitions/a", + "schema_pointer": "/properties/foo\nbar", "root_schema": { - "definitions": { - "a": { - "type": "integer" + "properties": { + "foo\nbar": { + "type": "number" }, - "b": { - "$ref": "#/definitions/a" + "foo\"bar": { + "type": "number" }, - "c": { - "$ref": "#/definitions/b" - } - }, - "allOf": [ - { - "$ref": "#/definitions/c" + "foo\\bar": { + "type": "number" + }, + "foo\rbar": { + "type": "number" + }, + "foo\tbar": { + "type": "number" + }, + "foo\fbar": { + "type": "number" } - ] + } }, - "type": "integer" - } - ] - ], - [ - [ - - ], - [ - - ], - [ + "type": "number" + }, { - "data": "string", - "data_pointer": "/foo", + "data": "1", + "data_pointer": "/foo\"bar", "schema": { - "type": "array" + "type": "number" }, - "schema_pointer": "/definitions/reffed", + "schema_pointer": "/properties/foo\"bar", "root_schema": { - "definitions": { - "reffed": { - "type": "array" - } - }, "properties": { - "foo": { - "$ref": "#/definitions/reffed", - "maxItems": 2 + "foo\nbar": { + "type": "number" + }, + "foo\"bar": { + "type": "number" + }, + "foo\\bar": { + "type": "number" + }, + "foo\rbar": { + "type": "number" + }, + "foo\tbar": { + "type": "number" + }, + "foo\fbar": { + "type": "number" } } }, - "type": "array" - } - ] - ], - [ - [ + "type": "number" + }, { - "data": "a", - "data_pointer": "", + "data": "1", + "data_pointer": "/foo\\bar", "schema": { - "$comment": "this canonical uri is http://localhost:1234/sibling_id/base/foo.json", - "$id": "foo.json", "type": "number" }, - "schema_pointer": "/definitions/base_foo", + "schema_pointer": "/properties/foo\\bar", "root_schema": { - "$id": "http://localhost:1234/sibling_id/base/", - "definitions": { - "foo": { - "$id": "http://localhost:1234/sibling_id/foo.json", - "type": "string" + "properties": { + "foo\nbar": { + "type": "number" }, - "base_foo": { - "$comment": "this canonical uri is http://localhost:1234/sibling_id/base/foo.json", - "$id": "foo.json", + "foo\"bar": { + "type": "number" + }, + "foo\\bar": { + "type": "number" + }, + "foo\rbar": { + "type": "number" + }, + "foo\tbar": { + "type": "number" + }, + "foo\fbar": { "type": "number" } - }, - "allOf": [ - { - "$comment": "$ref resolves to http://localhost:1234/sibling_id/base/foo.json, not http://localhost:1234/sibling_id/foo.json", - "$id": "http://localhost:1234/sibling_id/", - "$ref": "foo.json" - } - ] + } }, "type": "number" - } - ], - [ - - ] - ], - [ - [ - - ], - [ + }, { - "data": -1, - "data_pointer": "/minLength", + "data": "1", + "data_pointer": "/foo\rbar", "schema": { - "type": "integer", - "minimum": 0 + "type": "number" }, - "schema_pointer": "/definitions/nonNegativeInteger", + "schema_pointer": "/properties/foo\rbar", "root_schema": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "http://json-schema.org/draft-06/schema#", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#" - } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/nonNegativeInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true, - "default": [ - - ] - } - }, - "type": [ - "object", - "boolean" - ], "properties": { - "$id": { - "type": "string", - "format": "uri-reference" + "foo\nbar": { + "type": "number" }, - "$schema": { - "type": "string", - "format": "uri" + "foo\"bar": { + "type": "number" }, - "$ref": { - "type": "string", - "format": "uri-reference" + "foo\\bar": { + "type": "number" }, - "title": { - "type": "string" + "foo\rbar": { + "type": "number" }, - "description": { - "type": "string" + "foo\tbar": { + "type": "number" }, - "default": { + "foo\fbar": { + "type": "number" + } + } + }, + "type": "number" + }, + { + "data": "1", + "data_pointer": "/foo\tbar", + "schema": { + "type": "number" + }, + "schema_pointer": "/properties/foo\tbar", + "root_schema": { + "properties": { + "foo\nbar": { + "type": "number" }, - "examples": { - "type": "array", - "items": { - } + "foo\"bar": { + "type": "number" }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 + "foo\\bar": { + "type": "number" }, - "maximum": { + "foo\rbar": { "type": "number" }, - "exclusiveMaximum": { + "foo\tbar": { "type": "number" }, - "minimum": { + "foo\fbar": { + "type": "number" + } + } + }, + "type": "number" + }, + { + "data": "1", + "data_pointer": "/foo\fbar", + "schema": { + "type": "number" + }, + "schema_pointer": "/properties/foo\fbar", + "root_schema": { + "properties": { + "foo\nbar": { "type": "number" }, - "exclusiveMinimum": { + "foo\"bar": { "type": "number" }, - "maxLength": { - "$ref": "#/definitions/nonNegativeInteger" + "foo\\bar": { + "type": "number" }, - "minLength": { - "$ref": "#/definitions/nonNegativeIntegerDefault0" + "foo\rbar": { + "type": "number" }, - "pattern": { - "type": "string", - "format": "regex" + "foo\tbar": { + "type": "number" }, - "additionalItems": { - "$ref": "#" + "foo\fbar": { + "type": "number" + } + } + }, + "type": "number" + } + ] + ], + [ + [ + + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ + { + "data": "foo", + "data_pointer": "/__proto__", + "schema": { + "type": "number" + }, + "schema_pointer": "/properties/__proto__", + "root_schema": { + "properties": { + "__proto__": { + "type": "number" }, - "items": { - "anyOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/schemaArray" + "toString": { + "properties": { + "length": { + "type": "string" } - ], - "default": { } }, - "maxItems": { - "$ref": "#/definitions/nonNegativeInteger" + "constructor": { + "type": "number" + } + } + }, + "type": "number" + } + ], + [ + { + "data": 37, + "data_pointer": "/toString/length", + "schema": { + "type": "string" + }, + "schema_pointer": "/properties/toString/properties/length", + "root_schema": { + "properties": { + "__proto__": { + "type": "number" }, - "minItems": { - "$ref": "#/definitions/nonNegativeIntegerDefault0" - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "contains": { - "$ref": "#" - }, - "maxProperties": { - "$ref": "#/definitions/nonNegativeInteger" - }, - "minProperties": { - "$ref": "#/definitions/nonNegativeIntegerDefault0" - }, - "required": { - "$ref": "#/definitions/stringArray" - }, - "additionalProperties": { - "$ref": "#" - }, - "definitions": { - "type": "object", - "additionalProperties": { - "$ref": "#" - }, - "default": { - } - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#" - }, - "default": { - } - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#" - }, - "propertyNames": { - "format": "regex" - }, - "default": { - } - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/stringArray" - } - ] + "toString": { + "properties": { + "length": { + "type": "string" + } } }, - "propertyNames": { - "$ref": "#" - }, - "const": { - }, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": true + "constructor": { + "type": "number" + } + } + }, + "type": "string" + } + ], + [ + { + "data": { + "length": 37 + }, + "data_pointer": "/constructor", + "schema": { + "type": "number" + }, + "schema_pointer": "/properties/constructor", + "root_schema": { + "properties": { + "__proto__": { + "type": "number" }, - "type": { - "anyOf": [ - { - "$ref": "#/definitions/simpleTypes" - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/simpleTypes" - }, - "minItems": 1, - "uniqueItems": true + "toString": { + "properties": { + "length": { + "type": "string" } - ] - }, - "format": { - "type": "string" - }, - "allOf": { - "$ref": "#/definitions/schemaArray" - }, - "anyOf": { - "$ref": "#/definitions/schemaArray" - }, - "oneOf": { - "$ref": "#/definitions/schemaArray" + } }, - "not": { - "$ref": "#" + "constructor": { + "type": "number" } - }, - "default": { } }, - "type": "minimum" + "type": "number" } + ], + [ + ] - ], + ] + ], + "JSON-Schema-Test-Suite/tests/draft6/propertyNames.json": [ [ [ ], [ { - "data": 2, - "data_pointer": "/$ref", + "data": "foobar", + "data_pointer": "", "schema": { - "type": "string" + "maxLength": 3 }, - "schema_pointer": "/properties/$ref", + "schema_pointer": "/propertyNames", "root_schema": { - "properties": { - "$ref": { - "type": "string" - } + "propertyNames": { + "maxLength": 3 } }, - "type": "string" + "type": "maxLength" } + ], + [ + + ], + [ + + ], + [ + + ], + [ + ] ], [ @@ -10895,31 +11061,30 @@ ], [ { - "data": 2, - "data_pointer": "/$ref", + "data": "aaA", + "data_pointer": "", "schema": { - "type": "string" + "pattern": "^a+$" }, - "schema_pointer": "/definitions/is-string", + "schema_pointer": "/propertyNames", "root_schema": { - "properties": { - "$ref": { - "$ref": "#/definitions/is-string" - } - }, - "definitions": { - "is-string": { - "type": "string" - } + "propertyNames": { + "pattern": "^a+$" } }, - "type": "string" + "type": "pattern" } + ], + [ + ] ], [ [ + ], + [ + ] ], [ @@ -10928,72 +11093,58 @@ "data": "foo", "data_pointer": "", "schema": false, - "schema_pointer": "/definitions/bool", + "schema_pointer": "/propertyNames", "root_schema": { - "allOf": [ - { - "$ref": "#/definitions/bool" - } - ], - "definitions": { - "bool": false - } + "propertyNames": false }, "type": "schema" } + ], + [ + ] - ], + ] + ], + "JSON-Schema-Test-Suite/tests/draft6/ref.json": [ [ [ + ], + [ + ], [ { - "data": "string is invalid", - "data_pointer": "/nodes/0/subtree/nodes/0/value", - "schema": { - "type": "number" + "data": false, + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/additionalProperties", + "root_schema": { + "properties": { + "foo": { + "$ref": "#" + } + }, + "additionalProperties": false }, - "schema_pointer": "/definitions/node/properties/value", + "type": "schema" + } + ], + [ + { + "data": false, + "data_pointer": "/foo/bar", + "schema": false, + "schema_pointer": "/additionalProperties", "root_schema": { - "$id": "http://localhost:1234/tree", - "description": "tree of nodes", - "type": "object", "properties": { - "meta": { - "type": "string" - }, - "nodes": { - "type": "array", - "items": { - "$ref": "node" - } + "foo": { + "$ref": "#" } }, - "required": [ - "meta", - "nodes" - ], - "definitions": { - "node": { - "$id": "http://localhost:1234/node", - "description": "node", - "type": "object", - "properties": { - "value": { - "type": "number" - }, - "subtree": { - "$ref": "tree" - } - }, - "required": [ - "value" - ] - } - } + "additionalProperties": false }, - "type": "number" + "type": "schema" } ] ], @@ -11003,25 +11154,23 @@ ], [ { - "data": "1", - "data_pointer": "/foo\"bar", + "data": true, + "data_pointer": "/bar", "schema": { - "type": "number" + "type": "integer" }, - "schema_pointer": "/definitions/foo\"bar", + "schema_pointer": "/properties/foo", "root_schema": { "properties": { - "foo\"bar": { - "$ref": "#/definitions/foo%22bar" - } - }, - "definitions": { - "foo\"bar": { - "type": "number" + "foo": { + "type": "integer" + }, + "bar": { + "$ref": "#/properties/foo" } } }, - "type": "number" + "type": "integer" } ] ], @@ -11031,324 +11180,241 @@ ], [ { - "data": "a", - "data_pointer": "", + "data": "foo", + "data_pointer": "/1", "schema": { - "$id": "#foo", "type": "integer" }, - "schema_pointer": "/definitions/A", + "schema_pointer": "/items/0", "root_schema": { - "allOf": [ + "items": [ { - "$ref": "#foo" - } - ], - "definitions": { - "A": { - "$id": "#foo", "type": "integer" + }, + { + "$ref": "#/items/0" } - } + ] }, "type": "integer" } ] ], [ - [ - - ], [ { - "data": "a", - "data_pointer": "", + "data": "aoeu", + "data_pointer": "/slash", "schema": { - "$id": "#foo", "type": "integer" }, - "schema_pointer": "/definitions/A", + "schema_pointer": "/definitions/slash~1field", "root_schema": { - "$id": "https://example.com/schema-with-anchor", - "allOf": [ - { - "$ref": "https://example.com/schema-with-anchor#foo" - } - ], "definitions": { - "A": { - "$id": "#foo", + "tilde~field": { + "type": "integer" + }, + "slash/field": { "type": "integer" + }, + "percent%field": { + "type": "integer" + } + }, + "properties": { + "tilde": { + "$ref": "#/definitions/tilde~0field" + }, + "slash": { + "$ref": "#/definitions/slash~1field" + }, + "percent": { + "$ref": "#/definitions/percent%25field" } } }, "type": "integer" } - ] - ], - [ - [ - ], [ { - "data": "a", - "data_pointer": "", + "data": "aoeu", + "data_pointer": "/tilde", "schema": { - "$id": "#foo", "type": "integer" }, - "schema_pointer": "/definitions/A/definitions/B", + "schema_pointer": "/definitions/tilde~0field", "root_schema": { - "$id": "http://localhost:1234/root", - "allOf": [ - { - "$ref": "http://localhost:1234/nested.json#foo" - } - ], "definitions": { - "A": { - "$id": "nested.json", - "definitions": { - "B": { - "$id": "#foo", - "type": "integer" - } - } + "tilde~field": { + "type": "integer" + }, + "slash/field": { + "type": "integer" + }, + "percent%field": { + "type": "integer" + } + }, + "properties": { + "tilde": { + "$ref": "#/definitions/tilde~0field" + }, + "slash": { + "$ref": "#/definitions/slash~1field" + }, + "percent": { + "$ref": "#/definitions/percent%25field" } } }, "type": "integer" } - ] - ], - [ + ], [ { - "data": "this is a string", - "data_pointer": "", + "data": "aoeu", + "data_pointer": "/percent", "schema": { - "definitions": { - "a_string": { - "type": "string" - } - }, - "enum": [ - { - "$ref": "#/definitions/a_string" - } - ] + "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/definitions/percent%field", "root_schema": { "definitions": { - "a_string": { - "type": "string" + "tilde~field": { + "type": "integer" + }, + "slash/field": { + "type": "integer" + }, + "percent%field": { + "type": "integer" } }, - "enum": [ - { - "$ref": "#/definitions/a_string" + "properties": { + "tilde": { + "$ref": "#/definitions/tilde~0field" + }, + "slash": { + "$ref": "#/definitions/slash~1field" + }, + "percent": { + "$ref": "#/definitions/percent%25field" } - ] + } }, - "type": "enum" + "type": "integer" } + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + ], [ { - "data": { - "type": "string" - }, + "data": "a", "data_pointer": "", "schema": { - "definitions": { - "a_string": { - "type": "string" - } - }, - "enum": [ - { - "$ref": "#/definitions/a_string" - } - ] + "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/definitions/a", "root_schema": { "definitions": { - "a_string": { - "type": "string" + "a": { + "type": "integer" + }, + "b": { + "$ref": "#/definitions/a" + }, + "c": { + "$ref": "#/definitions/b" } }, - "enum": [ + "allOf": [ { - "$ref": "#/definitions/a_string" + "$ref": "#/definitions/c" } ] }, - "type": "enum" + "type": "integer" } - ], - [ - ] ], [ + [ + + ], + [ + + ], [ { - "data": 1, - "data_pointer": "/foo/bar", + "data": "string", + "data_pointer": "/foo", "schema": { - "type": "string" + "type": "array" }, - "schema_pointer": "/properties/foo/definitions/inner/properties/bar", + "schema_pointer": "/definitions/reffed", "root_schema": { - "$id": "http://example.com/schema-relative-uri-defs1.json", - "properties": { - "foo": { - "$id": "schema-relative-uri-defs2.json", - "definitions": { - "inner": { - "properties": { - "bar": { - "type": "string" - } - } - } - }, - "allOf": [ - { - "$ref": "#/definitions/inner" - } - ] + "definitions": { + "reffed": { + "type": "array" } }, - "allOf": [ - { - "$ref": "schema-relative-uri-defs2.json" - } - ] - }, - "type": "string" - } - ], - [ - { - "data": 1, - "data_pointer": "/bar", - "schema": { - "type": "string" - }, - "schema_pointer": "/properties/foo/definitions/inner/properties/bar", - "root_schema": { - "$id": "http://example.com/schema-relative-uri-defs1.json", "properties": { "foo": { - "$id": "schema-relative-uri-defs2.json", - "definitions": { - "inner": { - "properties": { - "bar": { - "type": "string" - } - } - } - }, - "allOf": [ - { - "$ref": "#/definitions/inner" - } - ] - } - }, - "allOf": [ - { - "$ref": "schema-relative-uri-defs2.json" + "$ref": "#/definitions/reffed", + "maxItems": 2 } - ] + } }, - "type": "string" + "type": "array" } - ], - [ - ] ], [ [ { - "data": 1, - "data_pointer": "/foo/bar", - "schema": { - "type": "string" - }, - "schema_pointer": "/properties/foo/definitions/inner/properties/bar", - "root_schema": { - "$id": "http://example.com/schema-refs-absolute-uris-defs1.json", - "properties": { - "foo": { - "$id": "http://example.com/schema-refs-absolute-uris-defs2.json", - "definitions": { - "inner": { - "properties": { - "bar": { - "type": "string" - } - } - } - }, - "allOf": [ - { - "$ref": "#/definitions/inner" - } - ] - } - }, - "allOf": [ - { - "$ref": "schema-refs-absolute-uris-defs2.json" - } - ] - }, - "type": "string" - } - ], - [ - { - "data": 1, - "data_pointer": "/bar", + "data": "a", + "data_pointer": "", "schema": { - "type": "string" + "$comment": "this canonical uri is http://localhost:1234/sibling_id/base/foo.json", + "$id": "foo.json", + "type": "number" }, - "schema_pointer": "/properties/foo/definitions/inner/properties/bar", + "schema_pointer": "/definitions/base_foo", "root_schema": { - "$id": "http://example.com/schema-refs-absolute-uris-defs1.json", - "properties": { + "$id": "http://localhost:1234/sibling_id/base/", + "definitions": { "foo": { - "$id": "http://example.com/schema-refs-absolute-uris-defs2.json", - "definitions": { - "inner": { - "properties": { - "bar": { - "type": "string" - } - } - } - }, - "allOf": [ - { - "$ref": "#/definitions/inner" - } - ] + "$id": "http://localhost:1234/sibling_id/foo.json", + "type": "string" + }, + "base_foo": { + "$comment": "this canonical uri is http://localhost:1234/sibling_id/base/foo.json", + "$id": "foo.json", + "type": "number" } }, "allOf": [ { - "$ref": "schema-refs-absolute-uris-defs2.json" + "$comment": "$ref resolves to http://localhost:1234/sibling_id/base/foo.json, not http://localhost:1234/sibling_id/foo.json", + "$id": "http://localhost:1234/sibling_id/", + "$ref": "foo.json" } ] }, - "type": "string" + "type": "number" } ], [ @@ -11361,90 +11427,242 @@ ], [ { - "data": 12, - "data_pointer": "/foo", + "data": -1, + "data_pointer": "/minLength", "schema": { - "$comment": "URIs do not have to have HTTP(s) schemes", - "$id": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed", - "minimum": 30, - "properties": { - "foo": { - "$ref": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed" - } - } + "type": "integer", + "minimum": 0 }, - "schema_pointer": "", + "schema_pointer": "/definitions/nonNegativeInteger", "root_schema": { - "$comment": "URIs do not have to have HTTP(s) schemes", - "$id": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed", - "minimum": 30, - "properties": { - "foo": { - "$ref": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed" - } - } - }, - "type": "minimum" - } - ] - ], - [ - [ + "$schema": "http://json-schema.org/draft-06/schema#", + "$id": "http://json-schema.org/draft-06/schema#", + "title": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#" + } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { + "$ref": "#/definitions/nonNegativeInteger" + }, + { + "default": 0 + } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true, + "default": [ - ], - [ - { - "data": 12, - "data_pointer": "/foo", - "schema": { - "type": "string" - }, - "schema_pointer": "/definitions/bar", - "root_schema": { - "$comment": "URIs do not have to have HTTP(s) schemes", - "$id": "urn:uuid:deadbeef-1234-00ff-ff00-4321feebdaed", - "properties": { - "foo": { - "$ref": "#/definitions/bar" + ] } }, - "definitions": { - "bar": { - "type": "string" - } - } - }, - "type": "string" - } - ] - ], - [ - [ - - ], - [ - { - "data": 12, - "data_pointer": "/foo", - "schema": { - "type": "string" - }, - "schema_pointer": "/definitions/bar", - "root_schema": { - "$comment": "RFC 8141 §2.2", - "$id": "urn:example:1/406/47452/2", + "type": [ + "object", + "boolean" + ], "properties": { - "foo": { - "$ref": "#/definitions/bar" - } - }, - "definitions": { - "bar": { + "$id": { + "type": "string", + "format": "uri-reference" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": { + }, + "examples": { + "type": "array", + "items": { + } + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { + "$ref": "#/definitions/nonNegativeInteger" + }, + "minLength": { + "$ref": "#/definitions/nonNegativeIntegerDefault0" + }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { + "$ref": "#" + }, + "items": { + "anyOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/schemaArray" + } + ], + "default": { + } + }, + "maxItems": { + "$ref": "#/definitions/nonNegativeInteger" + }, + "minItems": { + "$ref": "#/definitions/nonNegativeIntegerDefault0" + }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "contains": { + "$ref": "#" + }, + "maxProperties": { + "$ref": "#/definitions/nonNegativeInteger" + }, + "minProperties": { + "$ref": "#/definitions/nonNegativeIntegerDefault0" + }, + "required": { + "$ref": "#/definitions/stringArray" + }, + "additionalProperties": { + "$ref": "#" + }, + "definitions": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": { + } + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "default": { + } + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#" + }, + "propertyNames": { + "format": "regex" + }, + "default": { + } + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "$ref": "#" + }, + { + "$ref": "#/definitions/stringArray" + } + ] + } + }, + "propertyNames": { + "$ref": "#" + }, + "const": { + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/simpleTypes" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/simpleTypes" + }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "format": { "type": "string" + }, + "allOf": { + "$ref": "#/definitions/schemaArray" + }, + "anyOf": { + "$ref": "#/definitions/schemaArray" + }, + "oneOf": { + "$ref": "#/definitions/schemaArray" + }, + "not": { + "$ref": "#" } + }, + "default": { } }, - "type": "string" + "type": "minimum" } ] ], @@ -11454,22 +11672,15 @@ ], [ { - "data": 12, - "data_pointer": "/foo", + "data": 2, + "data_pointer": "/$ref", "schema": { "type": "string" }, - "schema_pointer": "/definitions/bar", + "schema_pointer": "/properties/$ref", "root_schema": { - "$comment": "RFC 8141 §2.3.1", - "$id": "urn:example:foo-bar-baz-qux?+CCResolve:cc=uk", "properties": { - "foo": { - "$ref": "#/definitions/bar" - } - }, - "definitions": { - "bar": { + "$ref": { "type": "string" } } @@ -11484,22 +11695,20 @@ ], [ { - "data": 12, - "data_pointer": "/foo", + "data": 2, + "data_pointer": "/$ref", "schema": { "type": "string" }, - "schema_pointer": "/definitions/bar", + "schema_pointer": "/definitions/is-string", "root_schema": { - "$comment": "RFC 8141 §2.3.2", - "$id": "urn:example:weather?=op=map&lat=39.56&lon=-104.85&datetime=1969-07-21T02:56:15Z", "properties": { - "foo": { - "$ref": "#/definitions/bar" + "$ref": { + "$ref": "#/definitions/is-string" } }, "definitions": { - "bar": { + "is-string": { "type": "string" } } @@ -11511,29 +11720,26 @@ [ [ - ], + ] + ], + [ [ { - "data": 12, - "data_pointer": "/foo", - "schema": { - "type": "string" - }, - "schema_pointer": "/definitions/bar", + "data": "foo", + "data_pointer": "", + "schema": false, + "schema_pointer": "/definitions/bool", "root_schema": { - "$id": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed", - "properties": { - "foo": { - "$ref": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed#/definitions/bar" + "allOf": [ + { + "$ref": "#/definitions/bool" } - }, + ], "definitions": { - "bar": { - "type": "string" - } + "bool": false } }, - "type": "string" + "type": "schema" } ] ], @@ -11543,28 +11749,51 @@ ], [ { - "data": 12, - "data_pointer": "/foo", + "data": "string is invalid", + "data_pointer": "/nodes/0/subtree/nodes/0/value", "schema": { - "$id": "#something", - "type": "string" + "type": "number" }, - "schema_pointer": "/definitions/bar", + "schema_pointer": "/definitions/node/properties/value", "root_schema": { - "$id": "urn:uuid:deadbeef-1234-ff00-00ff-4321feebdaed", + "$id": "http://localhost:1234/tree", + "description": "tree of nodes", + "type": "object", "properties": { - "foo": { - "$ref": "urn:uuid:deadbeef-1234-ff00-00ff-4321feebdaed#something" + "meta": { + "type": "string" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "node" + } } }, + "required": [ + "meta", + "nodes" + ], "definitions": { - "bar": { - "$id": "#something", - "type": "string" + "node": { + "$id": "http://localhost:1234/node", + "description": "node", + "type": "object", + "properties": { + "value": { + "type": "number" + }, + "subtree": { + "$ref": "tree" + } + }, + "required": [ + "value" + ] } } }, - "type": "string" + "type": "number" } ] ], @@ -11574,32 +11803,25 @@ ], [ { - "data": 12, - "data_pointer": "", + "data": "1", + "data_pointer": "/foo\"bar", "schema": { - "$id": "http://example.com/absref/foobar.json", - "type": "string" + "type": "number" }, - "schema_pointer": "/definitions/b", + "schema_pointer": "/definitions/foo\"bar", "root_schema": { - "$id": "http://example.com/ref/absref.json", - "definitions": { - "a": { - "$id": "http://example.com/ref/absref/foobar.json", - "type": "number" - }, - "b": { - "$id": "http://example.com/absref/foobar.json", - "type": "string" + "properties": { + "foo\"bar": { + "$ref": "#/definitions/foo%22bar" } }, - "allOf": [ - { - "$ref": "/absref/foobar.json" + "definitions": { + "foo\"bar": { + "type": "number" } - ] + } }, - "type": "string" + "type": "number" } ] ], @@ -11612,23 +11834,24 @@ "data": "a", "data_pointer": "", "schema": { - "type": "number" + "$id": "#foo", + "type": "integer" }, - "schema_pointer": "/definitions/foo", + "schema_pointer": "/definitions/A", "root_schema": { - "$id": "file:///folder/file.json", - "definitions": { - "foo": { - "type": "number" - } - }, "allOf": [ { - "$ref": "#/definitions/foo" + "$ref": "#foo" } - ] + ], + "definitions": { + "A": { + "$id": "#foo", + "type": "integer" + } + } }, - "type": "number" + "type": "integer" } ] ], @@ -11641,23 +11864,25 @@ "data": "a", "data_pointer": "", "schema": { - "type": "number" + "$id": "#foo", + "type": "integer" }, - "schema_pointer": "/definitions/foo", + "schema_pointer": "/definitions/A", "root_schema": { - "$id": "file:///c:/folder/file.json", - "definitions": { - "foo": { - "type": "number" - } - }, + "$id": "https://example.com/schema-with-anchor", "allOf": [ { - "$ref": "#/definitions/foo" + "$ref": "https://example.com/schema-with-anchor#foo" } - ] + ], + "definitions": { + "A": { + "$id": "#foo", + "type": "integer" + } + } }, - "type": "number" + "type": "integer" } ] ], @@ -11670,234 +11895,224 @@ "data": "a", "data_pointer": "", "schema": { - "type": "number" + "$id": "#foo", + "type": "integer" }, - "schema_pointer": "/definitions//definitions/", + "schema_pointer": "/definitions/A/definitions/B", "root_schema": { + "$id": "http://localhost:1234/root", + "allOf": [ + { + "$ref": "http://localhost:1234/nested.json#foo" + } + ], "definitions": { - "": { + "A": { + "$id": "nested.json", "definitions": { - "": { - "type": "number" + "B": { + "$id": "#foo", + "type": "integer" } } } - }, - "allOf": [ - { - "$ref": "#/definitions//definitions/" - } - ] - }, - "type": "number" - } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft6/refRemote.json": [ - [ - [ - - ], - [ - { - "data": "a", - "data_pointer": "", - "schema": { - "type": "integer" - }, - "schema_pointer": "", - "root_schema": { - "type": "integer" + } }, "type": "integer" } ] ], [ - [ - - ], [ { - "data": "a", + "data": "this is a string", "data_pointer": "", "schema": { - "type": "integer" + "definitions": { + "a_string": { + "type": "string" + } + }, + "enum": [ + { + "$ref": "#/definitions/a_string" + } + ] }, - "schema_pointer": "/definitions/integer", + "schema_pointer": "", "root_schema": { "definitions": { - "integer": { - "type": "integer" - }, - "refToInteger": { - "$ref": "#/definitions/integer" + "a_string": { + "type": "string" } - } + }, + "enum": [ + { + "$ref": "#/definitions/a_string" + } + ] }, - "type": "integer" + "type": "enum" } - ] - ], - [ - [ - ], [ { - "data": "a", + "data": { + "type": "string" + }, "data_pointer": "", "schema": { - "type": "integer" + "definitions": { + "a_string": { + "type": "string" + } + }, + "enum": [ + { + "$ref": "#/definitions/a_string" + } + ] }, - "schema_pointer": "/definitions/integer", + "schema_pointer": "", "root_schema": { "definitions": { - "integer": { - "type": "integer" - }, - "refToInteger": { - "$ref": "#/definitions/integer" + "a_string": { + "type": "string" } - } + }, + "enum": [ + { + "$ref": "#/definitions/a_string" + } + ] }, - "type": "integer" + "type": "enum" } + ], + [ + ] ], [ - [ - - ], [ { - "data": "a", - "data_pointer": "/0/0", + "data": 1, + "data_pointer": "/foo/bar", "schema": { - "type": "integer" + "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/properties/foo/definitions/inner/properties/bar", "root_schema": { - "type": "integer" - }, - "type": "integer" + "$id": "http://example.com/schema-relative-uri-defs1.json", + "properties": { + "foo": { + "$id": "schema-relative-uri-defs2.json", + "definitions": { + "inner": { + "properties": { + "bar": { + "type": "string" + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/inner" + } + ] + } + }, + "allOf": [ + { + "$ref": "schema-relative-uri-defs2.json" + } + ] + }, + "type": "string" } - ] - ], - [ - [ - ], [ { - "data": "a", - "data_pointer": "/list/0", + "data": 1, + "data_pointer": "/bar", "schema": { - "type": "integer" + "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/properties/foo/definitions/inner/properties/bar", "root_schema": { - "type": "integer" + "$id": "http://example.com/schema-relative-uri-defs1.json", + "properties": { + "foo": { + "$id": "schema-relative-uri-defs2.json", + "definitions": { + "inner": { + "properties": { + "bar": { + "type": "string" + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/inner" + } + ] + } + }, + "allOf": [ + { + "$ref": "schema-relative-uri-defs2.json" + } + ] }, - "type": "integer" + "type": "string" } - ] - ], - [ - [ - ], [ - { - "data": "a", - "data_pointer": "/list/0", - "schema": { - "type": "integer" - }, - "schema_pointer": "", - "root_schema": { - "type": "integer" - }, - "type": "integer" - } + ] ], [ - [ - - ], - [ - - ], [ { - "data": { - "name": null - }, - "data_pointer": "/name", + "data": 1, + "data_pointer": "/foo/bar", "schema": { - "type": "null" + "type": "string" }, - "schema_pointer": "/definitions/orNull/anyOf/0", + "schema_pointer": "/properties/foo/definitions/inner/properties/bar", "root_schema": { - "definitions": { - "orNull": { - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#" + "$id": "http://example.com/schema-refs-absolute-uris-defs1.json", + "properties": { + "foo": { + "$id": "http://example.com/schema-refs-absolute-uris-defs2.json", + "definitions": { + "inner": { + "properties": { + "bar": { + "type": "string" + } + } } - ] - } - }, - "type": "string" - }, - "type": "null" - }, - { - "data": { - "name": null - }, - "data_pointer": "/name", - "schema": { - "definitions": { - "orNull": { - "anyOf": [ - { - "type": "null" - }, + }, + "allOf": [ { - "$ref": "#" + "$ref": "#/definitions/inner" } ] } }, - "type": "string" - }, - "schema_pointer": "", - "root_schema": { - "definitions": { - "orNull": { - "anyOf": [ - { - "type": "null" - }, - { - "$ref": "#" - } - ] + "allOf": [ + { + "$ref": "schema-refs-absolute-uris-defs2.json" } - }, - "type": "string" + ] }, "type": "string" } - ] - ], - [ + ], [ { "data": 1, @@ -11905,21 +12120,31 @@ "schema": { "type": "string" }, - "schema_pointer": "/definitions/inner/properties/bar", + "schema_pointer": "/properties/foo/definitions/inner/properties/bar", "root_schema": { - "$id": "http://localhost:1234/ref-and-definitions.json", - "definitions": { - "inner": { - "properties": { - "bar": { - "type": "string" + "$id": "http://example.com/schema-refs-absolute-uris-defs1.json", + "properties": { + "foo": { + "$id": "http://example.com/schema-refs-absolute-uris-defs2.json", + "definitions": { + "inner": { + "properties": { + "bar": { + "type": "string" + } + } } - } + }, + "allOf": [ + { + "$ref": "#/definitions/inner" + } + ] } }, "allOf": [ { - "$ref": "#/definitions/inner" + "$ref": "schema-refs-absolute-uris-defs2.json" } ] }, @@ -11936,45 +12161,61 @@ ], [ { - "data": "foo", - "data_pointer": "", + "data": 12, + "data_pointer": "/foo", "schema": { - "$id": "#foo", - "type": "integer" + "$comment": "URIs do not have to have HTTP(s) schemes", + "$id": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed", + "minimum": 30, + "properties": { + "foo": { + "$ref": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed" + } + } }, - "schema_pointer": "/definitions/A", + "schema_pointer": "", "root_schema": { - "definitions": { - "refToInteger": { - "$ref": "#foo" - }, - "A": { - "$id": "#foo", - "type": "integer" + "$comment": "URIs do not have to have HTTP(s) schemes", + "$id": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed", + "minimum": 30, + "properties": { + "foo": { + "$ref": "urn:uuid:deadbeef-1234-ffff-ffff-4321feebdaed" } } }, - "type": "integer" + "type": "minimum" } ] ], [ + [ + + ], [ { - "data": 1, - "data_pointer": "/name/foo", + "data": 12, + "data_pointer": "/foo", "schema": { "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/definitions/bar", "root_schema": { - "type": "string" + "$comment": "URIs do not have to have HTTP(s) schemes", + "$id": "urn:uuid:deadbeef-1234-00ff-ff00-4321feebdaed", + "properties": { + "foo": { + "$ref": "#/definitions/bar" + } + }, + "definitions": { + "bar": { + "type": "string" + } + } }, "type": "string" } - ], - [ - ] ], [ @@ -11983,91 +12224,148 @@ ], [ { - "data": "a", - "data_pointer": "", + "data": 12, + "data_pointer": "/foo", "schema": { - "$id": "#detached", - "type": "integer" + "type": "string" }, - "schema_pointer": "/definitions/detached", + "schema_pointer": "/definitions/bar", "root_schema": { - "$id": "http://localhost:1234/draft6/detached-ref.json", - "$schema": "http://json-schema.org/draft-06/schema#", - "definitions": { + "$comment": "RFC 8141 §2.2", + "$id": "urn:example:1/406/47452/2", + "properties": { "foo": { - "$ref": "#detached" - }, - "detached": { - "$id": "#detached", - "type": "integer" + "$ref": "#/definitions/bar" + } + }, + "definitions": { + "bar": { + "type": "string" } } }, - "type": "integer" + "type": "string" } ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft6/required.json": [ + ], [ [ ], [ { - "data": { - "bar": 1 - }, - "data_pointer": "", + "data": 12, + "data_pointer": "/foo", "schema": { - "properties": { - "foo": { - }, - "bar": { - } - }, - "required": [ - "foo" - ] + "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/definitions/bar", "root_schema": { + "$comment": "RFC 8141 §2.3.1", + "$id": "urn:example:foo-bar-baz-qux?+CCResolve:cc=uk", "properties": { "foo": { - }, - "bar": { + "$ref": "#/definitions/bar" } }, - "required": [ - "foo" - ] + "definitions": { + "bar": { + "type": "string" + } + } }, - "type": "required", - "details": { - "missing_keys": [ - "foo" - ] - } + "type": "string" } - ], - [ - - ], + ] + ], + [ [ ], [ - + { + "data": 12, + "data_pointer": "/foo", + "schema": { + "type": "string" + }, + "schema_pointer": "/definitions/bar", + "root_schema": { + "$comment": "RFC 8141 §2.3.2", + "$id": "urn:example:weather?=op=map&lat=39.56&lon=-104.85&datetime=1969-07-21T02:56:15Z", + "properties": { + "foo": { + "$ref": "#/definitions/bar" + } + }, + "definitions": { + "bar": { + "type": "string" + } + } + }, + "type": "string" + } ] ], [ [ + ], + [ + { + "data": 12, + "data_pointer": "/foo", + "schema": { + "type": "string" + }, + "schema_pointer": "/definitions/bar", + "root_schema": { + "$id": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed", + "properties": { + "foo": { + "$ref": "urn:uuid:deadbeef-1234-0000-0000-4321feebdaed#/definitions/bar" + } + }, + "definitions": { + "bar": { + "type": "string" + } + } + }, + "type": "string" + } ] ], [ [ + ], + [ + { + "data": 12, + "data_pointer": "/foo", + "schema": { + "$id": "#something", + "type": "string" + }, + "schema_pointer": "/definitions/bar", + "root_schema": { + "$id": "urn:uuid:deadbeef-1234-ff00-00ff-4321feebdaed", + "properties": { + "foo": { + "$ref": "urn:uuid:deadbeef-1234-ff00-00ff-4321feebdaed#something" + } + }, + "definitions": { + "bar": { + "$id": "#something", + "type": "string" + } + } + }, + "type": "string" + } ] ], [ @@ -12076,191 +12374,134 @@ ], [ { - "data": { - "foo\nbar": "1", - "foo\"bar": "1" - }, + "data": 12, "data_pointer": "", "schema": { - "required": [ - "foo\nbar", - "foo\"bar", - "foo\\bar", - "foo\rbar", - "foo\tbar", - "foo\fbar" - ] + "$id": "http://example.com/absref/foobar.json", + "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/definitions/b", "root_schema": { - "required": [ - "foo\nbar", - "foo\"bar", - "foo\\bar", - "foo\rbar", - "foo\tbar", - "foo\fbar" + "$id": "http://example.com/ref/absref.json", + "definitions": { + "a": { + "$id": "http://example.com/ref/absref/foobar.json", + "type": "number" + }, + "b": { + "$id": "http://example.com/absref/foobar.json", + "type": "string" + } + }, + "allOf": [ + { + "$ref": "/absref/foobar.json" + } ] }, - "type": "required", - "details": { - "missing_keys": [ - "foo\\bar", - "foo\rbar", - "foo\tbar", - "foo\fbar" - ] - } + "type": "string" } ] ], [ [ - ], - [ - ], [ { - "data": { - }, + "data": "a", "data_pointer": "", "schema": { - "required": [ - "__proto__", - "toString", - "constructor" - ] + "type": "number" }, - "schema_pointer": "", + "schema_pointer": "/definitions/foo", "root_schema": { - "required": [ - "__proto__", - "toString", - "constructor" + "$id": "file:///folder/file.json", + "definitions": { + "foo": { + "type": "number" + } + }, + "allOf": [ + { + "$ref": "#/definitions/foo" + } ] }, - "type": "required", - "details": { - "missing_keys": [ - "__proto__", - "toString", - "constructor" - ] - } + "type": "number" } + ] + ], + [ + [ + ], [ { - "data": { - "__proto__": "foo" - }, + "data": "a", "data_pointer": "", "schema": { - "required": [ - "__proto__", - "toString", - "constructor" - ] + "type": "number" }, - "schema_pointer": "", + "schema_pointer": "/definitions/foo", "root_schema": { - "required": [ - "__proto__", - "toString", - "constructor" - ] - }, - "type": "required", - "details": { - "missing_keys": [ - "toString", - "constructor" - ] - } - } - ], - [ - { - "data": { - "toString": { - "length": 37 - } - }, - "data_pointer": "", - "schema": { - "required": [ - "__proto__", - "toString", - "constructor" - ] - }, - "schema_pointer": "", - "root_schema": { - "required": [ - "__proto__", - "toString", - "constructor" + "$id": "file:///c:/folder/file.json", + "definitions": { + "foo": { + "type": "number" + } + }, + "allOf": [ + { + "$ref": "#/definitions/foo" + } ] }, - "type": "required", - "details": { - "missing_keys": [ - "__proto__", - "constructor" - ] - } + "type": "number" } + ] + ], + [ + [ + ], [ { - "data": { - "constructor": { - "length": 37 - } - }, + "data": "a", "data_pointer": "", "schema": { - "required": [ - "__proto__", - "toString", - "constructor" - ] + "type": "number" }, - "schema_pointer": "", + "schema_pointer": "/definitions//definitions/", "root_schema": { - "required": [ - "__proto__", - "toString", - "constructor" + "definitions": { + "": { + "definitions": { + "": { + "type": "number" + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions//definitions/" + } ] }, - "type": "required", - "details": { - "missing_keys": [ - "__proto__", - "toString" - ] - } + "type": "number" } - ], - [ - ] ] ], - "JSON-Schema-Test-Suite/tests/draft6/type.json": [ + "JSON-Schema-Test-Suite/tests/draft6/refRemote.json": [ [ [ - ], - [ - ], [ { - "data": 1.1, + "data": "a", "data_pointer": "", "schema": { "type": "integer" @@ -12271,40 +12512,68 @@ }, "type": "integer" } + ] + ], + [ + [ + ], [ { - "data": "foo", + "data": "a", "data_pointer": "", "schema": { "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/definitions/integer", "root_schema": { - "type": "integer" + "definitions": { + "integer": { + "type": "integer" + }, + "refToInteger": { + "$ref": "#/definitions/integer" + } + } }, "type": "integer" } + ] + ], + [ + [ + ], [ { - "data": "1", + "data": "a", "data_pointer": "", "schema": { "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/definitions/integer", "root_schema": { - "type": "integer" + "definitions": { + "integer": { + "type": "integer" + }, + "refToInteger": { + "$ref": "#/definitions/integer" + } + } }, "type": "integer" } + ] + ], + [ + [ + ], [ { - "data": { - }, - "data_pointer": "", + "data": "a", + "data_pointer": "/0/0", "schema": { "type": "integer" }, @@ -12314,27 +12583,16 @@ }, "type": "integer" } - ], + ] + ], + [ [ - { - "data": [ - ], - "data_pointer": "", - "schema": { - "type": "integer" - }, - "schema_pointer": "", - "root_schema": { - "type": "integer" - }, - "type": "integer" - } ], [ { - "data": true, - "data_pointer": "", + "data": "a", + "data_pointer": "/list/0", "schema": { "type": "integer" }, @@ -12344,11 +12602,16 @@ }, "type": "integer" } + ] + ], + [ + [ + ], [ { - "data": null, - "data_pointer": "", + "data": "a", + "data_pointer": "/list/0", "schema": { "type": "integer" }, @@ -12366,125 +12629,225 @@ ], [ - ], - [ - ], [ { - "data": "foo", - "data_pointer": "", - "schema": { - "type": "number" - }, - "schema_pointer": "", - "root_schema": { - "type": "number" + "data": { + "name": null }, - "type": "number" - } - ], - [ - { - "data": "1", - "data_pointer": "", + "data_pointer": "/name", "schema": { - "type": "number" + "type": "null" }, - "schema_pointer": "", + "schema_pointer": "/definitions/orNull/anyOf/0", "root_schema": { - "type": "number" + "definitions": { + "orNull": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#" + } + ] + } + }, + "type": "string" }, - "type": "number" - } - ], - [ + "type": "null" + }, { "data": { + "name": null }, - "data_pointer": "", + "data_pointer": "/name", "schema": { - "type": "number" + "definitions": { + "orNull": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#" + } + ] + } + }, + "type": "string" }, "schema_pointer": "", "root_schema": { - "type": "number" + "definitions": { + "orNull": { + "anyOf": [ + { + "type": "null" + }, + { + "$ref": "#" + } + ] + } + }, + "type": "string" }, - "type": "number" + "type": "string" } - ], + ] + ], + [ [ { - "data": [ - - ], - "data_pointer": "", + "data": 1, + "data_pointer": "/bar", "schema": { - "type": "number" + "type": "string" }, - "schema_pointer": "", + "schema_pointer": "/definitions/inner/properties/bar", "root_schema": { - "type": "number" + "$id": "http://localhost:1234/ref-and-definitions.json", + "definitions": { + "inner": { + "properties": { + "bar": { + "type": "string" + } + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/inner" + } + ] }, - "type": "number" + "type": "string" } + ], + [ + + ] + ], + [ + [ + ], [ { - "data": true, + "data": "foo", "data_pointer": "", "schema": { - "type": "number" + "$id": "#foo", + "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/definitions/A", "root_schema": { - "type": "number" + "definitions": { + "refToInteger": { + "$ref": "#foo" + }, + "A": { + "$id": "#foo", + "type": "integer" + } + } }, - "type": "number" + "type": "integer" } - ], + ] + ], + [ [ { - "data": null, - "data_pointer": "", + "data": 1, + "data_pointer": "/name/foo", "schema": { - "type": "number" + "type": "string" }, "schema_pointer": "", "root_schema": { - "type": "number" + "type": "string" }, - "type": "number" + "type": "string" } + ], + [ + ] ], [ + [ + + ], [ { - "data": 1, + "data": "a", "data_pointer": "", "schema": { - "type": "string" + "$id": "#detached", + "type": "integer" }, - "schema_pointer": "", + "schema_pointer": "/definitions/detached", "root_schema": { - "type": "string" + "$id": "http://localhost:1234/draft6/detached-ref.json", + "$schema": "http://json-schema.org/draft-06/schema#", + "definitions": { + "foo": { + "$ref": "#detached" + }, + "detached": { + "$id": "#detached", + "type": "integer" + } + } }, - "type": "string" + "type": "integer" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft6/required.json": [ + [ + [ + ], [ { - "data": 1.1, + "data": { + "bar": 1 + }, "data_pointer": "", "schema": { - "type": "string" + "properties": { + "foo": { + }, + "bar": { + } + }, + "required": [ + "foo" + ] }, "schema_pointer": "", "root_schema": { - "type": "string" + "properties": { + "foo": { + }, + "bar": { + } + }, + "required": [ + "foo" + ] }, - "type": "string" + "type": "required", + "details": { + "missing_keys": [ + "foo" + ] + } } ], [ @@ -12495,94 +12858,218 @@ ], [ + ] + ], + [ + [ + + ] + ], + [ + [ + + ] + ], + [ + [ + ], [ { "data": { + "foo\nbar": "1", + "foo\"bar": "1" }, "data_pointer": "", "schema": { - "type": "string" + "required": [ + "foo\nbar", + "foo\"bar", + "foo\\bar", + "foo\rbar", + "foo\tbar", + "foo\fbar" + ] }, "schema_pointer": "", "root_schema": { - "type": "string" + "required": [ + "foo\nbar", + "foo\"bar", + "foo\\bar", + "foo\rbar", + "foo\tbar", + "foo\fbar" + ] }, - "type": "string" + "type": "required", + "details": { + "missing_keys": [ + "foo\\bar", + "foo\rbar", + "foo\tbar", + "foo\fbar" + ] + } } + ] + ], + [ + [ + ], [ - { - "data": [ - ], + ], + [ + { + "data": { + }, "data_pointer": "", "schema": { - "type": "string" + "required": [ + "__proto__", + "toString", + "constructor" + ] }, "schema_pointer": "", "root_schema": { - "type": "string" + "required": [ + "__proto__", + "toString", + "constructor" + ] }, - "type": "string" + "type": "required", + "details": { + "missing_keys": [ + "__proto__", + "toString", + "constructor" + ] + } } ], [ { - "data": true, + "data": { + "__proto__": "foo" + }, "data_pointer": "", "schema": { - "type": "string" + "required": [ + "__proto__", + "toString", + "constructor" + ] }, "schema_pointer": "", "root_schema": { - "type": "string" + "required": [ + "__proto__", + "toString", + "constructor" + ] }, - "type": "string" + "type": "required", + "details": { + "missing_keys": [ + "toString", + "constructor" + ] + } } ], [ { - "data": null, + "data": { + "toString": { + "length": 37 + } + }, "data_pointer": "", "schema": { - "type": "string" + "required": [ + "__proto__", + "toString", + "constructor" + ] }, "schema_pointer": "", "root_schema": { - "type": "string" - }, - "type": "string" + "required": [ + "__proto__", + "toString", + "constructor" + ] + }, + "type": "required", + "details": { + "missing_keys": [ + "__proto__", + "constructor" + ] + } } - ] - ], - [ + ], [ { - "data": 1, + "data": { + "constructor": { + "length": 37 + } + }, "data_pointer": "", "schema": { - "type": "object" + "required": [ + "__proto__", + "toString", + "constructor" + ] }, "schema_pointer": "", "root_schema": { - "type": "object" + "required": [ + "__proto__", + "toString", + "constructor" + ] }, - "type": "object" + "type": "required", + "details": { + "missing_keys": [ + "__proto__", + "toString" + ] + } } + ], + [ + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft6/type.json": [ + [ + [ + + ], + [ + ], [ { "data": 1.1, "data_pointer": "", "schema": { - "type": "object" + "type": "integer" }, "schema_pointer": "", "root_schema": { - "type": "object" + "type": "integer" }, - "type": "object" + "type": "integer" } ], [ @@ -12590,17 +13077,43 @@ "data": "foo", "data_pointer": "", "schema": { - "type": "object" + "type": "integer" }, "schema_pointer": "", "root_schema": { - "type": "object" + "type": "integer" }, - "type": "object" + "type": "integer" } ], [ - + { + "data": "1", + "data_pointer": "", + "schema": { + "type": "integer" + }, + "schema_pointer": "", + "root_schema": { + "type": "integer" + }, + "type": "integer" + } + ], + [ + { + "data": { + }, + "data_pointer": "", + "schema": { + "type": "integer" + }, + "schema_pointer": "", + "root_schema": { + "type": "integer" + }, + "type": "integer" + } ], [ { @@ -12609,13 +13122,13 @@ ], "data_pointer": "", "schema": { - "type": "object" + "type": "integer" }, "schema_pointer": "", "root_schema": { - "type": "object" + "type": "integer" }, - "type": "object" + "type": "integer" } ], [ @@ -12623,13 +13136,13 @@ "data": true, "data_pointer": "", "schema": { - "type": "object" + "type": "integer" }, "schema_pointer": "", "root_schema": { - "type": "object" + "type": "integer" }, - "type": "object" + "type": "integer" } ], [ @@ -12637,89 +13150,97 @@ "data": null, "data_pointer": "", "schema": { - "type": "object" + "type": "integer" }, "schema_pointer": "", "root_schema": { - "type": "object" + "type": "integer" }, - "type": "object" + "type": "integer" } ] ], [ + [ + + ], + [ + + ], + [ + + ], [ { - "data": 1, + "data": "foo", "data_pointer": "", "schema": { - "type": "array" + "type": "number" }, "schema_pointer": "", "root_schema": { - "type": "array" + "type": "number" }, - "type": "array" + "type": "number" } ], [ { - "data": 1.1, + "data": "1", "data_pointer": "", "schema": { - "type": "array" + "type": "number" }, "schema_pointer": "", "root_schema": { - "type": "array" + "type": "number" }, - "type": "array" + "type": "number" } ], [ { - "data": "foo", + "data": { + }, "data_pointer": "", "schema": { - "type": "array" + "type": "number" }, "schema_pointer": "", "root_schema": { - "type": "array" + "type": "number" }, - "type": "array" + "type": "number" } ], [ { - "data": { - }, + "data": [ + + ], "data_pointer": "", "schema": { - "type": "array" + "type": "number" }, "schema_pointer": "", "root_schema": { - "type": "array" + "type": "number" }, - "type": "array" + "type": "number" } - ], - [ - ], [ { "data": true, "data_pointer": "", "schema": { - "type": "array" + "type": "number" }, "schema_pointer": "", "root_schema": { - "type": "array" + "type": "number" }, - "type": "array" + "type": "number" } ], [ @@ -12727,13 +13248,13 @@ "data": null, "data_pointer": "", "schema": { - "type": "array" + "type": "number" }, "schema_pointer": "", "root_schema": { - "type": "array" + "type": "number" }, - "type": "array" + "type": "number" } ] ], @@ -12743,462 +13264,380 @@ "data": 1, "data_pointer": "", "schema": { - "type": "boolean" + "type": "string" }, "schema_pointer": "", "root_schema": { - "type": "boolean" + "type": "string" }, - "type": "boolean" + "type": "string" } ], [ { - "data": 0, + "data": 1.1, "data_pointer": "", "schema": { - "type": "boolean" + "type": "string" }, "schema_pointer": "", "root_schema": { - "type": "boolean" + "type": "string" }, - "type": "boolean" + "type": "string" } + ], + [ + + ], + [ + + ], + [ + ], [ { - "data": 1.1, + "data": { + }, "data_pointer": "", "schema": { - "type": "boolean" + "type": "string" }, "schema_pointer": "", "root_schema": { - "type": "boolean" + "type": "string" }, - "type": "boolean" + "type": "string" } ], [ { - "data": "foo", + "data": [ + + ], "data_pointer": "", "schema": { - "type": "boolean" + "type": "string" }, "schema_pointer": "", "root_schema": { - "type": "boolean" + "type": "string" }, - "type": "boolean" + "type": "string" } ], [ { - "data": "", + "data": true, "data_pointer": "", "schema": { - "type": "boolean" + "type": "string" }, "schema_pointer": "", "root_schema": { - "type": "boolean" + "type": "string" }, - "type": "boolean" + "type": "string" } ], [ { - "data": { - }, + "data": null, "data_pointer": "", "schema": { - "type": "boolean" + "type": "string" }, "schema_pointer": "", "root_schema": { - "type": "boolean" + "type": "string" }, - "type": "boolean" + "type": "string" } - ], + ] + ], + [ [ { - "data": [ - - ], + "data": 1, "data_pointer": "", "schema": { - "type": "boolean" + "type": "object" }, "schema_pointer": "", "root_schema": { - "type": "boolean" + "type": "object" }, - "type": "boolean" + "type": "object" } - ], - [ - - ], - [ - ], [ { - "data": null, + "data": 1.1, "data_pointer": "", "schema": { - "type": "boolean" + "type": "object" }, "schema_pointer": "", "root_schema": { - "type": "boolean" + "type": "object" }, - "type": "boolean" + "type": "object" } - ] - ], - [ + ], [ { - "data": 1, + "data": "foo", "data_pointer": "", "schema": { - "type": "null" + "type": "object" }, "schema_pointer": "", "root_schema": { - "type": "null" + "type": "object" }, - "type": "null" + "type": "object" } ], [ - { - "data": 1.1, - "data_pointer": "", - "schema": { - "type": "null" - }, - "schema_pointer": "", - "root_schema": { - "type": "null" - }, - "type": "null" - } + ], [ { - "data": 0, + "data": [ + + ], "data_pointer": "", "schema": { - "type": "null" + "type": "object" }, "schema_pointer": "", "root_schema": { - "type": "null" + "type": "object" }, - "type": "null" + "type": "object" } ], [ { - "data": "foo", + "data": true, "data_pointer": "", "schema": { - "type": "null" + "type": "object" }, "schema_pointer": "", "root_schema": { - "type": "null" + "type": "object" }, - "type": "null" + "type": "object" } ], [ { - "data": "", + "data": null, "data_pointer": "", "schema": { - "type": "null" + "type": "object" }, "schema_pointer": "", "root_schema": { - "type": "null" + "type": "object" }, - "type": "null" + "type": "object" } - ], + ] + ], + [ [ { - "data": { - }, + "data": 1, "data_pointer": "", "schema": { - "type": "null" + "type": "array" }, "schema_pointer": "", "root_schema": { - "type": "null" + "type": "array" }, - "type": "null" + "type": "array" } ], [ { - "data": [ - - ], + "data": 1.1, "data_pointer": "", "schema": { - "type": "null" + "type": "array" }, "schema_pointer": "", "root_schema": { - "type": "null" + "type": "array" }, - "type": "null" + "type": "array" } ], [ { - "data": true, + "data": "foo", "data_pointer": "", "schema": { - "type": "null" + "type": "array" }, "schema_pointer": "", "root_schema": { - "type": "null" + "type": "array" }, - "type": "null" + "type": "array" } ], [ { - "data": false, + "data": { + }, "data_pointer": "", "schema": { - "type": "null" + "type": "array" }, "schema_pointer": "", "root_schema": { - "type": "null" + "type": "array" }, - "type": "null" + "type": "array" } ], [ - ] - ], - [ - [ - - ], - [ - ], [ { - "data": 1.1, + "data": true, "data_pointer": "", "schema": { - "type": [ - "integer", - "string" - ] + "type": "array" }, "schema_pointer": "", "root_schema": { - "type": [ - "integer", - "string" - ] + "type": "array" }, - "type": "type" + "type": "array" } ], [ { - "data": { - }, + "data": null, "data_pointer": "", "schema": { - "type": [ - "integer", - "string" - ] + "type": "array" }, "schema_pointer": "", "root_schema": { - "type": [ - "integer", - "string" - ] + "type": "array" }, - "type": "type" + "type": "array" } - ], + ] + ], + [ [ { - "data": [ - - ], + "data": 1, "data_pointer": "", "schema": { - "type": [ - "integer", - "string" - ] + "type": "boolean" }, "schema_pointer": "", "root_schema": { - "type": [ - "integer", - "string" - ] + "type": "boolean" }, - "type": "type" + "type": "boolean" } ], [ { - "data": true, + "data": 0, "data_pointer": "", "schema": { - "type": [ - "integer", - "string" - ] + "type": "boolean" }, "schema_pointer": "", "root_schema": { - "type": [ - "integer", - "string" - ] + "type": "boolean" }, - "type": "type" + "type": "boolean" } ], [ { - "data": null, + "data": 1.1, "data_pointer": "", "schema": { - "type": [ - "integer", - "string" - ] + "type": "boolean" }, "schema_pointer": "", "root_schema": { - "type": [ - "integer", - "string" - ] + "type": "boolean" }, - "type": "type" + "type": "boolean" } - ] - ], - [ - [ - ], [ { - "data": 123, + "data": "foo", "data_pointer": "", "schema": { - "type": [ - "string" - ] + "type": "boolean" }, "schema_pointer": "", "root_schema": { - "type": [ - "string" - ] + "type": "boolean" }, - "type": "type" + "type": "boolean" } - ] - ], - [ - [ - - ], - [ - ], [ { - "data": 123, + "data": "", "data_pointer": "", "schema": { - "type": [ - "array", - "object" - ] + "type": "boolean" }, "schema_pointer": "", "root_schema": { - "type": [ - "array", - "object" - ] + "type": "boolean" }, - "type": "type" + "type": "boolean" } ], [ { - "data": "foo", + "data": { + }, "data_pointer": "", "schema": { - "type": [ - "array", - "object" - ] + "type": "boolean" }, "schema_pointer": "", "root_schema": { - "type": [ - "array", - "object" - ] + "type": "boolean" }, - "type": "type" + "type": "boolean" } ], [ { - "data": null, + "data": [ + + ], "data_pointer": "", "schema": { - "type": [ - "array", - "object" - ] + "type": "boolean" }, "schema_pointer": "", "root_schema": { - "type": [ - "array", - "object" - ] + "type": "boolean" }, - "type": "type" + "type": "boolean" } - ] - ], - [ - [ - ], [ @@ -13208,277 +13647,154 @@ ], [ { - "data": 123, - "data_pointer": "", - "schema": { - "type": [ - "array", - "object", - "null" - ] - }, - "schema_pointer": "", - "root_schema": { - "type": [ - "array", - "object", - "null" - ] - }, - "type": "type" - } - ], - [ - { - "data": "foo", + "data": null, "data_pointer": "", "schema": { - "type": [ - "array", - "object", - "null" - ] + "type": "boolean" }, "schema_pointer": "", "root_schema": { - "type": [ - "array", - "object", - "null" - ] + "type": "boolean" }, - "type": "type" + "type": "boolean" } ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft6/uniqueItems.json": [ + ], [ - [ - - ], [ { - "data": [ - 1, - 1 - ], + "data": 1, "data_pointer": "", "schema": { - "uniqueItems": true + "type": "null" }, "schema_pointer": "", "root_schema": { - "uniqueItems": true + "type": "null" }, - "type": "uniqueItems" + "type": "null" } ], [ { - "data": [ - 1, - 2, - 1 - ], + "data": 1.1, "data_pointer": "", "schema": { - "uniqueItems": true + "type": "null" }, "schema_pointer": "", "root_schema": { - "uniqueItems": true + "type": "null" }, - "type": "uniqueItems" + "type": "null" } ], [ { - "data": [ - 1.0, - 1.0, - 1 - ], + "data": 0, "data_pointer": "", "schema": { - "uniqueItems": true + "type": "null" }, "schema_pointer": "", "root_schema": { - "uniqueItems": true + "type": "null" }, - "type": "uniqueItems" + "type": "null" } - ], - [ - - ], - [ - - ], - [ - ], [ { - "data": [ - "foo", - "bar", - "foo" - ], + "data": "foo", "data_pointer": "", "schema": { - "uniqueItems": true + "type": "null" }, "schema_pointer": "", "root_schema": { - "uniqueItems": true + "type": "null" }, - "type": "uniqueItems" + "type": "null" } - ], - [ - ], [ { - "data": [ - { - "foo": "bar" - }, - { - "foo": "bar" - } - ], + "data": "", "data_pointer": "", "schema": { - "uniqueItems": true + "type": "null" }, "schema_pointer": "", "root_schema": { - "uniqueItems": true + "type": "null" }, - "type": "uniqueItems" + "type": "null" } ], [ { - "data": [ - { - "foo": "bar", - "bar": "foo" - }, - { - "bar": "foo", - "foo": "bar" - } - ], + "data": { + }, "data_pointer": "", "schema": { - "uniqueItems": true + "type": "null" }, "schema_pointer": "", "root_schema": { - "uniqueItems": true + "type": "null" }, - "type": "uniqueItems" + "type": "null" } - ], - [ - ], [ { "data": [ - { - "foo": { - "bar": { - "baz": true - } - } - }, - { - "foo": { - "bar": { - "baz": true - } - } - } + ], "data_pointer": "", "schema": { - "uniqueItems": true + "type": "null" }, "schema_pointer": "", "root_schema": { - "uniqueItems": true + "type": "null" }, - "type": "uniqueItems" + "type": "null" } - ], - [ - ], [ { - "data": [ - [ - "foo" - ], - [ - "foo" - ] - ], + "data": true, "data_pointer": "", "schema": { - "uniqueItems": true + "type": "null" }, "schema_pointer": "", "root_schema": { - "uniqueItems": true + "type": "null" }, - "type": "uniqueItems" + "type": "null" } ], [ { - "data": [ - [ - "foo" - ], - [ - "bar" - ], - [ - "foo" - ] - ], + "data": false, "data_pointer": "", "schema": { - "uniqueItems": true + "type": "null" }, "schema_pointer": "", "root_schema": { - "uniqueItems": true + "type": "null" }, - "type": "uniqueItems" + "type": "null" } ], [ - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], + ] + ], + [ [ ], @@ -13487,209 +13803,128 @@ ], [ { - "data": [ - { - }, - [ - 1 - ], - true, - null, - { - }, - 1 - ], + "data": 1.1, "data_pointer": "", "schema": { - "uniqueItems": true + "type": [ + "integer", + "string" + ] }, "schema_pointer": "", "root_schema": { - "uniqueItems": true + "type": [ + "integer", + "string" + ] }, - "type": "uniqueItems" + "type": "type" } - ], - [ - ], [ { - "data": [ - { - "a": 1, - "b": 2 - }, - { - "b": 2, - "a": 1 - } - ], + "data": { + }, "data_pointer": "", "schema": { - "uniqueItems": true - }, - "schema_pointer": "", + "type": [ + "integer", + "string" + ] + }, + "schema_pointer": "", "root_schema": { - "uniqueItems": true + "type": [ + "integer", + "string" + ] }, - "type": "uniqueItems" + "type": "type" } - ], - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - ], [ { "data": [ - false, - false + ], "data_pointer": "", "schema": { - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true + "type": [ + "integer", + "string" + ] }, "schema_pointer": "", "root_schema": { - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true + "type": [ + "integer", + "string" + ] }, - "type": "uniqueItems" + "type": "type" } ], [ { - "data": [ - true, - true - ], + "data": true, "data_pointer": "", "schema": { - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true + "type": [ + "integer", + "string" + ] }, "schema_pointer": "", "root_schema": { - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true + "type": [ + "integer", + "string" + ] }, - "type": "uniqueItems" + "type": "type" } - ], - [ - - ], - [ - ], [ { - "data": [ - false, - true, - "foo", - "foo" - ], + "data": null, "data_pointer": "", "schema": { - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true + "type": [ + "integer", + "string" + ] }, "schema_pointer": "", "root_schema": { - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true + "type": [ + "integer", + "string" + ] }, - "type": "uniqueItems" + "type": "type" } + ] + ], + [ + [ + ], [ { - "data": [ - true, - false, - "foo", - "foo" - ], + "data": 123, "data_pointer": "", "schema": { - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true + "type": [ + "string" + ] }, "schema_pointer": "", "root_schema": { - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true + "type": [ + "string" + ] }, - "type": "uniqueItems" + "type": "type" } ] ], @@ -13702,93 +13937,62 @@ ], [ { - "data": [ - false, - false - ], + "data": 123, "data_pointer": "", "schema": { - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true, - "additionalItems": false + "type": [ + "array", + "object" + ] }, "schema_pointer": "", "root_schema": { - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true, - "additionalItems": false + "type": [ + "array", + "object" + ] }, - "type": "uniqueItems" + "type": "type" } ], [ { - "data": [ - true, - true - ], + "data": "foo", "data_pointer": "", "schema": { - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true, - "additionalItems": false + "type": [ + "array", + "object" + ] }, "schema_pointer": "", "root_schema": { - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true, - "additionalItems": false + "type": [ + "array", + "object" + ] }, - "type": "uniqueItems" + "type": "type" } ], [ { "data": null, - "data_pointer": "/2", - "schema": false, - "schema_pointer": "/additionalItems", + "data_pointer": "", + "schema": { + "type": [ + "array", + "object" + ] + }, + "schema_pointer": "", "root_schema": { - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } - ], - "uniqueItems": true, - "additionalItems": false + "type": [ + "array", + "object" + ] }, - "type": "schema" + "type": "type" } ] ], @@ -13803,19 +14007,108 @@ ], [ - + { + "data": 123, + "data_pointer": "", + "schema": { + "type": [ + "array", + "object", + "null" + ] + }, + "schema_pointer": "", + "root_schema": { + "type": [ + "array", + "object", + "null" + ] + }, + "type": "type" + } ], + [ + { + "data": "foo", + "data_pointer": "", + "schema": { + "type": [ + "array", + "object", + "null" + ] + }, + "schema_pointer": "", + "root_schema": { + "type": [ + "array", + "object", + "null" + ] + }, + "type": "type" + } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft6/uniqueItems.json": [ + [ [ ], [ - + { + "data": [ + 1, + 1 + ], + "data_pointer": "", + "schema": { + "uniqueItems": true + }, + "schema_pointer": "", + "root_schema": { + "uniqueItems": true + }, + "type": "uniqueItems" + } ], [ - + { + "data": [ + 1, + 2, + 1 + ], + "data_pointer": "", + "schema": { + "uniqueItems": true + }, + "schema_pointer": "", + "root_schema": { + "uniqueItems": true + }, + "type": "uniqueItems" + } ], [ - + { + "data": [ + 1.0, + 1.0, + 1 + ], + "data_pointer": "", + "schema": { + "uniqueItems": true + }, + "schema_pointer": "", + "root_schema": { + "uniqueItems": true + }, + "type": "uniqueItems" + } ], [ @@ -13827,33 +14120,149 @@ ], [ - + { + "data": [ + "foo", + "bar", + "foo" + ], + "data_pointer": "", + "schema": { + "uniqueItems": true + }, + "schema_pointer": "", + "root_schema": { + "uniqueItems": true + }, + "type": "uniqueItems" + } ], [ ], [ - + { + "data": [ + { + "foo": "bar" + }, + { + "foo": "bar" + } + ], + "data_pointer": "", + "schema": { + "uniqueItems": true + }, + "schema_pointer": "", + "root_schema": { + "uniqueItems": true + }, + "type": "uniqueItems" + } ], [ - - ] - ], - [ + { + "data": [ + { + "foo": "bar", + "bar": "foo" + }, + { + "bar": "foo", + "foo": "bar" + } + ], + "data_pointer": "", + "schema": { + "uniqueItems": true + }, + "schema_pointer": "", + "root_schema": { + "uniqueItems": true + }, + "type": "uniqueItems" + } + ], [ ], [ - + { + "data": [ + { + "foo": { + "bar": { + "baz": true + } + } + }, + { + "foo": { + "bar": { + "baz": true + } + } + } + ], + "data_pointer": "", + "schema": { + "uniqueItems": true + }, + "schema_pointer": "", + "root_schema": { + "uniqueItems": true + }, + "type": "uniqueItems" + } ], [ ], [ - + { + "data": [ + [ + "foo" + ], + [ + "foo" + ] + ], + "data_pointer": "", + "schema": { + "uniqueItems": true + }, + "schema_pointer": "", + "root_schema": { + "uniqueItems": true + }, + "type": "uniqueItems" + } ], [ - + { + "data": [ + [ + "foo" + ], + [ + "bar" + ], + [ + "foo" + ] + ], + "data_pointer": "", + "schema": { + "uniqueItems": true + }, + "schema_pointer": "", + "root_schema": { + "uniqueItems": true + }, + "type": "uniqueItems" + } ], [ @@ -13863,9 +14272,7 @@ ], [ - ] - ], - [ + ], [ ], @@ -13880,352 +14287,416 @@ ], [ { - "data": null, - "data_pointer": "/2", - "schema": false, - "schema_pointer": "/additionalItems", - "root_schema": { - "items": [ - { - "type": "boolean" - }, - { - "type": "boolean" - } + "data": [ + { + }, + [ + 1 ], - "uniqueItems": false, - "additionalItems": false + true, + null, + { + }, + 1 + ], + "data_pointer": "", + "schema": { + "uniqueItems": true }, - "type": "schema" + "schema_pointer": "", + "root_schema": { + "uniqueItems": true + }, + "type": "uniqueItems" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft6/unknownKeyword.json": [ - [ + ], [ ], [ { - "data": null, + "data": [ + { + "a": 1, + "b": 2 + }, + { + "b": 2, + "a": 1 + } + ], "data_pointer": "", "schema": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } + "uniqueItems": true }, - "schema_pointer": "/definitions/id_in_unknown0", + "schema_pointer": "", "root_schema": { - "definitions": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/definitions/id_in_unknown0" - }, - { - "$ref": "#/definitions/id_in_unknown1" - }, - { - "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" - } - ] + "uniqueItems": true }, - "type": "not" - }, + "type": "uniqueItems" + } + ], + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + + ], + [ { - "data": null, + "data": [ + false, + false + ], "data_pointer": "", "schema": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } + "items": [ + { + "type": "boolean" + }, + { + "type": "boolean" } - } + ], + "uniqueItems": true }, - "schema_pointer": "/definitions/id_in_unknown1", + "schema_pointer": "", "root_schema": { - "definitions": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/definitions/id_in_unknown0" - }, + "items": [ { - "$ref": "#/definitions/id_in_unknown1" + "type": "boolean" }, { - "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" + "type": "boolean" } - ] + ], + "uniqueItems": true }, - "type": "not" - }, + "type": "uniqueItems" + } + ], + [ { - "data": null, + "data": [ + true, + true + ], "data_pointer": "", "schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" - }, - "schema_pointer": "/definitions/real_id_in_schema", - "root_schema": { - "definitions": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ + "items": [ { - "$ref": "#/definitions/id_in_unknown0" + "type": "boolean" }, { - "$ref": "#/definitions/id_in_unknown1" + "type": "boolean" + } + ], + "uniqueItems": true + }, + "schema_pointer": "", + "root_schema": { + "items": [ + { + "type": "boolean" }, { - "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" + "type": "boolean" } - ] + ], + "uniqueItems": true }, - "type": "string" + "type": "uniqueItems" } + ], + [ + + ], + [ + ], [ { - "data": 1, + "data": [ + false, + true, + "foo", + "foo" + ], "data_pointer": "", "schema": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "schema_pointer": "/definitions/id_in_unknown0", - "root_schema": { - "definitions": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ + "items": [ { - "$ref": "#/definitions/id_in_unknown0" + "type": "boolean" }, { - "$ref": "#/definitions/id_in_unknown1" + "type": "boolean" + } + ], + "uniqueItems": true + }, + "schema_pointer": "", + "root_schema": { + "items": [ + { + "type": "boolean" }, { - "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" + "type": "boolean" } - ] + ], + "uniqueItems": true }, - "type": "not" - }, + "type": "uniqueItems" + } + ], + [ { - "data": 1, + "data": [ + true, + false, + "foo", + "foo" + ], "data_pointer": "", "schema": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } + "items": [ + { + "type": "boolean" + }, + { + "type": "boolean" } - } + ], + "uniqueItems": true }, - "schema_pointer": "/definitions/id_in_unknown1", + "schema_pointer": "", "root_schema": { - "definitions": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" + "items": [ + { + "type": "boolean" }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } + { + "type": "boolean" } - }, - "anyOf": [ + ], + "uniqueItems": true + }, + "type": "uniqueItems" + } + ] + ], + [ + [ + + ], + [ + + ], + [ + { + "data": [ + false, + false + ], + "data_pointer": "", + "schema": { + "items": [ { - "$ref": "#/definitions/id_in_unknown0" + "type": "boolean" }, { - "$ref": "#/definitions/id_in_unknown1" + "type": "boolean" + } + ], + "uniqueItems": true, + "additionalItems": false + }, + "schema_pointer": "", + "root_schema": { + "items": [ + { + "type": "boolean" }, { - "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" + "type": "boolean" } - ] + ], + "uniqueItems": true, + "additionalItems": false }, - "type": "not" - }, + "type": "uniqueItems" + } + ], + [ { - "data": 1, + "data": [ + true, + true + ], "data_pointer": "", "schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" + "items": [ + { + "type": "boolean" + }, + { + "type": "boolean" + } + ], + "uniqueItems": true, + "additionalItems": false }, - "schema_pointer": "/definitions/real_id_in_schema", + "schema_pointer": "", "root_schema": { - "definitions": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" + "items": [ + { + "type": "boolean" }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } + { + "type": "boolean" } - }, - "anyOf": [ + ], + "uniqueItems": true, + "additionalItems": false + }, + "type": "uniqueItems" + } + ], + [ + { + "data": null, + "data_pointer": "/2", + "schema": false, + "schema_pointer": "/additionalItems", + "root_schema": { + "items": [ { - "$ref": "#/definitions/id_in_unknown0" + "type": "boolean" }, { - "$ref": "#/definitions/id_in_unknown1" + "type": "boolean" + } + ], + "uniqueItems": true, + "additionalItems": false + }, + "type": "schema" + } + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + { + "data": null, + "data_pointer": "/2", + "schema": false, + "schema_pointer": "/additionalItems", + "root_schema": { + "items": [ + { + "type": "boolean" }, { - "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" + "type": "boolean" } - ] + ], + "uniqueItems": false, + "additionalItems": false }, - "type": "string" + "type": "schema" } ] ] diff --git a/test/fixtures/draft7.json b/test/fixtures/draft7.json index 6c8092e..b2255c6 100644 --- a/test/fixtures/draft7.json +++ b/test/fixtures/draft7.json @@ -4209,6 +4209,59 @@ [ [ + ], + [ + { + "data": [ + 0 + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + false + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + false + ] + ] + }, + "type": "enum" + } + ], + [ + { + "data": [ + 0.0 + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + false + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + false + ] + ] + }, + "type": "enum" + } + ] + ], + [ + [ + ], [ { @@ -4247,6 +4300,59 @@ } ] ], + [ + [ + + ], + [ + { + "data": [ + 1 + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + true + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + true + ] + ] + }, + "type": "enum" + } + ], + [ + { + "data": [ + 1.0 + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + true + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + true + ] + ] + }, + "type": "enum" + } + ] + ], [ [ { @@ -4273,6 +4379,38 @@ ] ], + [ + [ + { + "data": [ + false + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + 0 + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + 0 + ] + ] + }, + "type": "enum" + } + ], + [ + + ], + [ + + ] + ], [ [ { @@ -4299,6 +4437,38 @@ ] ], + [ + [ + { + "data": [ + true + ], + "data_pointer": "", + "schema": { + "enum": [ + [ + 1 + ] + ] + }, + "schema_pointer": "", + "root_schema": { + "enum": [ + [ + 1 + ] + ] + }, + "type": "enum" + } + ], + [ + + ], + [ + + ] + ], [ [ @@ -4741,237 +4911,73 @@ ] ] ], - "JSON-Schema-Test-Suite/tests/draft7/id.json": [ + "JSON-Schema-Test-Suite/tests/draft7/if-then-else.json": [ + [ + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + + ] + ], [ [ ], [ + ] + ], + [ + [ + ], [ { - "data": 1, + "data": -100, "data_pointer": "", "schema": { - "enum": [ - { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "null" - } - ] + "minimum": -10 }, - "schema_pointer": "/definitions/id_in_enum", + "schema_pointer": "/then", "root_schema": { - "definitions": { - "id_in_enum": { - "enum": [ - { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "null" - } - ] - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "string" - }, - "zzz_id_in_const": { - "const": { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "null" - } - } + "if": { + "exclusiveMaximum": 0 }, - "anyOf": [ - { - "$ref": "#/definitions/id_in_enum" - }, - { - "$ref": "https://localhost:1234/id/my_identifier.json" - } - ] + "then": { + "minimum": -10 + } }, - "type": "enum" - }, + "type": "minimum" + } + ], + [ + + ] + ], + [ + [ + + ], + [ + + ], + [ { - "data": 1, + "data": 3, "data_pointer": "", "schema": { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "string" + "multipleOf": 2 }, - "schema_pointer": "/definitions/real_id_in_schema", - "root_schema": { - "definitions": { - "id_in_enum": { - "enum": [ - { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "null" - } - ] - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "string" - }, - "zzz_id_in_const": { - "const": { - "$id": "https://localhost:1234/id/my_identifier.json", - "type": "null" - } - } - }, - "anyOf": [ - { - "$ref": "#/definitions/id_in_enum" - }, - { - "$ref": "https://localhost:1234/id/my_identifier.json" - } - ] - }, - "type": "string" - } - ] - ], - [ - [ - - ], - [ - { - "data": 1, - "data_pointer": "", - "schema": { - "const": { - "$id": "#not_a_real_anchor" - } - }, - "schema_pointer": "/definitions/const_not_anchor", - "root_schema": { - "definitions": { - "const_not_anchor": { - "const": { - "$id": "#not_a_real_anchor" - } - } - }, - "if": { - "const": "skip not_a_real_anchor" - }, - "then": true, - "else": { - "$ref": "#/definitions/const_not_anchor" - } - }, - "type": "const" - } - ] - ], - [ - [ - - ], - [ - { - "data": 1, - "data_pointer": "", - "schema": { - "const": { - "$id": "not_a_real_id" - } - }, - "schema_pointer": "/definitions/const_not_id", - "root_schema": { - "definitions": { - "const_not_id": { - "const": { - "$id": "not_a_real_id" - } - } - }, - "if": { - "const": "skip not_a_real_id" - }, - "then": true, - "else": { - "$ref": "#/definitions/const_not_id" - } - }, - "type": "const" - } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft7/if-then-else.json": [ - [ - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - { - "data": -100, - "data_pointer": "", - "schema": { - "minimum": -10 - }, - "schema_pointer": "/then", - "root_schema": { - "if": { - "exclusiveMaximum": 0 - }, - "then": { - "minimum": -10 - } - }, - "type": "minimum" - } - ], - [ - - ] - ], - [ - [ - - ], - [ - - ], - [ - { - "data": 3, - "data_pointer": "", - "schema": { - "multipleOf": 2 - }, - "schema_pointer": "/else", + "schema_pointer": "/else", "root_schema": { "if": { "exclusiveMaximum": 0 @@ -6495,443 +6501,345 @@ [ [ { - "data": "foo", + "data": 1, "data_pointer": "", "schema": { - "not": true + "not": { + } }, "schema_pointer": "", "root_schema": { - "not": true + "not": { + } }, "type": "not" } - ] - ], - [ - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft7/oneOf.json": [ - [ - [ - - ], - [ - ], [ { - "data": 3, + "data": "foo", "data_pointer": "", "schema": { - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, - "type": "oneOf" + "type": "not" } ], [ { - "data": 1.5, + "data": true, "data_pointer": "", "schema": { - "type": "integer" + "not": { + } }, - "schema_pointer": "/oneOf/0", + "schema_pointer": "", "root_schema": { - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, - "type": "integer" - }, + "type": "not" + } + ], + [ { - "data": 1.5, + "data": false, "data_pointer": "", "schema": { - "minimum": 2 + "not": { + } }, - "schema_pointer": "/oneOf/1", + "schema_pointer": "", "root_schema": { - "oneOf": [ - { - "type": "integer" - }, - { - "minimum": 2 - } - ] + "not": { + } }, - "type": "minimum" + "type": "not" } - ] - ], - [ + ], [ { - "data": 3, + "data": null, "data_pointer": "", "schema": { - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, - "type": "oneOf" - }, + "type": "not" + } + ], + [ { - "data": 3, + "data": { + "foo": "bar" + }, "data_pointer": "", "schema": { - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, - "type": "string" + "type": "not" } - ], - [ - ], [ { - "data": "foo", + "data": { + }, "data_pointer": "", "schema": { - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, "schema_pointer": "", "root_schema": { - "type": "string", - "oneOf": [ - { - "minLength": 2 - }, - { - "maxLength": 4 - } - ] + "not": { + } }, - "type": "oneOf" + "type": "not" } - ] - ], - [ + ], [ { - "data": "foo", + "data": [ + "foo" + ], "data_pointer": "", "schema": { - "oneOf": [ - true, - true, - true - ] + "not": { + } }, "schema_pointer": "", "root_schema": { - "oneOf": [ - true, - true, - true - ] + "not": { + } }, - "type": "oneOf" + "type": "not" } - ] - ], - [ + ], [ + { + "data": [ + ], + "data_pointer": "", + "schema": { + "not": { + } + }, + "schema_pointer": "", + "root_schema": { + "not": { + } + }, + "type": "not" + } ] ], [ [ { - "data": "foo", + "data": 1, "data_pointer": "", "schema": { - "oneOf": [ - true, - true, - false - ] + "not": true }, "schema_pointer": "", "root_schema": { - "oneOf": [ - true, - true, - false - ] + "not": true }, - "type": "oneOf" + "type": "not" } - ] - ], - [ + ], [ { "data": "foo", "data_pointer": "", - "schema": false, - "schema_pointer": "/oneOf/0", + "schema": { + "not": true + }, + "schema_pointer": "", "root_schema": { - "oneOf": [ - false, - false, - false - ] + "not": true }, - "type": "schema" - }, + "type": "not" + } + ], + [ { - "data": "foo", + "data": true, "data_pointer": "", - "schema": false, - "schema_pointer": "/oneOf/1", + "schema": { + "not": true + }, + "schema_pointer": "", "root_schema": { - "oneOf": [ - false, - false, - false - ] + "not": true }, - "type": "schema" - }, + "type": "not" + } + ], + [ { - "data": "foo", + "data": false, "data_pointer": "", - "schema": false, - "schema_pointer": "/oneOf/2", + "schema": { + "not": true + }, + "schema_pointer": "", "root_schema": { - "oneOf": [ - false, - false, - false - ] + "not": true }, - "type": "schema" + "type": "not" } - ] - ], - [ - [ - ], [ - + { + "data": null, + "data_pointer": "", + "schema": { + "not": true + }, + "schema_pointer": "", + "root_schema": { + "not": true + }, + "type": "not" + } ], [ { "data": { - "foo": "baz", - "bar": 2 + "foo": "bar" }, "data_pointer": "", "schema": { - "oneOf": [ - { - "properties": { - "bar": { - "type": "integer" - } - }, - "required": [ - "bar" - ] - }, - { - "properties": { - "foo": { - "type": "string" - } - }, - "required": [ - "foo" - ] - } - ] + "not": true }, "schema_pointer": "", "root_schema": { - "oneOf": [ - { - "properties": { - "bar": { - "type": "integer" - } - }, - "required": [ - "bar" - ] - }, - { - "properties": { - "foo": { - "type": "string" - } - }, - "required": [ - "foo" - ] - } - ] + "not": true }, - "type": "oneOf" + "type": "not" } ], [ { - "data": "quux", - "data_pointer": "/bar", + "data": { + }, + "data_pointer": "", "schema": { - "type": "integer" + "not": true }, - "schema_pointer": "/oneOf/0/properties/bar", + "schema_pointer": "", "root_schema": { - "oneOf": [ - { - "properties": { - "bar": { - "type": "integer" - } - }, - "required": [ - "bar" - ] - }, - { - "properties": { - "foo": { - "type": "string" - } - }, - "required": [ - "foo" - ] - } - ] + "not": true }, - "type": "integer" - }, + "type": "not" + } + ], + [ { - "data": 2, - "data_pointer": "/foo", + "data": [ + "foo" + ], + "data_pointer": "", "schema": { - "type": "string" + "not": true }, - "schema_pointer": "/oneOf/1/properties/foo", + "schema_pointer": "", "root_schema": { - "oneOf": [ - { - "properties": { - "bar": { - "type": "integer" - } - }, - "required": [ - "bar" - ] - }, - { - "properties": { - "foo": { - "type": "string" - } - }, - "required": [ - "foo" - ] - } - ] + "not": true }, - "type": "string" + "type": "not" + } + ], + [ + { + "data": [ + + ], + "data_pointer": "", + "schema": { + "not": true + }, + "schema_pointer": "", + "root_schema": { + "not": true + }, + "type": "not" } ] ], [ [ + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft7/oneOf.json": [ + [ + [ + + ], + [ + ], [ { - "data": 123, + "data": 3, "data_pointer": "", "schema": { "oneOf": [ { - "type": "number" + "type": "integer" }, { + "minimum": 2 } ] }, @@ -6939,147 +6847,251 @@ "root_schema": { "oneOf": [ { - "type": "number" + "type": "integer" }, { + "minimum": 2 } ] }, "type": "oneOf" } - ] - ], - [ + ], [ { - "data": { - "bar": 2 - }, + "data": 1.5, "data_pointer": "", "schema": { - "required": [ - "foo", - "bar" - ] + "type": "integer" }, "schema_pointer": "/oneOf/0", "root_schema": { - "type": "object", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "type": "integer" }, { - "required": [ - "foo", - "baz" - ] + "minimum": 2 } ] }, - "type": "required", - "details": { - "missing_keys": [ - "foo" - ] - } + "type": "integer" }, { - "data": { - "bar": 2 - }, + "data": 1.5, "data_pointer": "", "schema": { - "required": [ - "foo", - "baz" - ] + "minimum": 2 }, "schema_pointer": "/oneOf/1", "root_schema": { - "type": "object", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "type": "integer" }, { - "required": [ - "foo", - "baz" - ] + "minimum": 2 } ] }, - "type": "required", - "details": { - "missing_keys": [ - "foo", - "baz" - ] - } + "type": "minimum" } - ], - [ - - ], - [ - - ], + ] + ], + [ [ { - "data": { - "foo": 1, - "bar": 2, - "baz": 3 - }, + "data": 3, "data_pointer": "", "schema": { - "type": "object", + "type": "string", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "minLength": 2 }, { - "required": [ - "foo", - "baz" - ] + "maxLength": 4 } ] }, "schema_pointer": "", "root_schema": { - "type": "object", + "type": "string", "oneOf": [ { - "required": [ - "foo", - "bar" - ] + "minLength": 2 }, { - "required": [ - "foo", - "baz" - ] + "maxLength": 4 } ] }, "type": "oneOf" - } - ] - ], - [ - [ + }, + { + "data": 3, + "data_pointer": "", + "schema": { + "type": "string", + "oneOf": [ + { + "minLength": 2 + }, + { + "maxLength": 4 + } + ] + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "oneOf": [ + { + "minLength": 2 + }, + { + "maxLength": 4 + } + ] + }, + "type": "string" + } + ], + [ + + ], + [ + { + "data": "foo", + "data_pointer": "", + "schema": { + "type": "string", + "oneOf": [ + { + "minLength": 2 + }, + { + "maxLength": 4 + } + ] + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "oneOf": [ + { + "minLength": 2 + }, + { + "maxLength": 4 + } + ] + }, + "type": "oneOf" + } + ] + ], + [ + [ + { + "data": "foo", + "data_pointer": "", + "schema": { + "oneOf": [ + true, + true, + true + ] + }, + "schema_pointer": "", + "root_schema": { + "oneOf": [ + true, + true, + true + ] + }, + "type": "oneOf" + } + ] + ], + [ + [ + + ] + ], + [ + [ + { + "data": "foo", + "data_pointer": "", + "schema": { + "oneOf": [ + true, + true, + false + ] + }, + "schema_pointer": "", + "root_schema": { + "oneOf": [ + true, + true, + false + ] + }, + "type": "oneOf" + } + ] + ], + [ + [ + { + "data": "foo", + "data_pointer": "", + "schema": false, + "schema_pointer": "/oneOf/0", + "root_schema": { + "oneOf": [ + false, + false, + false + ] + }, + "type": "schema" + }, + { + "data": "foo", + "data_pointer": "", + "schema": false, + "schema_pointer": "/oneOf/1", + "root_schema": { + "oneOf": [ + false, + false, + false + ] + }, + "type": "schema" + }, + { + "data": "foo", + "data_pointer": "", + "schema": false, + "schema_pointer": "/oneOf/2", + "root_schema": { + "oneOf": [ + false, + false, + false + ] + }, + "type": "schema" + } + ] + ], + [ + [ ], [ @@ -7088,16 +7100,17 @@ [ { "data": { - "foo": "foo", - "bar": 8 + "foo": "baz", + "bar": 2 }, "data_pointer": "", "schema": { "oneOf": [ { "properties": { - "bar": true, - "baz": true + "bar": { + "type": "integer" + } }, "required": [ "bar" @@ -7105,7 +7118,9 @@ }, { "properties": { - "foo": true + "foo": { + "type": "string" + } }, "required": [ "foo" @@ -7118,8 +7133,9 @@ "oneOf": [ { "properties": { - "bar": true, - "baz": true + "bar": { + "type": "integer" + } }, "required": [ "bar" @@ -7127,7 +7143,9 @@ }, { "properties": { - "foo": true + "foo": { + "type": "string" + } }, "required": [ "foo" @@ -7140,26 +7158,19 @@ ], [ { - "data": { - "baz": "quux" - }, - "data_pointer": "", + "data": "quux", + "data_pointer": "/bar", "schema": { - "properties": { - "bar": true, - "baz": true - }, - "required": [ - "bar" - ] + "type": "integer" }, - "schema_pointer": "/oneOf/0", + "schema_pointer": "/oneOf/0/properties/bar", "root_schema": { "oneOf": [ { "properties": { - "bar": true, - "baz": true + "bar": { + "type": "integer" + } }, "required": [ "bar" @@ -7167,7 +7178,9 @@ }, { "properties": { - "foo": true + "foo": { + "type": "string" + } }, "required": [ "foo" @@ -7175,33 +7188,22 @@ } ] }, - "type": "required", - "details": { - "missing_keys": [ - "bar" - ] - } + "type": "integer" }, { - "data": { - "baz": "quux" - }, - "data_pointer": "", + "data": 2, + "data_pointer": "/foo", "schema": { - "properties": { - "foo": true - }, - "required": [ - "foo" - ] + "type": "string" }, - "schema_pointer": "/oneOf/1", + "schema_pointer": "/oneOf/1/properties/foo", "root_schema": { "oneOf": [ { "properties": { - "bar": true, - "baz": true + "bar": { + "type": "integer" + } }, "required": [ "bar" @@ -7209,7 +7211,9 @@ }, { "properties": { - "foo": true + "foo": { + "type": "string" + } }, "required": [ "foo" @@ -7217,12 +7221,7 @@ } ] }, - "type": "required", - "details": { - "missing_keys": [ - "foo" - ] - } + "type": "string" } ] ], @@ -7235,239 +7234,337 @@ "data": 123, "data_pointer": "", "schema": { - "type": "null" - }, - "schema_pointer": "/oneOf/0/oneOf/0", - "root_schema": { "oneOf": [ { - "oneOf": [ - { - "type": "null" - } - ] + "type": "number" + }, + { } ] }, - "type": "null" - } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft7/optional/bignum.json": [ - [ - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - - ] - ], - [ - [ - { - "data": 98249283749234923498293171823948729348710298301928331, - "data_pointer": "", - "schema": { - "type": "string" - }, "schema_pointer": "", "root_schema": { - "type": "string" + "oneOf": [ + { + "type": "number" + }, + { + } + ] }, - "type": "string" + "type": "oneOf" } ] ], - [ - [ - - ] - ], [ [ { - "data": 9.727837981879871e+26, - "data_pointer": "", - "schema": { - "exclusiveMaximum": 9.727837981879871e+26 - }, - "schema_pointer": "", - "root_schema": { - "exclusiveMaximum": 9.727837981879871e+26 + "data": { + "bar": 2 }, - "type": "exclusiveMaximum" - } - ] - ], - [ - [ - - ] - ], - [ - [ - { - "data": -9.727837981879871e+26, "data_pointer": "", "schema": { - "exclusiveMinimum": -9.727837981879871e+26 + "required": [ + "foo", + "bar" + ] }, - "schema_pointer": "", + "schema_pointer": "/oneOf/0", "root_schema": { - "exclusiveMinimum": -9.727837981879871e+26 + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } + ] }, - "type": "exclusiveMinimum" - } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft7/optional/content.json": [ - [ - [ - - ], - [ + "type": "required", + "details": { + "missing_keys": [ + "foo" + ] + } + }, { - "data": "{:}", + "data": { + "bar": 2 + }, "data_pointer": "", "schema": { - "contentMediaType": "application/json" + "required": [ + "foo", + "baz" + ] }, - "schema_pointer": "", + "schema_pointer": "/oneOf/1", "root_schema": { - "contentMediaType": "application/json" + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } + ] }, - "type": "contentMediaType" + "type": "required", + "details": { + "missing_keys": [ + "foo", + "baz" + ] + } } ], [ - ] - ], - [ + ], [ ], [ { - "data": "eyJmb28iOi%iYmFyIn0K", + "data": { + "foo": 1, + "bar": 2, + "baz": 3 + }, "data_pointer": "", "schema": { - "contentEncoding": "base64" + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } + ] }, "schema_pointer": "", "root_schema": { - "contentEncoding": "base64" + "type": "object", + "oneOf": [ + { + "required": [ + "foo", + "bar" + ] + }, + { + "required": [ + "foo", + "baz" + ] + } + ] }, - "type": "contentEncoding" + "type": "oneOf" } - ], - [ - ] ], [ [ + ], + [ + ], [ { - "data": "ezp9Cg==", + "data": { + "foo": "foo", + "bar": 8 + }, "data_pointer": "", "schema": { - "contentMediaType": "application/json", - "contentEncoding": "base64" + "oneOf": [ + { + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": true + }, + "required": [ + "foo" + ] + } + ] }, "schema_pointer": "", "root_schema": { - "contentMediaType": "application/json", - "contentEncoding": "base64" + "oneOf": [ + { + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": true + }, + "required": [ + "foo" + ] + } + ] }, - "type": "contentMediaType" + "type": "oneOf" } ], [ { - "data": "{}", + "data": { + "baz": "quux" + }, "data_pointer": "", "schema": { - "contentMediaType": "application/json", - "contentEncoding": "base64" - }, - "schema_pointer": "", + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + "schema_pointer": "/oneOf/0", "root_schema": { - "contentMediaType": "application/json", - "contentEncoding": "base64" + "oneOf": [ + { + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": true + }, + "required": [ + "foo" + ] + } + ] }, - "type": "contentEncoding" - } - ], - [ - - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft7/optional/cross-draft.json": [ - [ - [ + "type": "required", + "details": { + "missing_keys": [ + "bar" + ] + } + }, { "data": { - "foo": "any value" + "baz": "quux" }, - "data_pointer": "/foo", + "data_pointer": "", "schema": { - "$id": "http://localhost:1234/draft2019-09/dependentRequired.json", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependentRequired": { - "foo": [ - "bar" - ] - } + "properties": { + "foo": true + }, + "required": [ + "foo" + ] }, - "schema_pointer": "", + "schema_pointer": "/oneOf/1", "root_schema": { - "$id": "http://localhost:1234/draft2019-09/dependentRequired.json", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "dependentRequired": { - "foo": [ - "bar" - ] - } + "oneOf": [ + { + "properties": { + "bar": true, + "baz": true + }, + "required": [ + "bar" + ] + }, + { + "properties": { + "foo": true + }, + "required": [ + "foo" + ] + } + ] }, - "type": "dependentRequired" + "type": "required", + "details": { + "missing_keys": [ + "foo" + ] + } } - ], - [ - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft7/optional/ecmascript-regex.json": [ + ], [ + [ + + ], [ { - "data": "abc\\n", + "data": 123, "data_pointer": "", "schema": { - "type": "string", - "pattern": "^abc$" + "type": "null" }, - "schema_pointer": "", + "schema_pointer": "/oneOf/0/oneOf/0", "root_schema": { - "type": "string", - "pattern": "^abc$" + "oneOf": [ + { + "oneOf": [ + { + "type": "null" + } + ] + } + ] }, - "type": "pattern" + "type": "null" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft7/optional/bignum.json": [ + [ + [ + ], [ @@ -7475,20 +7572,7 @@ ], [ [ - { - "data": "\\t", - "data_pointer": "", - "schema": { - "type": "string", - "pattern": "^\\t$" - }, - "schema_pointer": "", - "root_schema": { - "type": "string", - "pattern": "^\\t$" - }, - "type": "pattern" - } + ], [ @@ -7497,20 +7581,20 @@ [ [ { - "data": "\\cC", + "data": 98249283749234923498293171823948729348710298301928331, "data_pointer": "", "schema": { - "type": "string", - "pattern": "^\\cC$" + "type": "string" }, "schema_pointer": "", "root_schema": { - "type": "string", - "pattern": "^\\cC$" + "type": "string" }, - "type": "pattern" + "type": "string" } - ], + ] + ], + [ [ ] @@ -7518,83 +7602,84 @@ [ [ { - "data": "\\cc", + "data": 9.727837981879871e+26, "data_pointer": "", "schema": { - "type": "string", - "pattern": "^\\cc$" + "exclusiveMaximum": 9.727837981879871e+26 }, "schema_pointer": "", "root_schema": { - "type": "string", - "pattern": "^\\cc$" + "exclusiveMaximum": 9.727837981879871e+26 }, - "type": "pattern" + "type": "exclusiveMaximum" } - ], - [ - ] ], [ [ - ], + ] + ], + [ [ { - "data": "߀", + "data": -9.727837981879871e+26, "data_pointer": "", "schema": { - "type": "string", - "pattern": "^\\d$" + "exclusiveMinimum": -9.727837981879871e+26 }, "schema_pointer": "", "root_schema": { - "type": "string", - "pattern": "^\\d$" + "exclusiveMinimum": -9.727837981879871e+26 }, - "type": "pattern" + "type": "exclusiveMinimum" } + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft7/optional/content.json": [ + [ + [ + ], [ { - "data": "߀", + "data": "{:}", "data_pointer": "", "schema": { - "type": "string", - "pattern": "^\\d$" + "contentMediaType": "application/json" }, "schema_pointer": "", "root_schema": { - "type": "string", - "pattern": "^\\d$" + "contentMediaType": "application/json" }, - "type": "pattern" + "type": "contentMediaType" } + ], + [ + ] ], [ + [ + + ], [ { - "data": "0", + "data": "eyJmb28iOi%iYmFyIn0K", "data_pointer": "", "schema": { - "type": "string", - "pattern": "^\\D$" + "contentEncoding": "base64" }, "schema_pointer": "", "root_schema": { - "type": "string", - "pattern": "^\\D$" + "contentEncoding": "base64" }, - "type": "pattern" + "type": "contentEncoding" } ], [ - ], - [ - ] ], [ @@ -7603,34 +7688,256 @@ ], [ { - "data": "é", + "data": "ezp9Cg==", "data_pointer": "", "schema": { - "type": "string", - "pattern": "^\\w$" + "contentMediaType": "application/json", + "contentEncoding": "base64" }, "schema_pointer": "", "root_schema": { - "type": "string", - "pattern": "^\\w$" + "contentMediaType": "application/json", + "contentEncoding": "base64" }, - "type": "pattern" + "type": "contentMediaType" } - ] - ], - [ + ], [ { - "data": "a", + "data": "{}", "data_pointer": "", "schema": { - "type": "string", - "pattern": "^\\W$" + "contentMediaType": "application/json", + "contentEncoding": "base64" }, "schema_pointer": "", "root_schema": { - "type": "string", - "pattern": "^\\W$" + "contentMediaType": "application/json", + "contentEncoding": "base64" + }, + "type": "contentEncoding" + } + ], + [ + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft7/optional/cross-draft.json": [ + [ + [ + { + "data": { + "foo": "any value" + }, + "data_pointer": "/foo", + "schema": { + "$id": "http://localhost:1234/draft2019-09/dependentRequired.json", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "dependentRequired": { + "foo": [ + "bar" + ] + } + }, + "schema_pointer": "", + "root_schema": { + "$id": "http://localhost:1234/draft2019-09/dependentRequired.json", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "dependentRequired": { + "foo": [ + "bar" + ] + } + }, + "type": "dependentRequired" + } + ], + [ + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft7/optional/ecmascript-regex.json": [ + [ + [ + { + "data": "abc\\n", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^abc$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^abc$" + }, + "type": "pattern" + } + ], + [ + + ] + ], + [ + [ + { + "data": "\\t", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\t$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\t$" + }, + "type": "pattern" + } + ], + [ + + ] + ], + [ + [ + { + "data": "\\cC", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\cC$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\cC$" + }, + "type": "pattern" + } + ], + [ + + ] + ], + [ + [ + { + "data": "\\cc", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\cc$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\cc$" + }, + "type": "pattern" + } + ], + [ + + ] + ], + [ + [ + + ], + [ + { + "data": "߀", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\d$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\d$" + }, + "type": "pattern" + } + ], + [ + { + "data": "߀", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\d$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\d$" + }, + "type": "pattern" + } + ] + ], + [ + [ + { + "data": "0", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\D$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\D$" + }, + "type": "pattern" + } + ], + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + { + "data": "é", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\w$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\w$" + }, + "type": "pattern" + } + ] + ], + [ + [ + { + "data": "a", + "data_pointer": "", + "schema": { + "type": "string", + "pattern": "^\\W$" + }, + "schema_pointer": "", + "root_schema": { + "type": "string", + "pattern": "^\\W$" }, "type": "pattern" } @@ -11475,74 +11782,171 @@ ] ] ], - "JSON-Schema-Test-Suite/tests/draft7/optional/non-bmp-regex.json": [ + "JSON-Schema-Test-Suite/tests/draft7/optional/id.json": [ [ [ ], [ - ], - [ - - ], - [ - { - "data": "🐉", - "data_pointer": "", - "schema": { - "pattern": "^🐲*$" - }, - "schema_pointer": "", - "root_schema": { - "pattern": "^🐲*$" - }, - "type": "pattern" - } ], [ { - "data": "🐉🐉", + "data": 1, "data_pointer": "", "schema": { - "pattern": "^🐲*$" + "enum": [ + { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "null" + } + ] }, - "schema_pointer": "", + "schema_pointer": "/definitions/id_in_enum", "root_schema": { - "pattern": "^🐲*$" - }, - "type": "pattern" + "definitions": { + "id_in_enum": { + "enum": [ + { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "null" + } + ] + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "string" + }, + "zzz_id_in_const": { + "const": { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "null" + } + } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_enum" + }, + { + "$ref": "https://localhost:1234/id/my_identifier.json" + } + ] + }, + "type": "enum" + }, + { + "data": 1, + "data_pointer": "", + "schema": { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "string" + }, + "schema_pointer": "/definitions/real_id_in_schema", + "root_schema": { + "definitions": { + "id_in_enum": { + "enum": [ + { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "null" + } + ] + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "string" + }, + "zzz_id_in_const": { + "const": { + "$id": "https://localhost:1234/id/my_identifier.json", + "type": "null" + } + } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_enum" + }, + { + "$ref": "https://localhost:1234/id/my_identifier.json" + } + ] + }, + "type": "string" } + ] + ], + [ + [ + ], [ { - "data": "D", + "data": 1, "data_pointer": "", "schema": { - "pattern": "^🐲*$" + "const": { + "$id": "#not_a_real_anchor" + } }, - "schema_pointer": "", + "schema_pointer": "/definitions/const_not_anchor", "root_schema": { - "pattern": "^🐲*$" + "definitions": { + "const_not_anchor": { + "const": { + "$id": "#not_a_real_anchor" + } + } + }, + "if": { + "const": "skip not_a_real_anchor" + }, + "then": true, + "else": { + "$ref": "#/definitions/const_not_anchor" + } }, - "type": "pattern" + "type": "const" } + ] + ], + [ + [ + ], [ { - "data": "DD", + "data": 1, "data_pointer": "", "schema": { - "pattern": "^🐲*$" + "const": { + "$id": "not_a_real_id" + } }, - "schema_pointer": "", + "schema_pointer": "/definitions/const_not_id", "root_schema": { - "pattern": "^🐲*$" + "definitions": { + "const_not_id": { + "const": { + "$id": "not_a_real_id" + } + } + }, + "if": { + "const": "skip not_a_real_id" + }, + "then": true, + "else": { + "$ref": "#/definitions/const_not_id" + } }, - "type": "pattern" + "type": "const" } ] - ], + ] + ], + "JSON-Schema-Test-Suite/tests/draft7/optional/non-bmp-regex.json": [ [ [ @@ -11555,88 +11959,65 @@ ], [ { - "data": "hello", - "data_pointer": "/🐲", + "data": "🐉", + "data_pointer": "", "schema": { - "type": "integer" + "pattern": "^🐲*$" }, - "schema_pointer": "/patternProperties/^🐲*$", + "schema_pointer": "", "root_schema": { - "patternProperties": { - "^🐲*$": { - "type": "integer" - } - } + "pattern": "^🐲*$" }, - "type": "integer" + "type": "pattern" } ], [ { - "data": "hello", - "data_pointer": "/🐲🐲", + "data": "🐉🐉", + "data_pointer": "", "schema": { - "type": "integer" + "pattern": "^🐲*$" }, - "schema_pointer": "/patternProperties/^🐲*$", + "schema_pointer": "", "root_schema": { - "patternProperties": { - "^🐲*$": { - "type": "integer" - } - } + "pattern": "^🐲*$" }, - "type": "integer" + "type": "pattern" } - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft7/pattern.json": [ - [ - [ - ], [ { - "data": "abc", + "data": "D", "data_pointer": "", "schema": { - "pattern": "^a*$" + "pattern": "^🐲*$" }, "schema_pointer": "", "root_schema": { - "pattern": "^a*$" + "pattern": "^🐲*$" }, "type": "pattern" } ], [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - - ], - [ - + { + "data": "DD", + "data_pointer": "", + "schema": { + "pattern": "^🐲*$" + }, + "schema_pointer": "", + "root_schema": { + "pattern": "^🐲*$" + }, + "type": "pattern" + } ] ], [ [ - ] - ] - ], - "JSON-Schema-Test-Suite/tests/draft7/patternProperties.json": [ - [ + ], [ ], @@ -11645,15 +12026,15 @@ ], [ { - "data": "bar", - "data_pointer": "/foo", + "data": "hello", + "data_pointer": "/🐲", "schema": { "type": "integer" }, - "schema_pointer": "/patternProperties/f.*o", + "schema_pointer": "/patternProperties/^🐲*$", "root_schema": { "patternProperties": { - "f.*o": { + "^🐲*$": { "type": "integer" } } @@ -11663,239 +12044,386 @@ ], [ { - "data": "bar", - "data_pointer": "/foo", - "schema": { - "type": "integer" - }, - "schema_pointer": "/patternProperties/f.*o", - "root_schema": { - "patternProperties": { - "f.*o": { - "type": "integer" - } - } - }, - "type": "integer" - }, - { - "data": "baz", - "data_pointer": "/foooooo", + "data": "hello", + "data_pointer": "/🐲🐲", "schema": { "type": "integer" }, - "schema_pointer": "/patternProperties/f.*o", + "schema_pointer": "/patternProperties/^🐲*$", "root_schema": { "patternProperties": { - "f.*o": { + "^🐲*$": { "type": "integer" } } }, "type": "integer" } - ], - [ - - ], - [ - - ], - [ - - ] - ], - [ - [ - - ], - [ - - ], + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft7/optional/unknownKeyword.json": [ + [ [ ], [ { - "data": "bar", - "data_pointer": "/a", + "data": null, + "data_pointer": "", "schema": { - "type": "integer" - }, - "schema_pointer": "/patternProperties/a*", - "root_schema": { - "patternProperties": { - "a*": { - "type": "integer" - }, - "aaa*": { - "maximum": 20 - } + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] } }, - "type": "integer" - } - ], - [ - { - "data": 31, - "data_pointer": "/aaaa", - "schema": { - "maximum": 20 - }, - "schema_pointer": "/patternProperties/aaa*", + "schema_pointer": "/definitions/id_in_unknown0", "root_schema": { - "patternProperties": { - "a*": { - "type": "integer" + "definitions": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "aaa*": { - "maximum": 20 + "real_id_in_schema": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } } - } - }, - "type": "maximum" - } - ], - [ - { - "data": "foo", - "data_pointer": "/aaa", - "schema": { - "type": "integer" - }, - "schema_pointer": "/patternProperties/a*", - "root_schema": { - "patternProperties": { - "a*": { - "type": "integer" + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_unknown0" }, - "aaa*": { - "maximum": 20 + { + "$ref": "#/definitions/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" } - } + ] }, - "type": "integer" + "type": "not" }, { - "data": 31, - "data_pointer": "/aaaa", + "data": null, + "data_pointer": "", "schema": { - "maximum": 20 + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } }, - "schema_pointer": "/patternProperties/aaa*", + "schema_pointer": "/definitions/id_in_unknown1", "root_schema": { - "patternProperties": { - "a*": { - "type": "integer" + "definitions": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "aaa*": { - "maximum": 20 + "real_id_in_schema": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } } - } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_unknown0" + }, + { + "$ref": "#/definitions/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" + } + ] }, - "type": "maximum" - } - ] - ], - [ - [ - - ], - [ + "type": "not" + }, { "data": null, - "data_pointer": "/a31b", + "data_pointer": "", "schema": { - "type": "boolean" + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "string" }, - "schema_pointer": "/patternProperties/[0-9]{2,}", + "schema_pointer": "/definitions/real_id_in_schema", "root_schema": { - "patternProperties": { - "[0-9]{2,}": { - "type": "boolean" + "definitions": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "X_": { + "real_id_in_schema": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } } - } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_unknown0" + }, + { + "$ref": "#/definitions/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" + } + ] }, - "type": "boolean" + "type": "string" } - ], - [ - ], [ { - "data": 3, - "data_pointer": "/a_X_3", + "data": 1, + "data_pointer": "", "schema": { - "type": "string" + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "schema_pointer": "/patternProperties/X_", + "schema_pointer": "/definitions/id_in_unknown0", "root_schema": { - "patternProperties": { - "[0-9]{2,}": { - "type": "boolean" + "definitions": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } }, - "X_": { + "real_id_in_schema": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", "type": "string" - } - } + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } + } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_unknown0" + }, + { + "$ref": "#/definitions/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" + } + ] + }, + "type": "not" + }, + { + "data": 1, + "data_pointer": "", + "schema": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } + }, + "schema_pointer": "/definitions/id_in_unknown1", + "root_schema": { + "definitions": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } + } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_unknown0" + }, + { + "$ref": "#/definitions/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" + } + ] + }, + "type": "not" + }, + { + "data": 1, + "data_pointer": "", + "schema": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "string" + }, + "schema_pointer": "/definitions/real_id_in_schema", + "root_schema": { + "definitions": { + "id_in_unknown0": { + "not": { + "array_of_schemas": [ + { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "null" + } + ] + } + }, + "real_id_in_schema": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "string" + }, + "id_in_unknown1": { + "not": { + "object_of_schemas": { + "foo": { + "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", + "type": "integer" + } + } + } + } + }, + "anyOf": [ + { + "$ref": "#/definitions/id_in_unknown0" + }, + { + "$ref": "#/definitions/id_in_unknown1" + }, + { + "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" + } + ] }, "type": "string" } ] - ], + ] + ], + "JSON-Schema-Test-Suite/tests/draft7/pattern.json": [ [ [ ], [ { - "data": 2, - "data_pointer": "/bar", - "schema": false, - "schema_pointer": "/patternProperties/b.*", + "data": "abc", + "data_pointer": "", + "schema": { + "pattern": "^a*$" + }, + "schema_pointer": "", "root_schema": { - "patternProperties": { - "f.*": true, - "b.*": false - } + "pattern": "^a*$" }, - "type": "schema" + "type": "pattern" } ], [ - { - "data": 2, - "data_pointer": "/bar", - "schema": false, - "schema_pointer": "/patternProperties/b.*", - "root_schema": { - "patternProperties": { - "f.*": true, - "b.*": false - } - }, - "type": "schema" - } + ], [ - { - "data": 1, - "data_pointer": "/foobar", - "schema": false, - "schema_pointer": "/patternProperties/b.*", - "root_schema": { - "patternProperties": { - "f.*": true, - "b.*": false - } - }, - "type": "schema" - } + + ], + [ + + ], + [ + + ], + [ + ], [ @@ -11907,74 +12435,64 @@ ] ] ], - "JSON-Schema-Test-Suite/tests/draft7/properties.json": [ + "JSON-Schema-Test-Suite/tests/draft7/patternProperties.json": [ [ [ + ], + [ + ], [ { - "data": { - }, - "data_pointer": "/bar", + "data": "bar", + "data_pointer": "/foo", "schema": { - "type": "string" + "type": "integer" }, - "schema_pointer": "/properties/bar", + "schema_pointer": "/patternProperties/f.*o", "root_schema": { - "properties": { - "foo": { + "patternProperties": { + "f.*o": { "type": "integer" - }, - "bar": { - "type": "string" } } }, - "type": "string" + "type": "integer" } ], [ { - "data": [ - - ], + "data": "bar", "data_pointer": "/foo", "schema": { "type": "integer" }, - "schema_pointer": "/properties/foo", + "schema_pointer": "/patternProperties/f.*o", "root_schema": { - "properties": { - "foo": { + "patternProperties": { + "f.*o": { "type": "integer" - }, - "bar": { - "type": "string" } } }, "type": "integer" }, { - "data": { - }, - "data_pointer": "/bar", + "data": "baz", + "data_pointer": "/foooooo", "schema": { - "type": "string" + "type": "integer" }, - "schema_pointer": "/properties/bar", + "schema_pointer": "/patternProperties/f.*o", "root_schema": { - "properties": { - "foo": { + "patternProperties": { + "f.*o": { "type": "integer" - }, - "bar": { - "type": "string" } } }, - "type": "string" + "type": "integer" } ], [ @@ -11990,164 +12508,160 @@ [ [ + ], + [ + + ], + [ + ], [ { - "data": [ - 1, - 2, - 3, - 4 - ], - "data_pointer": "/foo", + "data": "bar", + "data_pointer": "/a", "schema": { - "type": "array", - "maxItems": 3 + "type": "integer" }, - "schema_pointer": "/properties/foo", + "schema_pointer": "/patternProperties/a*", "root_schema": { - "properties": { - "foo": { - "type": "array", - "maxItems": 3 + "patternProperties": { + "a*": { + "type": "integer" }, - "bar": { - "type": "array" + "aaa*": { + "maximum": 20 } - }, + } + }, + "type": "integer" + } + ], + [ + { + "data": 31, + "data_pointer": "/aaaa", + "schema": { + "maximum": 20 + }, + "schema_pointer": "/patternProperties/aaa*", + "root_schema": { "patternProperties": { - "f.o": { - "minItems": 2 + "a*": { + "type": "integer" + }, + "aaa*": { + "maximum": 20 } - }, - "additionalProperties": { - "type": "integer" } }, - "type": "maxItems" + "type": "maximum" } ], [ { - "data": [ - - ], - "data_pointer": "/foo", + "data": "foo", + "data_pointer": "/aaa", "schema": { - "minItems": 2 + "type": "integer" }, - "schema_pointer": "/patternProperties/f.o", + "schema_pointer": "/patternProperties/a*", "root_schema": { - "properties": { - "foo": { - "type": "array", - "maxItems": 3 + "patternProperties": { + "a*": { + "type": "integer" }, - "bar": { - "type": "array" + "aaa*": { + "maximum": 20 } - }, + } + }, + "type": "integer" + }, + { + "data": 31, + "data_pointer": "/aaaa", + "schema": { + "maximum": 20 + }, + "schema_pointer": "/patternProperties/aaa*", + "root_schema": { "patternProperties": { - "f.o": { - "minItems": 2 + "a*": { + "type": "integer" + }, + "aaa*": { + "maximum": 20 } - }, - "additionalProperties": { - "type": "integer" } }, - "type": "minItems" + "type": "maximum" } - ], + ] + ], + [ [ ], [ { - "data": [ - - ], - "data_pointer": "/fxo", + "data": null, + "data_pointer": "/a31b", "schema": { - "minItems": 2 + "type": "boolean" }, - "schema_pointer": "/patternProperties/f.o", + "schema_pointer": "/patternProperties/[0-9]{2,}", "root_schema": { - "properties": { - "foo": { - "type": "array", - "maxItems": 3 - }, - "bar": { - "type": "array" - } - }, "patternProperties": { - "f.o": { - "minItems": 2 + "[0-9]{2,}": { + "type": "boolean" + }, + "X_": { + "type": "string" } - }, - "additionalProperties": { - "type": "integer" } }, - "type": "minItems" + "type": "boolean" } ], [ - ], - [ - ], [ { - "data": "foo", - "data_pointer": "/quux", + "data": 3, + "data_pointer": "/a_X_3", "schema": { - "type": "integer" + "type": "string" }, - "schema_pointer": "/additionalProperties", + "schema_pointer": "/patternProperties/X_", "root_schema": { - "properties": { - "foo": { - "type": "array", - "maxItems": 3 - }, - "bar": { - "type": "array" - } - }, "patternProperties": { - "f.o": { - "minItems": 2 + "[0-9]{2,}": { + "type": "boolean" + }, + "X_": { + "type": "string" } - }, - "additionalProperties": { - "type": "integer" } }, - "type": "integer" + "type": "string" } ] ], [ [ - ], - [ - ], [ { "data": 2, "data_pointer": "/bar", "schema": false, - "schema_pointer": "/properties/bar", + "schema_pointer": "/patternProperties/b.*", "root_schema": { - "properties": { - "foo": true, - "bar": false + "patternProperties": { + "f.*": true, + "b.*": false } }, "type": "schema" @@ -12158,91 +12672,315 @@ "data": 2, "data_pointer": "/bar", "schema": false, - "schema_pointer": "/properties/bar", + "schema_pointer": "/patternProperties/b.*", "root_schema": { - "properties": { - "foo": true, - "bar": false + "patternProperties": { + "f.*": true, + "b.*": false + } + }, + "type": "schema" + } + ], + [ + { + "data": 1, + "data_pointer": "/foobar", + "schema": false, + "schema_pointer": "/patternProperties/b.*", + "root_schema": { + "patternProperties": { + "f.*": true, + "b.*": false } }, "type": "schema" } + ], + [ + ] ], + [ + [ + + ] + ] + ], + "JSON-Schema-Test-Suite/tests/draft7/properties.json": [ [ [ ], [ { - "data": "1", - "data_pointer": "/foo\nbar", + "data": { + }, + "data_pointer": "/bar", "schema": { - "type": "number" + "type": "string" }, - "schema_pointer": "/properties/foo\nbar", + "schema_pointer": "/properties/bar", "root_schema": { "properties": { - "foo\nbar": { - "type": "number" - }, - "foo\"bar": { - "type": "number" - }, - "foo\\bar": { - "type": "number" - }, - "foo\rbar": { - "type": "number" - }, - "foo\tbar": { - "type": "number" + "foo": { + "type": "integer" }, - "foo\fbar": { - "type": "number" + "bar": { + "type": "string" } } }, - "type": "number" - }, + "type": "string" + } + ], + [ { - "data": "1", - "data_pointer": "/foo\"bar", + "data": [ + + ], + "data_pointer": "/foo", "schema": { - "type": "number" + "type": "integer" }, - "schema_pointer": "/properties/foo\"bar", + "schema_pointer": "/properties/foo", "root_schema": { "properties": { - "foo\nbar": { - "type": "number" - }, - "foo\"bar": { - "type": "number" - }, - "foo\\bar": { - "type": "number" - }, - "foo\rbar": { - "type": "number" + "foo": { + "type": "integer" }, - "foo\tbar": { - "type": "number" - }, - "foo\fbar": { - "type": "number" + "bar": { + "type": "string" } } }, - "type": "number" + "type": "integer" }, + { + "data": { + }, + "data_pointer": "/bar", + "schema": { + "type": "string" + }, + "schema_pointer": "/properties/bar", + "root_schema": { + "properties": { + "foo": { + "type": "integer" + }, + "bar": { + "type": "string" + } + } + }, + "type": "string" + } + ], + [ + + ], + [ + + ], + [ + + ] + ], + [ + [ + + ], + [ + { + "data": [ + 1, + 2, + 3, + 4 + ], + "data_pointer": "/foo", + "schema": { + "type": "array", + "maxItems": 3 + }, + "schema_pointer": "/properties/foo", + "root_schema": { + "properties": { + "foo": { + "type": "array", + "maxItems": 3 + }, + "bar": { + "type": "array" + } + }, + "patternProperties": { + "f.o": { + "minItems": 2 + } + }, + "additionalProperties": { + "type": "integer" + } + }, + "type": "maxItems" + } + ], + [ + { + "data": [ + + ], + "data_pointer": "/foo", + "schema": { + "minItems": 2 + }, + "schema_pointer": "/patternProperties/f.o", + "root_schema": { + "properties": { + "foo": { + "type": "array", + "maxItems": 3 + }, + "bar": { + "type": "array" + } + }, + "patternProperties": { + "f.o": { + "minItems": 2 + } + }, + "additionalProperties": { + "type": "integer" + } + }, + "type": "minItems" + } + ], + [ + + ], + [ + { + "data": [ + + ], + "data_pointer": "/fxo", + "schema": { + "minItems": 2 + }, + "schema_pointer": "/patternProperties/f.o", + "root_schema": { + "properties": { + "foo": { + "type": "array", + "maxItems": 3 + }, + "bar": { + "type": "array" + } + }, + "patternProperties": { + "f.o": { + "minItems": 2 + } + }, + "additionalProperties": { + "type": "integer" + } + }, + "type": "minItems" + } + ], + [ + + ], + [ + + ], + [ + { + "data": "foo", + "data_pointer": "/quux", + "schema": { + "type": "integer" + }, + "schema_pointer": "/additionalProperties", + "root_schema": { + "properties": { + "foo": { + "type": "array", + "maxItems": 3 + }, + "bar": { + "type": "array" + } + }, + "patternProperties": { + "f.o": { + "minItems": 2 + } + }, + "additionalProperties": { + "type": "integer" + } + }, + "type": "integer" + } + ] + ], + [ + [ + + ], + [ + + ], + [ + { + "data": 2, + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/properties/bar", + "root_schema": { + "properties": { + "foo": true, + "bar": false + } + }, + "type": "schema" + } + ], + [ + { + "data": 2, + "data_pointer": "/bar", + "schema": false, + "schema_pointer": "/properties/bar", + "root_schema": { + "properties": { + "foo": true, + "bar": false + } + }, + "type": "schema" + } + ] + ], + [ + [ + + ], + [ { "data": "1", - "data_pointer": "/foo\\bar", + "data_pointer": "/foo\nbar", "schema": { "type": "number" }, - "schema_pointer": "/properties/foo\\bar", + "schema_pointer": "/properties/foo\nbar", "root_schema": { "properties": { "foo\nbar": { @@ -12269,11 +13007,11 @@ }, { "data": "1", - "data_pointer": "/foo\rbar", + "data_pointer": "/foo\"bar", "schema": { "type": "number" }, - "schema_pointer": "/properties/foo\rbar", + "schema_pointer": "/properties/foo\"bar", "root_schema": { "properties": { "foo\nbar": { @@ -12300,11 +13038,11 @@ }, { "data": "1", - "data_pointer": "/foo\tbar", + "data_pointer": "/foo\\bar", "schema": { "type": "number" }, - "schema_pointer": "/properties/foo\tbar", + "schema_pointer": "/properties/foo\\bar", "root_schema": { "properties": { "foo\nbar": { @@ -12331,11 +13069,11 @@ }, { "data": "1", - "data_pointer": "/foo\fbar", + "data_pointer": "/foo\rbar", "schema": { "type": "number" }, - "schema_pointer": "/properties/foo\fbar", + "schema_pointer": "/properties/foo\rbar", "root_schema": { "properties": { "foo\nbar": { @@ -12359,19 +13097,81 @@ } }, "type": "number" - } - ] - ], - [ - [ - - ] - ], - [ - [ - - ], - [ + }, + { + "data": "1", + "data_pointer": "/foo\tbar", + "schema": { + "type": "number" + }, + "schema_pointer": "/properties/foo\tbar", + "root_schema": { + "properties": { + "foo\nbar": { + "type": "number" + }, + "foo\"bar": { + "type": "number" + }, + "foo\\bar": { + "type": "number" + }, + "foo\rbar": { + "type": "number" + }, + "foo\tbar": { + "type": "number" + }, + "foo\fbar": { + "type": "number" + } + } + }, + "type": "number" + }, + { + "data": "1", + "data_pointer": "/foo\fbar", + "schema": { + "type": "number" + }, + "schema_pointer": "/properties/foo\fbar", + "root_schema": { + "properties": { + "foo\nbar": { + "type": "number" + }, + "foo\"bar": { + "type": "number" + }, + "foo\\bar": { + "type": "number" + }, + "foo\rbar": { + "type": "number" + }, + "foo\tbar": { + "type": "number" + }, + "foo\fbar": { + "type": "number" + } + } + }, + "type": "number" + } + ] + ], + [ + [ + + ] + ], + [ + [ + + ], + [ ], [ @@ -16297,334 +17097,5 @@ } ] ] - ], - "JSON-Schema-Test-Suite/tests/draft7/unknownKeyword.json": [ - [ - [ - - ], - [ - { - "data": null, - "data_pointer": "", - "schema": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "schema_pointer": "/definitions/id_in_unknown0", - "root_schema": { - "definitions": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/definitions/id_in_unknown0" - }, - { - "$ref": "#/definitions/id_in_unknown1" - }, - { - "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" - } - ] - }, - "type": "not" - }, - { - "data": null, - "data_pointer": "", - "schema": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - }, - "schema_pointer": "/definitions/id_in_unknown1", - "root_schema": { - "definitions": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/definitions/id_in_unknown0" - }, - { - "$ref": "#/definitions/id_in_unknown1" - }, - { - "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" - } - ] - }, - "type": "not" - }, - { - "data": null, - "data_pointer": "", - "schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" - }, - "schema_pointer": "/definitions/real_id_in_schema", - "root_schema": { - "definitions": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/definitions/id_in_unknown0" - }, - { - "$ref": "#/definitions/id_in_unknown1" - }, - { - "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" - } - ] - }, - "type": "string" - } - ], - [ - { - "data": 1, - "data_pointer": "", - "schema": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "schema_pointer": "/definitions/id_in_unknown0", - "root_schema": { - "definitions": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/definitions/id_in_unknown0" - }, - { - "$ref": "#/definitions/id_in_unknown1" - }, - { - "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" - } - ] - }, - "type": "not" - }, - { - "data": 1, - "data_pointer": "", - "schema": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - }, - "schema_pointer": "/definitions/id_in_unknown1", - "root_schema": { - "definitions": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/definitions/id_in_unknown0" - }, - { - "$ref": "#/definitions/id_in_unknown1" - }, - { - "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" - } - ] - }, - "type": "not" - }, - { - "data": 1, - "data_pointer": "", - "schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" - }, - "schema_pointer": "/definitions/real_id_in_schema", - "root_schema": { - "definitions": { - "id_in_unknown0": { - "not": { - "array_of_schemas": [ - { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "null" - } - ] - } - }, - "real_id_in_schema": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "string" - }, - "id_in_unknown1": { - "not": { - "object_of_schemas": { - "foo": { - "$id": "https://localhost:1234/unknownKeyword/my_identifier.json", - "type": "integer" - } - } - } - } - }, - "anyOf": [ - { - "$ref": "#/definitions/id_in_unknown0" - }, - { - "$ref": "#/definitions/id_in_unknown1" - }, - { - "$ref": "https://localhost:1234/unknownKeyword/my_identifier.json" - } - ] - }, - "type": "string" - } - ] - ] ] } From 20cc3f80eebbd134c5d00cf79775c1a83afd6712 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Sat, 2 Mar 2024 10:42:04 -0800 Subject: [PATCH 31/32] 2.2.0 Features: - Global configuration - Symbol key property defaults - Better schema validation support See CHANGELOG.md and individual commits for more details. Closes: - https://github.com/davishmcclurg/json_schemer/issues/157 - https://github.com/davishmcclurg/json_schemer/issues/162 - https://github.com/davishmcclurg/json_schemer/issues/167 - https://github.com/davishmcclurg/json_schemer/issues/173 --- CHANGELOG.md | 20 ++++++++++++++++++++ Gemfile.lock | 8 ++++---- lib/json_schemer/version.rb | 2 +- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02666a0..1f0a034 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [2.2.0] - XXXX-XX-XX + +## Bug Fixes + +- Support symbol keys when accessing original instance: https://github.com/davishmcclurg/json_schemer/commit/d52c130e9967919c6cf1c9dbc3f0babfb8b01cf8 +- Support custom keywords in nested schemas: https://github.com/davishmcclurg/json_schemer/commit/93c85a5006981347c7e9a4c11b73c6bdb65d8ba2 +- Stringify instance location for custom keywords: https://github.com/davishmcclurg/json_schemer/commit/513c99130b9e7986b09881e7efd3fb7143744754 +- Reduce unhelpful error output in `unevaluated` keywords: https://github.com/davishmcclurg/json_schemer/pull/164 +- Handle parse errors during schema validation: https://github.com/davishmcclurg/json_schemer/pull/171 +- Follow refs when finding default property values: https://github.com/davishmcclurg/json_schemer/pull/175 + +## Features + +- Global configuration with `Configuration` object: https://github.com/davishmcclurg/json_schemer/pull/170 +- Symbol key property defaults with `insert_property_defaults: :symbol`: https://github.com/davishmcclurg/json_schemer/commit/a72473dc84199107ddedc8998950e5b82273232a +- Consistent schema type support for schema validation methods: https://github.com/davishmcclurg/json_schemer/commit/bbcd0cea20cbaa61cf2bdae5f53840861cae54b8 +- Validation option support for schema validation methods: https://github.com/davishmcclurg/json_schemer/commit/2eeef77de522f127619b7d0faa51e0d7e40977ad + +[2.2.0]: https://github.com/davishmcclurg/json_schemer/releases/tag/v2.2.0 + ## [2.1.1] - 2023-11-28 ### Bug Fixes diff --git a/Gemfile.lock b/Gemfile.lock index c4f1cb6..5fe1233 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - json_schemer (2.1.1) + json_schemer (2.2.0) base64 bigdecimal hana (~> 1.3) @@ -12,8 +12,8 @@ GEM remote: https://rubygems.org/ specs: base64 (0.2.0) - bigdecimal (3.1.5) - bigdecimal (3.1.5-java) + bigdecimal (3.1.6) + bigdecimal (3.1.6-java) concurrent-ruby (1.2.2) csv (3.2.8) docile (1.4.0) @@ -24,7 +24,7 @@ GEM i18n (< 2) minitest (5.15.0) rake (13.1.0) - regexp_parser (2.8.3) + regexp_parser (2.9.0) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) diff --git a/lib/json_schemer/version.rb b/lib/json_schemer/version.rb index 89f8a8d..ecd05cd 100644 --- a/lib/json_schemer/version.rb +++ b/lib/json_schemer/version.rb @@ -1,4 +1,4 @@ # frozen_string_literal: true module JSONSchemer - VERSION = '2.1.1' + VERSION = '2.2.0' end From 045a95d9153858b6a2beb5ea10e9a1d709f5ccd4 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Sat, 2 Mar 2024 11:43:06 -0800 Subject: [PATCH 32/32] Global configuration documentation Forgot to add this as part of: https://github.com/davishmcclurg/json_schemer/pull/170 --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 7f1276f..c15d3a9 100644 --- a/README.md +++ b/README.md @@ -257,6 +257,20 @@ JSONSchemer.schema( ) ``` +## Global Configuration + +Configuration options can be set globally by modifying `JSONSchemer.configuration`. Global options are applied to any new schemas at creation time (global configuration changes are not reflected in existing schemas). They can be overridden with the regular keyword arguments described [above](#options). + +```ruby +# configuration block +JSONSchemer.configure do |config| + config.regexp_resolver = 'ecma' +end + +# configuration accessors +JSONSchemer.configuration.insert_property_defaults = true +``` + ## Custom Error Messages Error messages can be customized using the `x-error` keyword and/or [I18n](https://github.com/ruby-i18n/i18n) translations. `x-error` takes precedence if both are defined.