mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-10 20:47:44 +00:00
@@ -1261,8 +1261,8 @@ func ExtractSchema(ctx context.Context, root *yaml.Node, idx *index.SpecIndex) (
|
||||
ctx = nCtx
|
||||
idx = fIdx
|
||||
} else {
|
||||
v := schNode.Content[1].Value
|
||||
if schNode.Content[1].Value == "" {
|
||||
v := root.Content[1].Value
|
||||
if root.Content[1].Value == "" {
|
||||
v = "[empty]"
|
||||
}
|
||||
return nil, fmt.Errorf(errStr,
|
||||
|
||||
@@ -287,10 +287,6 @@ func (i *RemoteFS) Open(remoteURL string) (fs.File, error) {
|
||||
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
|
||||
// try path first
|
||||
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())
|
||||
|
||||
response, clientErr := i.RemoteHandlerFunc(remoteParsedURL.String())
|
||||
|
||||
Reference in New Issue
Block a user