Update go-restful to get stable sorting in spec

This commit is contained in:
Kris Rousey
2015-05-28 12:52:20 -07:00
parent f015a21026
commit 05eaaa99e1
25 changed files with 535 additions and 177 deletions

View File

@@ -35,6 +35,7 @@ type ParameterData struct {
Required bool
AllowableValues map[string]string
AllowMultiple bool
DefaultValue string
}
// Data returns the state of the Parameter
@@ -70,26 +71,32 @@ func (p *Parameter) beForm() *Parameter {
return p
}
// Required sets the required field and return the receiver
// Required sets the required field and returns the receiver
func (p *Parameter) Required(required bool) *Parameter {
p.data.Required = required
return p
}
// AllowMultiple sets the allowMultiple field and return the receiver
// AllowMultiple sets the allowMultiple field and returns the receiver
func (p *Parameter) AllowMultiple(multiple bool) *Parameter {
p.data.AllowMultiple = multiple
return p
}
// AllowableValues sets the allowableValues field and return the receiver
// AllowableValues sets the allowableValues field and returns the receiver
func (p *Parameter) AllowableValues(values map[string]string) *Parameter {
p.data.AllowableValues = values
return p
}
// DataType sets the dataType field and return the receiver
// DataType sets the dataType field and returns the receiver
func (p *Parameter) DataType(typeName string) *Parameter {
p.data.DataType = typeName
return p
}
// DefaultValue sets the default value field and returnw the receiver
func (p *Parameter) DefaultValue(stringRepresentation string) *Parameter {
p.data.DefaultValue = stringRepresentation
return p
}