My config is:
package: openapi
output: types.gen.go
generation:
server: chi
Example 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) error
My config is:
Example of
BindFormParamcalls that's generated in wrappers:When trying to compile generated code I've got compilation errors:
That's because the types of passed variables does not match the types of
BindFormParamparameters: