mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-10 12:37:48 +00:00
@@ -1261,8 +1261,8 @@ func ExtractSchema(ctx context.Context, root *yaml.Node, idx *index.SpecIndex) (
|
|||||||
ctx = nCtx
|
ctx = nCtx
|
||||||
idx = fIdx
|
idx = fIdx
|
||||||
} else {
|
} else {
|
||||||
v := schNode.Content[1].Value
|
v := root.Content[1].Value
|
||||||
if schNode.Content[1].Value == "" {
|
if root.Content[1].Value == "" {
|
||||||
v = "[empty]"
|
v = "[empty]"
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf(errStr,
|
return nil, fmt.Errorf(errStr,
|
||||||
|
|||||||
@@ -287,10 +287,6 @@ func (i *RemoteFS) Open(remoteURL string) (fs.File, error) {
|
|||||||
return r.(*RemoteFile), nil
|
return r.(*RemoteFile), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if remoteParsedURL.Scheme == "" {
|
|
||||||
return nil, nil // not a remote file, nothing wrong with that - just we can't keep looking here partner.
|
|
||||||
}
|
|
||||||
|
|
||||||
// if we're processing, we need to block and wait for the file to be processed
|
// if we're processing, we need to block and wait for the file to be processed
|
||||||
// try path first
|
// try path first
|
||||||
if _, ok := i.ProcessingFiles.Load(remoteParsedURL.Path); ok {
|
if _, ok := i.ProcessingFiles.Load(remoteParsedURL.Path); ok {
|
||||||
@@ -338,6 +334,11 @@ func (i *RemoteFS) Open(remoteURL string) (fs.File, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if remoteParsedURL.Scheme == "" {
|
||||||
|
i.ProcessingFiles.Delete(remoteParsedURL.Path)
|
||||||
|
return nil, nil // not a remote file, nothing wrong with that - just we can't keep looking here partner.
|
||||||
|
}
|
||||||
|
|
||||||
i.logger.Debug("loading remote file", "file", remoteURL, "remoteURL", remoteParsedURL.String())
|
i.logger.Debug("loading remote file", "file", remoteURL, "remoteURL", remoteParsedURL.String())
|
||||||
|
|
||||||
response, clientErr := i.RemoteHandlerFunc(remoteParsedURL.String())
|
response, clientErr := i.RemoteHandlerFunc(remoteParsedURL.String())
|
||||||
|
|||||||
Reference in New Issue
Block a user