[Vendor] update go-swagger v0.21.0 -> v0.25.0 (#12670)

* Update go-swagger

* vendor
This commit is contained in:
6543 2020-09-01 16:01:23 +02:00 committed by GitHub
parent 66843f2237
commit 3270e7a443
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
350 changed files with 26353 additions and 5552 deletions

View file

@ -86,12 +86,7 @@ func (r *schemaLoader) transitiveResolver(basePath string, ref Ref) (*schemaLoad
newOptions := r.options
newOptions.RelativeBase = rootURL.String()
debugLog("setting new root: %s", newOptions.RelativeBase)
resolver, err := defaultSchemaLoader(root, newOptions, r.cache, r.context)
if err != nil {
return nil, err
}
return resolver, nil
return defaultSchemaLoader(root, newOptions, r.cache, r.context)
}
func (r *schemaLoader) updateBasePath(transitive *schemaLoader, basePath string) string {
@ -154,7 +149,15 @@ func (r *schemaLoader) load(refURL *url.URL) (interface{}, url.URL, bool, error)
toFetch := *refURL
toFetch.Fragment = ""
normalized := normalizeAbsPath(toFetch.String())
var err error
path := toFetch.String()
if path == rootBase {
path, err = absPath(rootBase)
if err != nil {
return nil, url.URL{}, false, err
}
}
normalized := normalizeAbsPath(path)
data, fromCache := r.cache.Get(normalized)
if !fromCache {