Skip to content

Commit

Permalink
Update validation.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Jun 29, 2024
1 parent 2c21138 commit 24e52d1
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,6 @@ function _validate_entry(x, schema::Bool, path::String)
return schema ? nothing : SingleIssue(x, path, "schema", schema)
end

"""
_resolve_refs(schema, explored_refs = Any[])
Resolves any `"\$ref"` keys it encounters.
Note: This is recursive function and will continue to resolve references until no more are found.
"""
function _resolve_refs(schema::AbstractDict, explored_refs = Any[schema])
if !haskey(schema, "\$ref")
return schema
Expand Down Expand Up @@ -171,7 +165,7 @@ function _validate(x, schema, ::Val{:if}, val, path::String)
if haskey(schema, "then") || haskey(schema, "else")
return _if_then_else(x, schema, path)
end
return
return
end

# 9.2.2.2: then
Expand All @@ -180,7 +174,7 @@ function _validate(x, schema, ::Val{:then}, val, path::String)
if haskey(schema, "if")
return _if_then_else(x, schema, path)
end
return
return
end

# 9.2.2.3: else
Expand All @@ -189,7 +183,7 @@ function _validate(x, schema, ::Val{:else}, val, path::String)
if haskey(schema, "if")
return _if_then_else(x, schema, path)
end
return
return
end

"""
Expand Down

0 comments on commit 24e52d1

Please sign in to comment.