forked from oapi-codegen/oapi-codegen
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
My config is:
package: openapi
output: types.gen.go
generation:
server: chiExample of BindFormParam calls that's generated in wrappers:
err = BindFormParam("status", false, r.URL.Query(), ¶ms.Status)
if err != nil {
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "status", Err: err})
return
}When trying to compile generated code I've got compilation errors:
api/openapi/types.gen.go:6082:32: cannot use false (untyped bool constant) as ParamLocation value in argument to BindFormParam
api/openapi/types.gen.go:6082:39: cannot use r.URL.Query() (value of map type url.Values) as string value in argument to BindFormParam
That's because the types of passed variables does not match the types of BindFormParam parameters:
func BindFormParam(paramName string, paramLocation ParamLocation, value string, dest any) errorReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels