Pass `.Required` to `BindStyledParameterWithLocation` and `BindStyledParameter` by renom · Pull Request #1315 · oapi-codegen/oapi-codegen

@renom

@renom

@jamietanna

@renom

@renom

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?

@renom

@jamietanna

@renom

I updated runtime to v1.1.0, the code builds fine on my laptop. Can it be merged now?

jamietanna

{{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.

@renom

jamietanna

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

@renom

@renom renom marked this pull request as ready for review

November 14, 2023 18:58

@renom

@jamietanna

Thank you @renom 👏 cc @itpavelkozlov

@jamietanna jamietanna changed the title Pass .Required to BindStyledParameterWithLocation and BindStyledParameter Pass .Required to BindStyledParameterWithLocation and BindStyledParameter

Dec 13, 2023

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.