From 2a239b61b1e26a2c6c935449265f8566f9bcab98 Mon Sep 17 00:00:00 2001 From: David Harsha Date: Sat, 24 Aug 2024 13:55:22 -0700 Subject: [PATCH] Drop `Schema` schema validation methods from docs These don't work very well because the schema is parsed before validation occurs, which can raise errors. See: - https://github.com/davishmcclurg/json_schemer/issues/167#issuecomment-1974909924 - https://github.com/davishmcclurg/json_schemer/issues/194 --- README.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/README.md b/README.md index 42c1d87..cdbb542 100644 --- a/README.md +++ b/README.md @@ -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 = {