update kube-openapi

hack/pin-dependency.sh k8s.io/kube-openapi 172d655c2280350c77cf05962948fc67ff043492
hack/update-vendor.sh
This commit is contained in:
Alexander Zielenski
2022-10-13 19:51:22 -07:00
parent 5113b705d2
commit f622dd918a
80 changed files with 10336 additions and 91 deletions

View File

@@ -18,6 +18,7 @@ import (
"encoding/json"
"github.com/go-openapi/swag"
jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
)
// SecuritySchemeProps describes a swagger security scheme in the securityDefinitions section
@@ -62,3 +63,20 @@ func (s *SecurityScheme) UnmarshalJSON(data []byte) error {
}
return json.Unmarshal(data, &s.VendorExtensible)
}
func (s *SecurityScheme) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
var x struct {
Extensions
SecuritySchemeProps
}
if err := opts.UnmarshalNext(dec, &x); err != nil {
return err
}
x.Extensions.sanitize()
if len(x.Extensions) == 0 {
x.Extensions = nil
}
s.VendorExtensible.Extensions = x.Extensions
s.SecuritySchemeProps = x.SecuritySchemeProps
return nil
}