From 6bc6d01ec67706c85484c9aba8ceb1f57fb76eb2 Mon Sep 17 00:00:00 2001 From: odow Date: Fri, 23 Aug 2024 20:12:00 +1200 Subject: [PATCH] Update --- src/schema.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/schema.jl b/src/schema.jl index 1166133..8dc4e8a 100644 --- a/src/schema.jl +++ b/src/schema.jl @@ -97,7 +97,9 @@ function find_ref( path::String, parent_dir::String, ) - if path == "" || path == "#" # This path refers to the root schema. + if haskey(id_map, path) + return id_map[path] # An exact path exists. Get it. + elseif path == "" || path == "#" # This path refers to the root schema. return id_map[string(uri)] elseif startswith(path, "#/") # This path is a JPointer. return get_element(id_map[string(uri)], path[3:end])