mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
godeps: bump go-openapi
This commit is contained in:
parent
6e856480c0
commit
1e90823c3b
2
Godeps/Godeps.json
generated
2
Godeps/Godeps.json
generated
@ -1251,7 +1251,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/go-openapi/spec",
|
"ImportPath": "github.com/go-openapi/spec",
|
||||||
"Rev": "7abd5745472fff5eb3685386d5fb8bf38683154d"
|
"Rev": "1de3e0542de65ad8d75452a595886fdd0befb363"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/go-openapi/strfmt",
|
"ImportPath": "github.com/go-openapi/strfmt",
|
||||||
|
@ -404,7 +404,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/go-openapi/spec",
|
"ImportPath": "github.com/go-openapi/spec",
|
||||||
"Rev": "7abd5745472fff5eb3685386d5fb8bf38683154d"
|
"Rev": "1de3e0542de65ad8d75452a595886fdd0befb363"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/go-openapi/strfmt",
|
"ImportPath": "github.com/go-openapi/strfmt",
|
||||||
|
2
staging/src/k8s.io/apiserver/Godeps/Godeps.json
generated
2
staging/src/k8s.io/apiserver/Godeps/Godeps.json
generated
@ -388,7 +388,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/go-openapi/spec",
|
"ImportPath": "github.com/go-openapi/spec",
|
||||||
"Rev": "7abd5745472fff5eb3685386d5fb8bf38683154d"
|
"Rev": "1de3e0542de65ad8d75452a595886fdd0befb363"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/go-openapi/swag",
|
"ImportPath": "github.com/go-openapi/swag",
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/go-openapi/spec",
|
"ImportPath": "github.com/go-openapi/spec",
|
||||||
"Rev": "7abd5745472fff5eb3685386d5fb8bf38683154d"
|
"Rev": "1de3e0542de65ad8d75452a595886fdd0befb363"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/go-openapi/swag",
|
"ImportPath": "github.com/go-openapi/swag",
|
||||||
|
@ -128,7 +128,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/go-openapi/spec",
|
"ImportPath": "github.com/go-openapi/spec",
|
||||||
"Rev": "7abd5745472fff5eb3685386d5fb8bf38683154d"
|
"Rev": "1de3e0542de65ad8d75452a595886fdd0befb363"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/go-openapi/swag",
|
"ImportPath": "github.com/go-openapi/swag",
|
||||||
|
@ -120,7 +120,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/go-openapi/spec",
|
"ImportPath": "github.com/go-openapi/spec",
|
||||||
"Rev": "7abd5745472fff5eb3685386d5fb8bf38683154d"
|
"Rev": "1de3e0542de65ad8d75452a595886fdd0befb363"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/go-openapi/swag",
|
"ImportPath": "github.com/go-openapi/swag",
|
||||||
|
706
vendor/github.com/go-openapi/spec/expander.go
generated
vendored
706
vendor/github.com/go-openapi/spec/expander.go
generated
vendored
File diff suppressed because it is too large
Load Diff
12
vendor/github.com/go-openapi/spec/items.go
generated
vendored
12
vendor/github.com/go-openapi/spec/items.go
generated
vendored
@ -28,6 +28,7 @@ type SimpleSchema struct {
|
|||||||
Items *Items `json:"items,omitempty"`
|
Items *Items `json:"items,omitempty"`
|
||||||
CollectionFormat string `json:"collectionFormat,omitempty"`
|
CollectionFormat string `json:"collectionFormat,omitempty"`
|
||||||
Default interface{} `json:"default,omitempty"`
|
Default interface{} `json:"default,omitempty"`
|
||||||
|
Example interface{} `json:"example,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SimpleSchema) TypeName() string {
|
func (s *SimpleSchema) TypeName() string {
|
||||||
@ -178,9 +179,14 @@ func (i *Items) UnmarshalJSON(data []byte) error {
|
|||||||
if err := json.Unmarshal(data, &simpleSchema); err != nil {
|
if err := json.Unmarshal(data, &simpleSchema); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
var vendorExtensible VendorExtensible
|
||||||
|
if err := json.Unmarshal(data, &vendorExtensible); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
i.Refable = ref
|
i.Refable = ref
|
||||||
i.CommonValidations = validations
|
i.CommonValidations = validations
|
||||||
i.SimpleSchema = simpleSchema
|
i.SimpleSchema = simpleSchema
|
||||||
|
i.VendorExtensible = vendorExtensible
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,7 +204,11 @@ func (i Items) MarshalJSON() ([]byte, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return swag.ConcatJSON(b3, b1, b2), nil
|
b4, err := json.Marshal(i.VendorExtensible)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return swag.ConcatJSON(b4, b3, b1, b2), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// JSONLookup look up a value by the json property name
|
// JSONLookup look up a value by the json property name
|
||||||
|
27
vendor/github.com/go-openapi/spec/operation.go
generated
vendored
27
vendor/github.com/go-openapi/spec/operation.go
generated
vendored
@ -31,11 +31,36 @@ type OperationProps struct {
|
|||||||
ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"`
|
ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"`
|
||||||
ID string `json:"operationId,omitempty"`
|
ID string `json:"operationId,omitempty"`
|
||||||
Deprecated bool `json:"deprecated,omitempty"`
|
Deprecated bool `json:"deprecated,omitempty"`
|
||||||
Security []map[string][]string `json:"security,omitempty"`
|
Security []map[string][]string `json:"security,omitempty"` //Special case, see MarshalJSON function
|
||||||
Parameters []Parameter `json:"parameters,omitempty"`
|
Parameters []Parameter `json:"parameters,omitempty"`
|
||||||
Responses *Responses `json:"responses,omitempty"`
|
Responses *Responses `json:"responses,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MarshalJSON takes care of serializing operation properties to JSON
|
||||||
|
//
|
||||||
|
// We use a custom marhaller here to handle a special cases related
|
||||||
|
// the Security field. We need to preserve zero length slice
|
||||||
|
// while omiting the field when the value is nil/unset.
|
||||||
|
func (op OperationProps) MarshalJSON() ([]byte, error) {
|
||||||
|
type Alias OperationProps
|
||||||
|
if op.Security == nil {
|
||||||
|
return json.Marshal(&struct {
|
||||||
|
Security []map[string][]string `json:"security,omitempty"`
|
||||||
|
*Alias
|
||||||
|
}{
|
||||||
|
Security: op.Security,
|
||||||
|
Alias: (*Alias)(&op),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return json.Marshal(&struct {
|
||||||
|
Security []map[string][]string `json:"security"`
|
||||||
|
*Alias
|
||||||
|
}{
|
||||||
|
Security: op.Security,
|
||||||
|
Alias: (*Alias)(&op),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Operation describes a single API operation on a path.
|
// Operation describes a single API operation on a path.
|
||||||
//
|
//
|
||||||
// For more information: http://goo.gl/8us55a#operationObject
|
// For more information: http://goo.gl/8us55a#operationObject
|
||||||
|
3
vendor/github.com/go-openapi/spec/ref.go
generated
vendored
3
vendor/github.com/go-openapi/spec/ref.go
generated
vendored
@ -145,7 +145,10 @@ func (r *Ref) UnmarshalJSON(d []byte) error {
|
|||||||
if err := json.Unmarshal(d, &v); err != nil {
|
if err := json.Unmarshal(d, &v); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
return r.fromMap(v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *Ref) fromMap(v map[string]interface{}) error {
|
||||||
if v == nil {
|
if v == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
26
vendor/github.com/go-openapi/spec/schema.go
generated
vendored
26
vendor/github.com/go-openapi/spec/schema.go
generated
vendored
@ -135,6 +135,10 @@ func (r *SchemaURL) UnmarshalJSON(data []byte) error {
|
|||||||
if err := json.Unmarshal(data, &v); err != nil {
|
if err := json.Unmarshal(data, &v); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
return r.fromMap(v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *SchemaURL) fromMap(v map[string]interface{}) error {
|
||||||
if v == nil {
|
if v == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -582,18 +586,17 @@ func (s Schema) MarshalJSON() ([]byte, error) {
|
|||||||
|
|
||||||
// UnmarshalJSON marshal this from JSON
|
// UnmarshalJSON marshal this from JSON
|
||||||
func (s *Schema) UnmarshalJSON(data []byte) error {
|
func (s *Schema) UnmarshalJSON(data []byte) error {
|
||||||
var sch Schema
|
props := struct {
|
||||||
if err := json.Unmarshal(data, &sch.SchemaProps); err != nil {
|
SchemaProps
|
||||||
|
SwaggerSchemaProps
|
||||||
|
}{}
|
||||||
|
if err := json.Unmarshal(data, &props); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := json.Unmarshal(data, &sch.Ref); err != nil {
|
|
||||||
return err
|
sch := Schema{
|
||||||
}
|
SchemaProps: props.SchemaProps,
|
||||||
if err := json.Unmarshal(data, &sch.Schema); err != nil {
|
SwaggerSchemaProps: props.SwaggerSchemaProps,
|
||||||
return err
|
|
||||||
}
|
|
||||||
if err := json.Unmarshal(data, &sch.SwaggerSchemaProps); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var d map[string]interface{}
|
var d map[string]interface{}
|
||||||
@ -601,6 +604,9 @@ func (s *Schema) UnmarshalJSON(data []byte) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sch.Ref.fromMap(d)
|
||||||
|
sch.Schema.fromMap(d)
|
||||||
|
|
||||||
delete(d, "$ref")
|
delete(d, "$ref")
|
||||||
delete(d, "$schema")
|
delete(d, "$schema")
|
||||||
for _, pn := range swag.DefaultJSONNameProvider.GetJSONNames(s) {
|
for _, pn := range swag.DefaultJSONNameProvider.GetJSONNames(s) {
|
||||||
|
Loading…
Reference in New Issue
Block a user