mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
More cleaning and added docs.
We’re ready for review Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
@@ -102,7 +102,6 @@ func (index *SpecIndex) lookupRolodex(uri []string) *Reference {
|
||||
var absoluteFileLocation, fileName string
|
||||
|
||||
// is this a local or a remote file?
|
||||
|
||||
fileName = filepath.Base(file)
|
||||
if filepath.IsAbs(file) || strings.HasPrefix(file, "http") {
|
||||
absoluteFileLocation = file
|
||||
@@ -119,14 +118,11 @@ func (index *SpecIndex) lookupRolodex(uri []string) *Reference {
|
||||
|
||||
// if the absolute file location has no file ext, then get the rolodex root.
|
||||
ext := filepath.Ext(absoluteFileLocation)
|
||||
|
||||
var parsedDocument *yaml.Node
|
||||
var err error
|
||||
|
||||
idx := index
|
||||
|
||||
if ext != "" {
|
||||
|
||||
// extract the document from the rolodex.
|
||||
rFile, rError := index.rolodex.Open(absoluteFileLocation)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user