mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-07 12:37:48 +00:00
Addressed comments from review and fixed bug with schema props
props did not have context, therefore they had no idea where they were or where to resolve from. Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
@@ -109,8 +109,17 @@ func LocateRefNodeWithContext(ctx context.Context, root *yaml.Node, idx *index.S
|
||||
|
||||
} else {
|
||||
if specPath != "" {
|
||||
|
||||
abs, _ := filepath.Abs(filepath.Join(filepath.Dir(specPath), explodedRefValue[0]))
|
||||
var abs string
|
||||
// multi file ref, looking for the root.
|
||||
if filepath.Base(specPath) == "root.yaml" && explodedRefValue[0] == "" {
|
||||
abs = specPath
|
||||
} else {
|
||||
if explodedRefValue[0] == "" {
|
||||
abs = specPath
|
||||
} else {
|
||||
abs, _ = filepath.Abs(filepath.Join(filepath.Dir(specPath), explodedRefValue[0]))
|
||||
}
|
||||
}
|
||||
rv = fmt.Sprintf("%s#%s", abs, explodedRefValue[1])
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user