forked from forgejo/forgejo
[Vendor] update go-swagger v0.21.0 -> v0.25.0 (#12670)
* Update go-swagger * vendor
This commit is contained in:
parent
66843f2237
commit
3270e7a443
350 changed files with 26353 additions and 5552 deletions
9
vendor/github.com/go-openapi/spec/expander.go
generated
vendored
9
vendor/github.com/go-openapi/spec/expander.go
generated
vendored
|
@ -200,11 +200,11 @@ func ExpandSpec(spec *Swagger, options *ExpandOptions) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
const rootBase = "root"
|
||||
// baseForRoot loads in the cache the root document and produces a fake "root" base path entry
|
||||
// for further $ref resolution
|
||||
func baseForRoot(root interface{}, cache ResolutionCache) string {
|
||||
// cache the root document to resolve $ref's
|
||||
const rootBase = "root"
|
||||
if root != nil {
|
||||
base, _ := absPath(rootBase)
|
||||
normalizedBase := normalizeAbsPath(base)
|
||||
|
@ -452,11 +452,12 @@ func expandPathItem(pathItem *PathItem, resolver *schemaLoader, basePath string)
|
|||
return err
|
||||
}
|
||||
if pathItem.Ref.String() != "" {
|
||||
var err error
|
||||
resolver, err = resolver.transitiveResolver(basePath, pathItem.Ref)
|
||||
if resolver.shouldStopOnError(err) {
|
||||
transitiveResolver, err := resolver.transitiveResolver(basePath, pathItem.Ref)
|
||||
if transitiveResolver.shouldStopOnError(err) {
|
||||
return err
|
||||
}
|
||||
basePath = transitiveResolver.updateBasePath(resolver, basePath)
|
||||
resolver = transitiveResolver
|
||||
}
|
||||
pathItem.Ref = Ref{}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue