Pass `.Required` to `BindStyledParameterWithLocation` and `BindStyledParameter` by renom · Pull Request #1315 · oapi-codegen/oapi-codegen
It's okay, I can update the code. I have a few questions though. How do I know if the code is updated right? Will it be enough to update runtime to v1.1.0 and check that cmd/oapi-codegen builds fine?
| {{end}} | ||
| {{if .IsStyled}} | ||
| err = runtime.BindStyledParameter("{{.Style}}",{{.Explode}}, "{{.ParamName}}", c.Params("{{.ParamName}}"), &{{$varName}}) | ||
| err = runtime.BindStyledParameter("{{.Style}}", {{.Explode}}, {{.Required}}, "{{.ParamName}}", c.Params("{{.ParamName}}"), &{{$varName}}) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 👏🏽 well also need to run make generate and then commit the changes
renom
marked this pull request as ready for review
Thank you @renom 👏 cc @itpavelkozlov
jamietanna
changed the title
Pass .Required to BindStyledParameterWithLocation and BindStyledParameter
Pass .Required to BindStyledParameterWithLocation and BindStyledParameter
danicc097 pushed a commit to danicc097/oapi-codegen that referenced this pull request
Aug 31, 2024…ly (oapi-codegen#1315) Corresponding with changes in the runtime package, we want to ensure we let the (newly added) `BindStyledParameterWithOptions` function knows whether a parameter is required, to not error when an empty value is provided. Closes oapi-codegen#954.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters