gen/goav2gen/param.go
func (a *APIAnalyzer) AnalyzeParam(ec EvalCtx, p *Parameter) *gen.ActionParam {
	location, ok := loc[p.In]
	if !ok {
		location = -1
	}
	ap := &gen.ActionParam{
		Name:        p.Name,
		QueryName:   p.Name,
		Description: cleanDescription(p.Description),
		VarName:     toVarName(p.Name),
		Location:    location,
		Mandatory:   p.Required,
		NonBlank:    p.Required || p.Pattern != "",
		Regexp:      p.Pattern,
		ValidValues: p.Enum,
	}
	if p.Schema != nil {
		ap.Type = a.typeForRef(ec, p.Schema)
	} else {
		ap.Type = basicType(p.Type)
	}

	return ap
}
func (a *APIAnalyzer) AnalyzeParam(ec EvalCtx, p *Parameter) *gen.ActionParam {
	location, ok := loc[p.In]
	if !ok {
		location = -1
	}
	ap := &gen.ActionParam{
		Name:        p.Name,
		QueryName:   p.Name,
		Description: cleanDescription(p.Description),
		VarName:     toVarName(p.Name),
		Location:    location,
		Mandatory:   p.Required,
		NonBlank:    p.Required || p.Pattern != "",
		Regexp:      p.Pattern,
		ValidValues: p.Enum,
	}
	if p.Schema != nil {
		ap.Type = a.typeForRef(ec, p.Schema)
	} else {
		ap.Type = basicType(p.Type)
	}

	return ap
}
// AnalyzeParam analyzes input parameters to methods