func paramsOrderedBy(less ...paramLessFunc) *paramsMultiSorter {
	return &paramsMultiSorter{
		less: less,
	}
}
paramsOrderedBy returns a Sorter that sorts using the less functions,
in order. Call its Sort method to sort the data.
package openapi
import "sort"
var locationsOrder = map[string]int{
	"path":   0,
	"query":  1,
	"header": 2,
	"cookie": 3,
}
type paramLessFunc func(p1, p2 *ParameterOrRef) bool
type paramsMultiSorter struct {
	params []*ParameterOrRef
	less   []paramLessFunc
}
func (pms *paramsMultiSorter) Sort(params []*ParameterOrRef) {
	pms.params = params
	sort.Sort(pms)
}
func (pms *paramsMultiSorter) Len() int { return len(pms.params) }
func (pms *paramsMultiSorter) Swap(i, j int) {
	pms.params[i], pms.params[j] = pms.params[j], pms.params[i]
}
func (pms *paramsMultiSorter) Less(i, j int) bool {
	p, q := pms.params[i], pms.params[j]
	var k int
	for k = 0; k < len(pms.less)-1; k++ {
		less := pms.less[k]
		switch {
		case less(p, q):  
			return true
		case less(q, p):  
			return false
		}
	}
	return pms.less[k](p, q)
}