update prometheus dependencies (#5520)
Signed-off-by: junot <junotxiang@kubesphere.io>
This commit is contained in:
11
vendor/github.com/go-openapi/spec/parameter.go
generated
vendored
11
vendor/github.com/go-openapi/spec/parameter.go
generated
vendored
@@ -39,8 +39,7 @@ func PathParam(name string) *Parameter {
|
||||
|
||||
// BodyParam creates a body parameter
|
||||
func BodyParam(name string, schema *Schema) *Parameter {
|
||||
return &Parameter{ParamProps: ParamProps{Name: name, In: "body", Schema: schema},
|
||||
SimpleSchema: SimpleSchema{Type: "object"}}
|
||||
return &Parameter{ParamProps: ParamProps{Name: name, In: "body", Schema: schema}}
|
||||
}
|
||||
|
||||
// FormDataParam creates a body parameter
|
||||
@@ -58,7 +57,7 @@ func FileParam(name string) *Parameter {
|
||||
func SimpleArrayParam(name, tpe, fmt string) *Parameter {
|
||||
return &Parameter{ParamProps: ParamProps{Name: name},
|
||||
SimpleSchema: SimpleSchema{Type: jsonArray, CollectionFormat: "csv",
|
||||
Items: &Items{SimpleSchema: SimpleSchema{Type: "string", Format: fmt}}}}
|
||||
Items: &Items{SimpleSchema: SimpleSchema{Type: tpe, Format: fmt}}}}
|
||||
}
|
||||
|
||||
// ParamRef creates a parameter that's a json reference
|
||||
@@ -278,6 +277,12 @@ func (p *Parameter) AllowDuplicates() *Parameter {
|
||||
return p
|
||||
}
|
||||
|
||||
// WithValidations is a fluent method to set parameter validations
|
||||
func (p *Parameter) WithValidations(val CommonValidations) *Parameter {
|
||||
p.SetValidations(SchemaValidations{CommonValidations: val})
|
||||
return p
|
||||
}
|
||||
|
||||
// UnmarshalJSON hydrates this items instance with the data from JSON
|
||||
func (p *Parameter) UnmarshalJSON(data []byte) error {
|
||||
if err := json.Unmarshal(data, &p.CommonValidations); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user