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
14
vendor/github.com/go-openapi/validate/formats.go
generated
vendored
14
vendor/github.com/go-openapi/validate/formats.go
generated
vendored
|
@ -37,19 +37,15 @@ func (f *formatValidator) Applies(source interface{}, kind reflect.Kind) bool {
|
|||
if source == nil {
|
||||
return false
|
||||
}
|
||||
switch source.(type) {
|
||||
switch source := source.(type) {
|
||||
case *spec.Items:
|
||||
it := source.(*spec.Items)
|
||||
return kind == reflect.String && f.KnownFormats.ContainsName(it.Format)
|
||||
return kind == reflect.String && f.KnownFormats.ContainsName(source.Format)
|
||||
case *spec.Parameter:
|
||||
par := source.(*spec.Parameter)
|
||||
return kind == reflect.String && f.KnownFormats.ContainsName(par.Format)
|
||||
return kind == reflect.String && f.KnownFormats.ContainsName(source.Format)
|
||||
case *spec.Schema:
|
||||
sch := source.(*spec.Schema)
|
||||
return kind == reflect.String && f.KnownFormats.ContainsName(sch.Format)
|
||||
return kind == reflect.String && f.KnownFormats.ContainsName(source.Format)
|
||||
case *spec.Header:
|
||||
hdr := source.(*spec.Header)
|
||||
return kind == reflect.String && f.KnownFormats.ContainsName(hdr.Format)
|
||||
return kind == reflect.String && f.KnownFormats.ContainsName(source.Format)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue