| --- a/chi-middleware.tmpl | |
| +++ b/chi-middleware.tmpl | |
| }{{end}} | |
| {{end}} | |
| {{if .IsStyled}} | |
| + {{- /* For "filter" deepObject params, use the custom filter parser which | |
| + correctly handles all filter types including union types. */ -}} | |
| + {{- if and (eq .ParamName "filter") (eq .Style "deepObject") }} | |
| + err = filters.Parse(r.URL.Query(), ¶ms.{{.GoName}}) | |
| + if err != nil { | |
| + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "{{.ParamName}}", Err: err}) | |
| + return | |
| + } | |
| + {{- else }} | |
| err = runtime.BindQueryParameterWithOptions("{{.Style}}", {{.Explode}}, {{.Required}}, "{{.ParamName}}", r.URL.Query(), ¶ms.{{.GoName}}, runtime.BindQueryParameterOptions{Type: "{{.SchemaType}}", Format: "{{.SchemaFormat}}"}) | |
| if err != nil { | |
| siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "{{.ParamName}}", Err: err}) | |
| return | |
| } | |
| + {{- end }} | |
| {{end}} | |
| {{end}} | |