func (p *Parameter) WithEnum(values ...interface{}) *Parameter {
	p.Enum = append([]interface{}{}, values...)
	return p
}
WithEnum sets a the enum values (replace)
package spec
import (
	"encoding/json"
	"github.com/go-openapi/jsonpointer"
	"github.com/go-openapi/swag"
)
func QueryParam(name string) *Parameter {
	return &Parameter{ParamProps: ParamProps{Name: name, In: "query"}}
}
func HeaderParam(name string) *Parameter {
	return &Parameter{ParamProps: ParamProps{Name: name, In: "header", Required: true}}
}
func PathParam(name string) *Parameter {
	return &Parameter{ParamProps: ParamProps{Name: name, In: "path", Required: true}}
}
func BodyParam(name string, schema *Schema) *Parameter {
	return &Parameter{ParamProps: ParamProps{Name: name, In: "body", Schema: schema}, SimpleSchema: SimpleSchema{Type: "object"}}
}
func FormDataParam(name string) *Parameter {
	return &Parameter{ParamProps: ParamProps{Name: name, In: "formData"}}
}
func FileParam(name string) *Parameter {
	return &Parameter{ParamProps: ParamProps{Name: name, In: "formData"}, SimpleSchema: SimpleSchema{Type: "file"}}
}
func SimpleArrayParam(name, tpe, fmt string) *Parameter {
	return &Parameter{ParamProps: ParamProps{Name: name}, SimpleSchema: SimpleSchema{Type: "array", CollectionFormat: "csv", Items: &Items{SimpleSchema: SimpleSchema{Type: "string", Format: fmt}}}}
}
func ParamRef(uri string) *Parameter {
	p := new(Parameter)
	p.Ref = MustCreateRef(uri)
	return p
}
type ParamProps struct {
	Description     string  `json:"description,omitempty"`
	Name            string  `json:"name,omitempty"`
	In              string  `json:"in,omitempty"`
	Required        bool    `json:"required,omitempty"`
	Schema          *Schema `json:"schema,omitempty"`           
	AllowEmptyValue bool    `json:"allowEmptyValue,omitempty"`  
}
type Parameter struct {
	Refable
	CommonValidations
	SimpleSchema
	VendorExtensible
	ParamProps
}
func (p Parameter) JSONLookup(token string) (interface{}, error) {
	if ex, ok := p.Extensions[token]; ok {
		return &ex, nil
	}
	if token == "$ref" {
		return &p.Ref, nil
	}
	r, _, err := jsonpointer.GetForToken(p.CommonValidations, token)
	if err != nil {
		return nil, err
	}
	if r != nil {
		return r, nil
	}
	r, _, err = jsonpointer.GetForToken(p.SimpleSchema, token)
	if err != nil {
		return nil, err
	}
	if r != nil {
		return r, nil
	}
	r, _, err = jsonpointer.GetForToken(p.ParamProps, token)
	return r, err
}
func (p *Parameter) WithDescription(description string) *Parameter {
	p.Description = description
	return p
}
func (p *Parameter) Named(name string) *Parameter {
	p.Name = name
	return p
}
func (p *Parameter) WithLocation(in string) *Parameter {
	p.In = in
	return p
}
func (p *Parameter) Typed(tpe, format string) *Parameter {
	p.Type = tpe
	p.Format = format
	return p
}
func (p *Parameter) CollectionOf(items *Items, format string) *Parameter {
	p.Type = "array"
	p.Items = items
	p.CollectionFormat = format
	return p
}
func (p *Parameter) WithDefault(defaultValue interface{}) *Parameter {
	p.AsOptional()  
	p.Default = defaultValue
	return p
}
func (p *Parameter) AllowsEmptyValues() *Parameter {
	p.AllowEmptyValue = true
	return p
}
func (p *Parameter) NoEmptyValues() *Parameter {
	p.AllowEmptyValue = false
	return p
}
func (p *Parameter) AsOptional() *Parameter {
	p.Required = false
	return p
}
func (p *Parameter) AsRequired() *Parameter {
	if p.Default != nil {  
		return p
	}
	p.Required = true
	return p
}
func (p *Parameter) WithMaxLength(max int64) *Parameter {
	p.MaxLength = &max
	return p
}
func (p *Parameter) WithMinLength(min int64) *Parameter {
	p.MinLength = &min
	return p
}
func (p *Parameter) WithPattern(pattern string) *Parameter {
	p.Pattern = pattern
	return p
}
func (p *Parameter) WithMultipleOf(number float64) *Parameter {
	p.MultipleOf = &number
	return p
}
func (p *Parameter) WithMaximum(max float64, exclusive bool) *Parameter {
	p.Maximum = &max
	p.ExclusiveMaximum = exclusive
	return p
}
func (p *Parameter) WithMinimum(min float64, exclusive bool) *Parameter {
	p.Minimum = &min
	p.ExclusiveMinimum = exclusive
	return p
}