Skip to content

Commit

Permalink
Drop Schema schema validation methods from docs
Browse files Browse the repository at this point in the history
These don't work very well because the schema is parsed before
validation occurs, which can raise errors.

See:
- #167 (comment)
- #194
  • Loading branch information
davishmcclurg committed Aug 24, 2024
1 parent 5e4cfe1 commit 2a239b6
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,6 @@ JSONSchemer.validate_schema({ '$id' => '#invalid' }).to_a
# "type"=>"pattern",
# "error"=>"string at `/$id` does not match pattern: ^[^#]*#?$"}]

JSONSchemer.schema({ '$id' => 'valid' }).valid_schema?
# => true

JSONSchemer.schema({ '$id' => '#invalid' }).validate_schema.to_a
# => [{"data"=>"#invalid",
# "data_pointer"=>"/$id",
# "schema"=>{"$ref"=>"#/$defs/uriReferenceString", "$comment"=>"Non-empty fragments not allowed.", "pattern"=>"^[^#]*#?$"},
# "schema_pointer"=>"/properties/$id",
# "root_schema"=>{...meta schema},
# "type"=>"pattern",
# "error"=>"string at `/$id` does not match pattern: ^[^#]*#?$"}]

# subschemas

schema = {
Expand Down

0 comments on commit 2a239b6

Please sign in to comment.