You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSONSchemer.schema still doesn't support invalid schemas (and likely won't). I don't want every schema object to have to take the hit of validating the provided schema before parsing. When working with schemas that are potentially invalid, it's best to check them with JSONSchemer.valid_schema? first.
Now that I think of it, JSONSchemer::Schema#valid_schema? and JSONSchemer::Schema#validate_schema were probably mistakes to begin with—may want to deprecate in the future.
Please use JSONSchemer.valid_schema? (or JSONSchemer.validate_schema) instead:
schema_definition={"type"=>"string","pattern"=>"/(/",}JSONSchemer.validate_schema(schema_definition).map{_1["error"]}# ["value at `/pattern` does not match format: regex"]
The following raises a
RegexpError
instead of reporting that the regex is invalidResult:
end pattern with unmatched parenthesis: /\/(\// (RegexpError)
The text was updated successfully, but these errors were encountered: