json_schemer 0.2.18 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/.github/workflows/ci.yml +3 -7
 - data/CHANGELOG.md +69 -0
 - data/Gemfile.lock +28 -10
 - data/README.md +379 -4
 - data/bin/hostname_character_classes +42 -0
 - data/bin/rake +29 -0
 - data/exe/json_schemer +62 -0
 - data/json_schemer.gemspec +6 -12
 - data/lib/json_schemer/cached_resolver.rb +16 -0
 - data/lib/json_schemer/content.rb +18 -0
 - data/lib/json_schemer/draft201909/meta.rb +320 -0
 - data/lib/json_schemer/draft201909/vocab/applicator.rb +104 -0
 - data/lib/json_schemer/draft201909/vocab/core.rb +45 -0
 - data/lib/json_schemer/draft201909/vocab.rb +31 -0
 - data/lib/json_schemer/draft202012/meta.rb +364 -0
 - data/lib/json_schemer/draft202012/vocab/applicator.rb +382 -0
 - data/lib/json_schemer/draft202012/vocab/content.rb +52 -0
 - data/lib/json_schemer/draft202012/vocab/core.rb +160 -0
 - data/lib/json_schemer/draft202012/vocab/format_annotation.rb +23 -0
 - data/lib/json_schemer/draft202012/vocab/format_assertion.rb +23 -0
 - data/lib/json_schemer/draft202012/vocab/meta_data.rb +30 -0
 - data/lib/json_schemer/draft202012/vocab/unevaluated.rb +94 -0
 - data/lib/json_schemer/draft202012/vocab/validation.rb +286 -0
 - data/lib/json_schemer/draft202012/vocab.rb +105 -0
 - data/lib/json_schemer/draft4/meta.rb +161 -0
 - data/lib/json_schemer/draft4/vocab/validation.rb +39 -0
 - data/lib/json_schemer/draft4/vocab.rb +18 -0
 - data/lib/json_schemer/draft6/meta.rb +172 -0
 - data/lib/json_schemer/draft6/vocab.rb +16 -0
 - data/lib/json_schemer/draft7/meta.rb +183 -0
 - data/lib/json_schemer/draft7/vocab/validation.rb +69 -0
 - data/lib/json_schemer/draft7/vocab.rb +30 -0
 - data/lib/json_schemer/ecma_regexp.rb +51 -0
 - data/lib/json_schemer/errors.rb +1 -0
 - data/lib/json_schemer/format/duration.rb +23 -0
 - data/lib/json_schemer/format/email.rb +56 -0
 - data/lib/json_schemer/format/hostname.rb +58 -0
 - data/lib/json_schemer/format/json_pointer.rb +18 -0
 - data/lib/json_schemer/format/uri_template.rb +34 -0
 - data/lib/json_schemer/format.rb +129 -109
 - data/lib/json_schemer/keyword.rb +53 -0
 - data/lib/json_schemer/location.rb +25 -0
 - data/lib/json_schemer/openapi.rb +40 -0
 - data/lib/json_schemer/openapi30/document.rb +1672 -0
 - data/lib/json_schemer/openapi30/meta.rb +32 -0
 - data/lib/json_schemer/openapi30/vocab/base.rb +18 -0
 - data/lib/json_schemer/openapi30/vocab.rb +12 -0
 - data/lib/json_schemer/openapi31/document.rb +1557 -0
 - data/lib/json_schemer/openapi31/meta.rb +136 -0
 - data/lib/json_schemer/openapi31/vocab/base.rb +127 -0
 - data/lib/json_schemer/openapi31/vocab.rb +18 -0
 - data/lib/json_schemer/output.rb +56 -0
 - data/lib/json_schemer/result.rb +229 -0
 - data/lib/json_schemer/schema.rb +423 -0
 - data/lib/json_schemer/version.rb +1 -1
 - data/lib/json_schemer.rb +218 -28
 - metadata +98 -25
 - data/lib/json_schemer/cached_ref_resolver.rb +0 -14
 - data/lib/json_schemer/schema/base.rb +0 -658
 - data/lib/json_schemer/schema/draft4.rb +0 -44
 - data/lib/json_schemer/schema/draft6.rb +0 -25
 - data/lib/json_schemer/schema/draft7.rb +0 -32
 
| 
         @@ -0,0 +1,364 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
            module JSONSchemer
         
     | 
| 
      
 3 
     | 
    
         
            +
              module Draft202012
         
     | 
| 
      
 4 
     | 
    
         
            +
                BASE_URI = URI('https://json-schema.org/draft/2020-12/schema')
         
     | 
| 
      
 5 
     | 
    
         
            +
                FORMATS = {
         
     | 
| 
      
 6 
     | 
    
         
            +
                  'date-time' => Format::DATE_TIME,
         
     | 
| 
      
 7 
     | 
    
         
            +
                  'date' => Format::DATE,
         
     | 
| 
      
 8 
     | 
    
         
            +
                  'time' => Format::TIME,
         
     | 
| 
      
 9 
     | 
    
         
            +
                  'duration' => Format::DURATION,
         
     | 
| 
      
 10 
     | 
    
         
            +
                  'email' => Format::EMAIL,
         
     | 
| 
      
 11 
     | 
    
         
            +
                  'idn-email' => Format::IDN_EMAIL,
         
     | 
| 
      
 12 
     | 
    
         
            +
                  'hostname' => Format::HOSTNAME,
         
     | 
| 
      
 13 
     | 
    
         
            +
                  'idn-hostname' => Format::IDN_HOSTNAME,
         
     | 
| 
      
 14 
     | 
    
         
            +
                  'ipv4' => Format::IPV4,
         
     | 
| 
      
 15 
     | 
    
         
            +
                  'ipv6' => Format::IPV6,
         
     | 
| 
      
 16 
     | 
    
         
            +
                  'uri' => Format::URI,
         
     | 
| 
      
 17 
     | 
    
         
            +
                  'uri-reference' => Format::URI_REFERENCE,
         
     | 
| 
      
 18 
     | 
    
         
            +
                  'iri' => Format::IRI,
         
     | 
| 
      
 19 
     | 
    
         
            +
                  'iri-reference' => Format::IRI_REFERENCE,
         
     | 
| 
      
 20 
     | 
    
         
            +
                  'uuid' => Format::UUID,
         
     | 
| 
      
 21 
     | 
    
         
            +
                  'uri-template' => Format::URI_TEMPLATE,
         
     | 
| 
      
 22 
     | 
    
         
            +
                  'json-pointer' => Format::JSON_POINTER,
         
     | 
| 
      
 23 
     | 
    
         
            +
                  'relative-json-pointer' => Format::RELATIVE_JSON_POINTER,
         
     | 
| 
      
 24 
     | 
    
         
            +
                  'regex' => Format::REGEX
         
     | 
| 
      
 25 
     | 
    
         
            +
                }
         
     | 
| 
      
 26 
     | 
    
         
            +
                CONTENT_ENCODINGS = {
         
     | 
| 
      
 27 
     | 
    
         
            +
                  'base64' => ContentEncoding::BASE64
         
     | 
| 
      
 28 
     | 
    
         
            +
                }
         
     | 
| 
      
 29 
     | 
    
         
            +
                CONTENT_MEDIA_TYPES = {
         
     | 
| 
      
 30 
     | 
    
         
            +
                  'application/json' => ContentMediaType::JSON
         
     | 
| 
      
 31 
     | 
    
         
            +
                }
         
     | 
| 
      
 32 
     | 
    
         
            +
                SCHEMA = {
         
     | 
| 
      
 33 
     | 
    
         
            +
                  '$schema' => 'https://json-schema.org/draft/2020-12/schema',
         
     | 
| 
      
 34 
     | 
    
         
            +
                  '$id' => 'https://json-schema.org/draft/2020-12/schema',
         
     | 
| 
      
 35 
     | 
    
         
            +
                  '$vocabulary' => {
         
     | 
| 
      
 36 
     | 
    
         
            +
                    'https://json-schema.org/draft/2020-12/vocab/core' => true,
         
     | 
| 
      
 37 
     | 
    
         
            +
                    'https://json-schema.org/draft/2020-12/vocab/applicator' => true,
         
     | 
| 
      
 38 
     | 
    
         
            +
                    'https://json-schema.org/draft/2020-12/vocab/unevaluated' => true,
         
     | 
| 
      
 39 
     | 
    
         
            +
                    'https://json-schema.org/draft/2020-12/vocab/validation' => true,
         
     | 
| 
      
 40 
     | 
    
         
            +
                    'https://json-schema.org/draft/2020-12/vocab/meta-data' => true,
         
     | 
| 
      
 41 
     | 
    
         
            +
                    'https://json-schema.org/draft/2020-12/vocab/format-annotation' => true,
         
     | 
| 
      
 42 
     | 
    
         
            +
                    'https://json-schema.org/draft/2020-12/vocab/content' => true
         
     | 
| 
      
 43 
     | 
    
         
            +
                  },
         
     | 
| 
      
 44 
     | 
    
         
            +
                  '$dynamicAnchor' => 'meta',
         
     | 
| 
      
 45 
     | 
    
         
            +
                  'title' => 'Core and Validation specifications meta-schema',
         
     | 
| 
      
 46 
     | 
    
         
            +
                  'allOf' => [
         
     | 
| 
      
 47 
     | 
    
         
            +
                    {'$ref' => 'meta/core'},
         
     | 
| 
      
 48 
     | 
    
         
            +
                    {'$ref' => 'meta/applicator'},
         
     | 
| 
      
 49 
     | 
    
         
            +
                    {'$ref' => 'meta/unevaluated'},
         
     | 
| 
      
 50 
     | 
    
         
            +
                    {'$ref' => 'meta/validation'},
         
     | 
| 
      
 51 
     | 
    
         
            +
                    {'$ref' => 'meta/meta-data'},
         
     | 
| 
      
 52 
     | 
    
         
            +
                    {'$ref' => 'meta/format-annotation'},
         
     | 
| 
      
 53 
     | 
    
         
            +
                    {'$ref' => 'meta/content'}
         
     | 
| 
      
 54 
     | 
    
         
            +
                  ],
         
     | 
| 
      
 55 
     | 
    
         
            +
                  'type' => ['object', 'boolean'],
         
     | 
| 
      
 56 
     | 
    
         
            +
                  '$comment' => 'This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.',
         
     | 
| 
      
 57 
     | 
    
         
            +
                  'properties' => {
         
     | 
| 
      
 58 
     | 
    
         
            +
                    'definitions' => {
         
     | 
| 
      
 59 
     | 
    
         
            +
                      '$comment' => '"definitions" has been replaced by "$defs".',
         
     | 
| 
      
 60 
     | 
    
         
            +
                      'type' => 'object',
         
     | 
| 
      
 61 
     | 
    
         
            +
                      'additionalProperties' => { '$dynamicRef' => '#meta' },
         
     | 
| 
      
 62 
     | 
    
         
            +
                      'deprecated' => true,
         
     | 
| 
      
 63 
     | 
    
         
            +
                      'default' => {}
         
     | 
| 
      
 64 
     | 
    
         
            +
                    },
         
     | 
| 
      
 65 
     | 
    
         
            +
                    'dependencies' => {
         
     | 
| 
      
 66 
     | 
    
         
            +
                      '$comment' => '"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',
         
     | 
| 
      
 67 
     | 
    
         
            +
                      'type' => 'object',
         
     | 
| 
      
 68 
     | 
    
         
            +
                      'additionalProperties' => {
         
     | 
| 
      
 69 
     | 
    
         
            +
                        'anyOf' => [
         
     | 
| 
      
 70 
     | 
    
         
            +
                          { '$dynamicRef' => '#meta' },
         
     | 
| 
      
 71 
     | 
    
         
            +
                          { '$ref' => 'meta/validation#/$defs/stringArray' }
         
     | 
| 
      
 72 
     | 
    
         
            +
                        ]
         
     | 
| 
      
 73 
     | 
    
         
            +
                      },
         
     | 
| 
      
 74 
     | 
    
         
            +
                      'deprecated' => true,
         
     | 
| 
      
 75 
     | 
    
         
            +
                      'default' => {}
         
     | 
| 
      
 76 
     | 
    
         
            +
                    },
         
     | 
| 
      
 77 
     | 
    
         
            +
                    '$recursiveAnchor' => {
         
     | 
| 
      
 78 
     | 
    
         
            +
                      '$comment' => '"$recursiveAnchor" has been replaced by "$dynamicAnchor".',
         
     | 
| 
      
 79 
     | 
    
         
            +
                      '$ref' => 'meta/core#/$defs/anchorString',
         
     | 
| 
      
 80 
     | 
    
         
            +
                      'deprecated' => true
         
     | 
| 
      
 81 
     | 
    
         
            +
                    },
         
     | 
| 
      
 82 
     | 
    
         
            +
                    '$recursiveRef' => {
         
     | 
| 
      
 83 
     | 
    
         
            +
                      '$comment' => '"$recursiveRef" has been replaced by "$dynamicRef".',
         
     | 
| 
      
 84 
     | 
    
         
            +
                      '$ref' => 'meta/core#/$defs/uriReferenceString',
         
     | 
| 
      
 85 
     | 
    
         
            +
                      'deprecated' => true
         
     | 
| 
      
 86 
     | 
    
         
            +
                    }
         
     | 
| 
      
 87 
     | 
    
         
            +
                  }
         
     | 
| 
      
 88 
     | 
    
         
            +
                }
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
      
 90 
     | 
    
         
            +
                module Meta
         
     | 
| 
      
 91 
     | 
    
         
            +
                  CORE = {
         
     | 
| 
      
 92 
     | 
    
         
            +
                    '$schema' => 'https://json-schema.org/draft/2020-12/schema',
         
     | 
| 
      
 93 
     | 
    
         
            +
                    '$id' => 'https://json-schema.org/draft/2020-12/meta/core',
         
     | 
| 
      
 94 
     | 
    
         
            +
                    '$dynamicAnchor' => 'meta',
         
     | 
| 
      
 95 
     | 
    
         
            +
                    'title' => 'Core vocabulary meta-schema',
         
     | 
| 
      
 96 
     | 
    
         
            +
                    'type' => ['object', 'boolean'],
         
     | 
| 
      
 97 
     | 
    
         
            +
                    'properties' => {
         
     | 
| 
      
 98 
     | 
    
         
            +
                      '$id' => {
         
     | 
| 
      
 99 
     | 
    
         
            +
                        '$ref' => '#/$defs/uriReferenceString',
         
     | 
| 
      
 100 
     | 
    
         
            +
                        '$comment' => 'Non-empty fragments not allowed.',
         
     | 
| 
      
 101 
     | 
    
         
            +
                        'pattern' => '^[^#]*#?$'
         
     | 
| 
      
 102 
     | 
    
         
            +
                      },
         
     | 
| 
      
 103 
     | 
    
         
            +
                      '$schema' => { '$ref' => '#/$defs/uriString' },
         
     | 
| 
      
 104 
     | 
    
         
            +
                      '$ref' => { '$ref' => '#/$defs/uriReferenceString' },
         
     | 
| 
      
 105 
     | 
    
         
            +
                      '$anchor' => { '$ref' => '#/$defs/anchorString' },
         
     | 
| 
      
 106 
     | 
    
         
            +
                      '$dynamicRef' => { '$ref' => '#/$defs/uriReferenceString' },
         
     | 
| 
      
 107 
     | 
    
         
            +
                      '$dynamicAnchor' => { '$ref' => '#/$defs/anchorString' },
         
     | 
| 
      
 108 
     | 
    
         
            +
                      '$vocabulary' => {
         
     | 
| 
      
 109 
     | 
    
         
            +
                        'type' => 'object',
         
     | 
| 
      
 110 
     | 
    
         
            +
                        'propertyNames' => { '$ref' => '#/$defs/uriString' },
         
     | 
| 
      
 111 
     | 
    
         
            +
                        'additionalProperties' => {
         
     | 
| 
      
 112 
     | 
    
         
            +
                          'type' => 'boolean'
         
     | 
| 
      
 113 
     | 
    
         
            +
                        }
         
     | 
| 
      
 114 
     | 
    
         
            +
                      },
         
     | 
| 
      
 115 
     | 
    
         
            +
                      '$comment' => {
         
     | 
| 
      
 116 
     | 
    
         
            +
                        'type' => 'string'
         
     | 
| 
      
 117 
     | 
    
         
            +
                      },
         
     | 
| 
      
 118 
     | 
    
         
            +
                      '$defs' => {
         
     | 
| 
      
 119 
     | 
    
         
            +
                        'type' => 'object',
         
     | 
| 
      
 120 
     | 
    
         
            +
                        'additionalProperties' => { '$dynamicRef' => '#meta' }
         
     | 
| 
      
 121 
     | 
    
         
            +
                      }
         
     | 
| 
      
 122 
     | 
    
         
            +
                    },
         
     | 
| 
      
 123 
     | 
    
         
            +
                    '$defs' => {
         
     | 
| 
      
 124 
     | 
    
         
            +
                      'anchorString' => {
         
     | 
| 
      
 125 
     | 
    
         
            +
                        'type' => 'string',
         
     | 
| 
      
 126 
     | 
    
         
            +
                        'pattern' => '^[A-Za-z_][-A-Za-z0-9._]*$'
         
     | 
| 
      
 127 
     | 
    
         
            +
                      },
         
     | 
| 
      
 128 
     | 
    
         
            +
                      'uriString' => {
         
     | 
| 
      
 129 
     | 
    
         
            +
                        'type' => 'string',
         
     | 
| 
      
 130 
     | 
    
         
            +
                        'format' => 'uri'
         
     | 
| 
      
 131 
     | 
    
         
            +
                      },
         
     | 
| 
      
 132 
     | 
    
         
            +
                      'uriReferenceString' => {
         
     | 
| 
      
 133 
     | 
    
         
            +
                        'type' => 'string',
         
     | 
| 
      
 134 
     | 
    
         
            +
                        'format' => 'uri-reference'
         
     | 
| 
      
 135 
     | 
    
         
            +
                      }
         
     | 
| 
      
 136 
     | 
    
         
            +
                    }
         
     | 
| 
      
 137 
     | 
    
         
            +
                  }
         
     | 
| 
      
 138 
     | 
    
         
            +
                  APPLICATOR = {
         
     | 
| 
      
 139 
     | 
    
         
            +
                    '$schema' => 'https://json-schema.org/draft/2020-12/schema',
         
     | 
| 
      
 140 
     | 
    
         
            +
                    '$id' => 'https://json-schema.org/draft/2020-12/meta/applicator',
         
     | 
| 
      
 141 
     | 
    
         
            +
                    '$dynamicAnchor' => 'meta',
         
     | 
| 
      
 142 
     | 
    
         
            +
                    'title' => 'Applicator vocabulary meta-schema',
         
     | 
| 
      
 143 
     | 
    
         
            +
                    'type' => ['object', 'boolean'],
         
     | 
| 
      
 144 
     | 
    
         
            +
                    'properties' => {
         
     | 
| 
      
 145 
     | 
    
         
            +
                      'prefixItems' => { '$ref' => '#/$defs/schemaArray' },
         
     | 
| 
      
 146 
     | 
    
         
            +
                      'items' => { '$dynamicRef' => '#meta' },
         
     | 
| 
      
 147 
     | 
    
         
            +
                      'contains' => { '$dynamicRef' => '#meta' },
         
     | 
| 
      
 148 
     | 
    
         
            +
                      'additionalProperties' => { '$dynamicRef' => '#meta' },
         
     | 
| 
      
 149 
     | 
    
         
            +
                      'properties' => {
         
     | 
| 
      
 150 
     | 
    
         
            +
                        'type' => 'object',
         
     | 
| 
      
 151 
     | 
    
         
            +
                        'additionalProperties' => { '$dynamicRef' => '#meta' },
         
     | 
| 
      
 152 
     | 
    
         
            +
                        'default' => {}
         
     | 
| 
      
 153 
     | 
    
         
            +
                      },
         
     | 
| 
      
 154 
     | 
    
         
            +
                      'patternProperties' => {
         
     | 
| 
      
 155 
     | 
    
         
            +
                        'type' => 'object',
         
     | 
| 
      
 156 
     | 
    
         
            +
                        'additionalProperties' => { '$dynamicRef' => '#meta' },
         
     | 
| 
      
 157 
     | 
    
         
            +
                        'propertyNames' => { 'format' => 'regex' },
         
     | 
| 
      
 158 
     | 
    
         
            +
                        'default' => {}
         
     | 
| 
      
 159 
     | 
    
         
            +
                      },
         
     | 
| 
      
 160 
     | 
    
         
            +
                      'dependentSchemas' => {
         
     | 
| 
      
 161 
     | 
    
         
            +
                        'type' => 'object',
         
     | 
| 
      
 162 
     | 
    
         
            +
                        'additionalProperties' => { '$dynamicRef' => '#meta' },
         
     | 
| 
      
 163 
     | 
    
         
            +
                        'default' => {}
         
     | 
| 
      
 164 
     | 
    
         
            +
                      },
         
     | 
| 
      
 165 
     | 
    
         
            +
                      'propertyNames' => { '$dynamicRef' => '#meta' },
         
     | 
| 
      
 166 
     | 
    
         
            +
                      'if' => { '$dynamicRef' => '#meta' },
         
     | 
| 
      
 167 
     | 
    
         
            +
                      'then' => { '$dynamicRef' => '#meta' },
         
     | 
| 
      
 168 
     | 
    
         
            +
                      'else' => { '$dynamicRef' => '#meta' },
         
     | 
| 
      
 169 
     | 
    
         
            +
                      'allOf' => { '$ref' => '#/$defs/schemaArray' },
         
     | 
| 
      
 170 
     | 
    
         
            +
                      'anyOf' => { '$ref' => '#/$defs/schemaArray' },
         
     | 
| 
      
 171 
     | 
    
         
            +
                      'oneOf' => { '$ref' => '#/$defs/schemaArray' },
         
     | 
| 
      
 172 
     | 
    
         
            +
                      'not' => { '$dynamicRef' => '#meta' }
         
     | 
| 
      
 173 
     | 
    
         
            +
                    },
         
     | 
| 
      
 174 
     | 
    
         
            +
                    '$defs' => {
         
     | 
| 
      
 175 
     | 
    
         
            +
                      'schemaArray' => {
         
     | 
| 
      
 176 
     | 
    
         
            +
                        'type' => 'array',
         
     | 
| 
      
 177 
     | 
    
         
            +
                        'minItems' => 1,
         
     | 
| 
      
 178 
     | 
    
         
            +
                        'items' => { '$dynamicRef' => '#meta' }
         
     | 
| 
      
 179 
     | 
    
         
            +
                      }
         
     | 
| 
      
 180 
     | 
    
         
            +
                    }
         
     | 
| 
      
 181 
     | 
    
         
            +
                  }
         
     | 
| 
      
 182 
     | 
    
         
            +
                  UNEVALUATED = {
         
     | 
| 
      
 183 
     | 
    
         
            +
                    '$schema' => 'https://json-schema.org/draft/2020-12/schema',
         
     | 
| 
      
 184 
     | 
    
         
            +
                    '$id' => 'https://json-schema.org/draft/2020-12/meta/unevaluated',
         
     | 
| 
      
 185 
     | 
    
         
            +
                    '$dynamicAnchor' => 'meta',
         
     | 
| 
      
 186 
     | 
    
         
            +
                    'title' => 'Unevaluated applicator vocabulary meta-schema',
         
     | 
| 
      
 187 
     | 
    
         
            +
                    'type' => ['object', 'boolean'],
         
     | 
| 
      
 188 
     | 
    
         
            +
                    'properties' => {
         
     | 
| 
      
 189 
     | 
    
         
            +
                      'unevaluatedItems' => { '$dynamicRef' => '#meta' },
         
     | 
| 
      
 190 
     | 
    
         
            +
                      'unevaluatedProperties' => { '$dynamicRef' => '#meta' }
         
     | 
| 
      
 191 
     | 
    
         
            +
                    }
         
     | 
| 
      
 192 
     | 
    
         
            +
                  }
         
     | 
| 
      
 193 
     | 
    
         
            +
                  VALIDATION = {
         
     | 
| 
      
 194 
     | 
    
         
            +
                    '$schema' => 'https://json-schema.org/draft/2020-12/schema',
         
     | 
| 
      
 195 
     | 
    
         
            +
                    '$id' => 'https://json-schema.org/draft/2020-12/meta/validation',
         
     | 
| 
      
 196 
     | 
    
         
            +
                    '$dynamicAnchor' => 'meta',
         
     | 
| 
      
 197 
     | 
    
         
            +
                    'title' => 'Validation vocabulary meta-schema',
         
     | 
| 
      
 198 
     | 
    
         
            +
                    'type' => ['object', 'boolean'],
         
     | 
| 
      
 199 
     | 
    
         
            +
                    'properties' => {
         
     | 
| 
      
 200 
     | 
    
         
            +
                      'type' => {
         
     | 
| 
      
 201 
     | 
    
         
            +
                        'anyOf' => [
         
     | 
| 
      
 202 
     | 
    
         
            +
                          { '$ref' => '#/$defs/simpleTypes' },
         
     | 
| 
      
 203 
     | 
    
         
            +
                          {
         
     | 
| 
      
 204 
     | 
    
         
            +
                            'type' => 'array',
         
     | 
| 
      
 205 
     | 
    
         
            +
                            'items' => { '$ref' => '#/$defs/simpleTypes' },
         
     | 
| 
      
 206 
     | 
    
         
            +
                            'minItems' => 1,
         
     | 
| 
      
 207 
     | 
    
         
            +
                            'uniqueItems' => true
         
     | 
| 
      
 208 
     | 
    
         
            +
                          }
         
     | 
| 
      
 209 
     | 
    
         
            +
                        ]
         
     | 
| 
      
 210 
     | 
    
         
            +
                      },
         
     | 
| 
      
 211 
     | 
    
         
            +
                      'const' => true,
         
     | 
| 
      
 212 
     | 
    
         
            +
                      'enum' => {
         
     | 
| 
      
 213 
     | 
    
         
            +
                        'type' => 'array',
         
     | 
| 
      
 214 
     | 
    
         
            +
                        'items' => true
         
     | 
| 
      
 215 
     | 
    
         
            +
                      },
         
     | 
| 
      
 216 
     | 
    
         
            +
                      'multipleOf' => {
         
     | 
| 
      
 217 
     | 
    
         
            +
                        'type' => 'number',
         
     | 
| 
      
 218 
     | 
    
         
            +
                        'exclusiveMinimum' => 0
         
     | 
| 
      
 219 
     | 
    
         
            +
                      },
         
     | 
| 
      
 220 
     | 
    
         
            +
                      'maximum' => {
         
     | 
| 
      
 221 
     | 
    
         
            +
                        'type' => 'number'
         
     | 
| 
      
 222 
     | 
    
         
            +
                      },
         
     | 
| 
      
 223 
     | 
    
         
            +
                      'exclusiveMaximum' => {
         
     | 
| 
      
 224 
     | 
    
         
            +
                        'type' => 'number'
         
     | 
| 
      
 225 
     | 
    
         
            +
                      },
         
     | 
| 
      
 226 
     | 
    
         
            +
                      'minimum' => {
         
     | 
| 
      
 227 
     | 
    
         
            +
                        'type' => 'number'
         
     | 
| 
      
 228 
     | 
    
         
            +
                      },
         
     | 
| 
      
 229 
     | 
    
         
            +
                      'exclusiveMinimum' => {
         
     | 
| 
      
 230 
     | 
    
         
            +
                        'type' => 'number'
         
     | 
| 
      
 231 
     | 
    
         
            +
                      },
         
     | 
| 
      
 232 
     | 
    
         
            +
                      'maxLength' => { '$ref' => '#/$defs/nonNegativeInteger' },
         
     | 
| 
      
 233 
     | 
    
         
            +
                      'minLength' => { '$ref' => '#/$defs/nonNegativeIntegerDefault0' },
         
     | 
| 
      
 234 
     | 
    
         
            +
                      'pattern' => {
         
     | 
| 
      
 235 
     | 
    
         
            +
                        'type' => 'string',
         
     | 
| 
      
 236 
     | 
    
         
            +
                        'format' => 'regex'
         
     | 
| 
      
 237 
     | 
    
         
            +
                      },
         
     | 
| 
      
 238 
     | 
    
         
            +
                      'maxItems' => { '$ref' => '#/$defs/nonNegativeInteger' },
         
     | 
| 
      
 239 
     | 
    
         
            +
                      'minItems' => { '$ref' => '#/$defs/nonNegativeIntegerDefault0' },
         
     | 
| 
      
 240 
     | 
    
         
            +
                      'uniqueItems' => {
         
     | 
| 
      
 241 
     | 
    
         
            +
                        'type' => 'boolean',
         
     | 
| 
      
 242 
     | 
    
         
            +
                        'default' => false
         
     | 
| 
      
 243 
     | 
    
         
            +
                      },
         
     | 
| 
      
 244 
     | 
    
         
            +
                      'maxContains' => { '$ref' => '#/$defs/nonNegativeInteger' },
         
     | 
| 
      
 245 
     | 
    
         
            +
                      'minContains' => {
         
     | 
| 
      
 246 
     | 
    
         
            +
                        '$ref' => '#/$defs/nonNegativeInteger',
         
     | 
| 
      
 247 
     | 
    
         
            +
                        'default' => 1
         
     | 
| 
      
 248 
     | 
    
         
            +
                      },
         
     | 
| 
      
 249 
     | 
    
         
            +
                      'maxProperties' => { '$ref' => '#/$defs/nonNegativeInteger' },
         
     | 
| 
      
 250 
     | 
    
         
            +
                      'minProperties' => { '$ref' => '#/$defs/nonNegativeIntegerDefault0' },
         
     | 
| 
      
 251 
     | 
    
         
            +
                      'required' => { '$ref' => '#/$defs/stringArray' },
         
     | 
| 
      
 252 
     | 
    
         
            +
                      'dependentRequired' => {
         
     | 
| 
      
 253 
     | 
    
         
            +
                        'type' => 'object',
         
     | 
| 
      
 254 
     | 
    
         
            +
                        'additionalProperties' => {
         
     | 
| 
      
 255 
     | 
    
         
            +
                          '$ref' => '#/$defs/stringArray'
         
     | 
| 
      
 256 
     | 
    
         
            +
                        }
         
     | 
| 
      
 257 
     | 
    
         
            +
                      }
         
     | 
| 
      
 258 
     | 
    
         
            +
                    },
         
     | 
| 
      
 259 
     | 
    
         
            +
                    '$defs' => {
         
     | 
| 
      
 260 
     | 
    
         
            +
                      'nonNegativeInteger' => {
         
     | 
| 
      
 261 
     | 
    
         
            +
                        'type' => 'integer',
         
     | 
| 
      
 262 
     | 
    
         
            +
                        'minimum' => 0
         
     | 
| 
      
 263 
     | 
    
         
            +
                      },
         
     | 
| 
      
 264 
     | 
    
         
            +
                      'nonNegativeIntegerDefault0' => {
         
     | 
| 
      
 265 
     | 
    
         
            +
                        '$ref' => '#/$defs/nonNegativeInteger',
         
     | 
| 
      
 266 
     | 
    
         
            +
                        'default' => 0
         
     | 
| 
      
 267 
     | 
    
         
            +
                      },
         
     | 
| 
      
 268 
     | 
    
         
            +
                      'simpleTypes' => {
         
     | 
| 
      
 269 
     | 
    
         
            +
                        'enum' => [
         
     | 
| 
      
 270 
     | 
    
         
            +
                          'array',
         
     | 
| 
      
 271 
     | 
    
         
            +
                          'boolean',
         
     | 
| 
      
 272 
     | 
    
         
            +
                          'integer',
         
     | 
| 
      
 273 
     | 
    
         
            +
                          'null',
         
     | 
| 
      
 274 
     | 
    
         
            +
                          'number',
         
     | 
| 
      
 275 
     | 
    
         
            +
                          'object',
         
     | 
| 
      
 276 
     | 
    
         
            +
                          'string'
         
     | 
| 
      
 277 
     | 
    
         
            +
                        ]
         
     | 
| 
      
 278 
     | 
    
         
            +
                      },
         
     | 
| 
      
 279 
     | 
    
         
            +
                      'stringArray' => {
         
     | 
| 
      
 280 
     | 
    
         
            +
                        'type' => 'array',
         
     | 
| 
      
 281 
     | 
    
         
            +
                        'items' => { 'type' => 'string' },
         
     | 
| 
      
 282 
     | 
    
         
            +
                        'uniqueItems' => true,
         
     | 
| 
      
 283 
     | 
    
         
            +
                        'default' => []
         
     | 
| 
      
 284 
     | 
    
         
            +
                      }
         
     | 
| 
      
 285 
     | 
    
         
            +
                    }
         
     | 
| 
      
 286 
     | 
    
         
            +
                  }
         
     | 
| 
      
 287 
     | 
    
         
            +
                  META_DATA = {
         
     | 
| 
      
 288 
     | 
    
         
            +
                    '$schema' => 'https://json-schema.org/draft/2020-12/schema',
         
     | 
| 
      
 289 
     | 
    
         
            +
                    '$id' => 'https://json-schema.org/draft/2020-12/meta/meta-data',
         
     | 
| 
      
 290 
     | 
    
         
            +
                    '$dynamicAnchor' => 'meta',
         
     | 
| 
      
 291 
     | 
    
         
            +
                    'title' => 'Meta-data vocabulary meta-schema',
         
     | 
| 
      
 292 
     | 
    
         
            +
                    'type' => ['object', 'boolean'],
         
     | 
| 
      
 293 
     | 
    
         
            +
                    'properties' => {
         
     | 
| 
      
 294 
     | 
    
         
            +
                      'title' => {
         
     | 
| 
      
 295 
     | 
    
         
            +
                        'type' => 'string'
         
     | 
| 
      
 296 
     | 
    
         
            +
                      },
         
     | 
| 
      
 297 
     | 
    
         
            +
                      'description' => {
         
     | 
| 
      
 298 
     | 
    
         
            +
                        'type' => 'string'
         
     | 
| 
      
 299 
     | 
    
         
            +
                      },
         
     | 
| 
      
 300 
     | 
    
         
            +
                      'default' => true,
         
     | 
| 
      
 301 
     | 
    
         
            +
                      'deprecated' => {
         
     | 
| 
      
 302 
     | 
    
         
            +
                        'type' => 'boolean',
         
     | 
| 
      
 303 
     | 
    
         
            +
                        'default' => false
         
     | 
| 
      
 304 
     | 
    
         
            +
                      },
         
     | 
| 
      
 305 
     | 
    
         
            +
                      'readOnly' => {
         
     | 
| 
      
 306 
     | 
    
         
            +
                        'type' => 'boolean',
         
     | 
| 
      
 307 
     | 
    
         
            +
                        'default' => false
         
     | 
| 
      
 308 
     | 
    
         
            +
                      },
         
     | 
| 
      
 309 
     | 
    
         
            +
                      'writeOnly' => {
         
     | 
| 
      
 310 
     | 
    
         
            +
                        'type' => 'boolean',
         
     | 
| 
      
 311 
     | 
    
         
            +
                        'default' => false
         
     | 
| 
      
 312 
     | 
    
         
            +
                      },
         
     | 
| 
      
 313 
     | 
    
         
            +
                      'examples' => {
         
     | 
| 
      
 314 
     | 
    
         
            +
                        'type' => 'array',
         
     | 
| 
      
 315 
     | 
    
         
            +
                        'items' => true
         
     | 
| 
      
 316 
     | 
    
         
            +
                      }
         
     | 
| 
      
 317 
     | 
    
         
            +
                    }
         
     | 
| 
      
 318 
     | 
    
         
            +
                  }
         
     | 
| 
      
 319 
     | 
    
         
            +
                  FORMAT_ANNOTATION = {
         
     | 
| 
      
 320 
     | 
    
         
            +
                    '$schema' => 'https://json-schema.org/draft/2020-12/schema',
         
     | 
| 
      
 321 
     | 
    
         
            +
                    '$id' => 'https://json-schema.org/draft/2020-12/meta/format-annotation',
         
     | 
| 
      
 322 
     | 
    
         
            +
                    '$dynamicAnchor' => 'meta',
         
     | 
| 
      
 323 
     | 
    
         
            +
                    'title' => 'Format vocabulary meta-schema for annotation results',
         
     | 
| 
      
 324 
     | 
    
         
            +
                    'type' => ['object', 'boolean'],
         
     | 
| 
      
 325 
     | 
    
         
            +
                    'properties' => {
         
     | 
| 
      
 326 
     | 
    
         
            +
                      'format' => { 'type' => 'string' }
         
     | 
| 
      
 327 
     | 
    
         
            +
                    }
         
     | 
| 
      
 328 
     | 
    
         
            +
                  }
         
     | 
| 
      
 329 
     | 
    
         
            +
                  FORMAT_ASSERTION = {
         
     | 
| 
      
 330 
     | 
    
         
            +
                    '$schema' => 'https://json-schema.org/draft/2020-12/schema',
         
     | 
| 
      
 331 
     | 
    
         
            +
                    '$id' => 'https://json-schema.org/draft/2020-12/meta/format-assertion',
         
     | 
| 
      
 332 
     | 
    
         
            +
                    '$dynamicAnchor' => 'meta',
         
     | 
| 
      
 333 
     | 
    
         
            +
                    'title' => 'Format vocabulary meta-schema for assertion results',
         
     | 
| 
      
 334 
     | 
    
         
            +
                    'type' => ['object', 'boolean'],
         
     | 
| 
      
 335 
     | 
    
         
            +
                    'properties' => {
         
     | 
| 
      
 336 
     | 
    
         
            +
                      'format' => { 'type' => 'string' }
         
     | 
| 
      
 337 
     | 
    
         
            +
                    }
         
     | 
| 
      
 338 
     | 
    
         
            +
                  }
         
     | 
| 
      
 339 
     | 
    
         
            +
                  CONTENT = {
         
     | 
| 
      
 340 
     | 
    
         
            +
                    '$schema' => 'https://json-schema.org/draft/2020-12/schema',
         
     | 
| 
      
 341 
     | 
    
         
            +
                    '$id' => 'https://json-schema.org/draft/2020-12/meta/content',
         
     | 
| 
      
 342 
     | 
    
         
            +
                    '$dynamicAnchor' => 'meta',
         
     | 
| 
      
 343 
     | 
    
         
            +
                    'title' => 'Content vocabulary meta-schema',
         
     | 
| 
      
 344 
     | 
    
         
            +
                    'type' => ['object', 'boolean'],
         
     | 
| 
      
 345 
     | 
    
         
            +
                    'properties' => {
         
     | 
| 
      
 346 
     | 
    
         
            +
                      'contentEncoding' => { 'type' => 'string' },
         
     | 
| 
      
 347 
     | 
    
         
            +
                      'contentMediaType' => { 'type' => 'string' },
         
     | 
| 
      
 348 
     | 
    
         
            +
                      'contentSchema' => { '$dynamicRef' => '#meta' }
         
     | 
| 
      
 349 
     | 
    
         
            +
                    }
         
     | 
| 
      
 350 
     | 
    
         
            +
                  }
         
     | 
| 
      
 351 
     | 
    
         
            +
             
     | 
| 
      
 352 
     | 
    
         
            +
                  SCHEMAS = {
         
     | 
| 
      
 353 
     | 
    
         
            +
                    URI('https://json-schema.org/draft/2020-12/meta/core') => CORE,
         
     | 
| 
      
 354 
     | 
    
         
            +
                    URI('https://json-schema.org/draft/2020-12/meta/applicator') => APPLICATOR,
         
     | 
| 
      
 355 
     | 
    
         
            +
                    URI('https://json-schema.org/draft/2020-12/meta/unevaluated') => UNEVALUATED,
         
     | 
| 
      
 356 
     | 
    
         
            +
                    URI('https://json-schema.org/draft/2020-12/meta/validation') => VALIDATION,
         
     | 
| 
      
 357 
     | 
    
         
            +
                    URI('https://json-schema.org/draft/2020-12/meta/meta-data') => META_DATA,
         
     | 
| 
      
 358 
     | 
    
         
            +
                    URI('https://json-schema.org/draft/2020-12/meta/format-annotation') => FORMAT_ANNOTATION,
         
     | 
| 
      
 359 
     | 
    
         
            +
                    URI('https://json-schema.org/draft/2020-12/meta/format-assertion') => FORMAT_ASSERTION,
         
     | 
| 
      
 360 
     | 
    
         
            +
                    URI('https://json-schema.org/draft/2020-12/meta/content') => CONTENT
         
     | 
| 
      
 361 
     | 
    
         
            +
                  }
         
     | 
| 
      
 362 
     | 
    
         
            +
                end
         
     | 
| 
      
 363 
     | 
    
         
            +
              end
         
     | 
| 
      
 364 
     | 
    
         
            +
            end
         
     |