vendor: update buildkit to master@8b7bcb900d3c

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2023-03-29 12:38:36 +01:00
parent c6cdcb02cf
commit 9541457c54
416 changed files with 24398 additions and 16253 deletions

View File

@ -21,6 +21,8 @@ import (
"strings"
"github.com/go-openapi/swag"
"k8s.io/kube-openapi/pkg/internal"
jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
)
// BooleanProperty creates a boolean property
@ -465,6 +467,10 @@ func (s Schema) MarshalJSON() ([]byte, error) {
// UnmarshalJSON marshal this from JSON
func (s *Schema) UnmarshalJSON(data []byte) error {
if internal.UseOptimizedJSONUnmarshaling {
return jsonv2.Unmarshal(data, s)
}
props := struct {
SchemaProps
SwaggerSchemaProps
@ -511,3 +517,38 @@ func (s *Schema) UnmarshalJSON(data []byte) error {
return nil
}
func (s *Schema) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
var x struct {
Extensions
SchemaProps
SwaggerSchemaProps
}
if err := opts.UnmarshalNext(dec, &x); err != nil {
return err
}
if err := x.Ref.fromMap(x.Extensions); err != nil {
return err
}
if err := x.Schema.fromMap(x.Extensions); err != nil {
return err
}
delete(x.Extensions, "$ref")
delete(x.Extensions, "$schema")
for _, pn := range swag.DefaultJSONNameProvider.GetJSONNames(s) {
delete(x.Extensions, pn)
}
if len(x.Extensions) == 0 {
x.Extensions = nil
}
s.ExtraProps = x.Extensions.sanitizeWithExtra()
s.VendorExtensible.Extensions = x.Extensions
s.SchemaProps = x.SchemaProps
s.SwaggerSchemaProps = x.SwaggerSchemaProps
return nil
}