diff --git a/datamodel/low/extraction_functions.go b/datamodel/low/extraction_functions.go index acf4a82..4268213 100644 --- a/datamodel/low/extraction_functions.go +++ b/datamodel/low/extraction_functions.go @@ -110,18 +110,12 @@ func LocateRefNodeWithContext(ctx context.Context, root *yaml.Node, idx *index.S } else { if specPath != "" { var abs string - // multi file ref, looking for the root. - if filepath.Base(specPath) == "root.yaml" && explodedRefValue[0] == "" { + if explodedRefValue[0] == "" { abs = specPath } else { - if explodedRefValue[0] == "" { - abs = specPath - } else { - abs, _ = filepath.Abs(filepath.Join(filepath.Dir(specPath), explodedRefValue[0])) - } + abs, _ = filepath.Abs(filepath.Join(filepath.Dir(specPath), explodedRefValue[0])) } rv = fmt.Sprintf("%s#%s", abs, explodedRefValue[1]) - } else { // check for a config baseURL and use that if it exists.