Working through windows support

This commit is contained in:
quobix
2024-01-14 17:36:39 -05:00
parent f4647af7b4
commit e699968768
11 changed files with 424 additions and 158 deletions

View File

@@ -134,11 +134,11 @@ func extractRequiredReferenceProperties(fulldef string, idx *SpecIndex, required
abs, _ = filepath.Abs(filepath.Join(filepath.Dir(u.Path), r[0]))
}
u.Path = abs
u.Path = utils.ReplaceWindowsDriveWithLinuxPath(abs)
u.Fragment = ""
defPath = fmt.Sprintf("%s#/%s", u.String(), r[1])
} else {
u.Path = filepath.Join(filepath.Dir(u.Path), r[0])
u.Path = utils.ReplaceWindowsDriveWithLinuxPath(filepath.Join(filepath.Dir(u.Path), r[0]))
u.Fragment = ""
defPath = u.String()
}
@@ -166,11 +166,11 @@ func extractRequiredReferenceProperties(fulldef string, idx *SpecIndex, required
r := strings.Split(refName, "#/")
if len(r) == 2 {
abs, _ := filepath.Abs(filepath.Join(filepath.Dir(u.Path), r[0]))
u.Path = abs
u.Path = utils.ReplaceWindowsDriveWithLinuxPath(abs)
u.Fragment = ""
defPath = fmt.Sprintf("%s#/%s", u.String(), r[1])
} else {
u.Path = filepath.Join(filepath.Dir(u.Path), r[0])
u.Path = utils.ReplaceWindowsDriveWithLinuxPath(filepath.Join(filepath.Dir(u.Path), r[0]))
u.Fragment = ""
defPath = u.String()
}