-
-
Notifications
You must be signed in to change notification settings - Fork 816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass .Required
to BindStyledParameterWithLocation
and BindStyledParameter
#1315
Conversation
@renom mind updating the code to follow the changes introduced in https://github.com/oapi-codegen/runtime/releases/tag/v1.1.0 for this? 🙏 Or are you happy with #1353 taking this? |
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? |
Thank you! Yes, exactly - once bumping We may want to add an integration test (in https://github.com/deepmap/oapi-codegen/blob/master/internal/test/parameters/parameters_test.go) to validate that the underlying issue in #954 is resolved |
I updated |
@@ -27,7 +27,7 @@ func (siw *ServerInterfaceWrapper) {{$opid}}(c *fiber.Ctx) error { | |||
} | |||
{{end}} | |||
{{if .IsStyled}} | |||
err = runtime.BindStyledParameter("{{.Style}}",{{.Explode}}, "{{.ParamName}}", c.Params("{{.ParamName}}"), &{{$varName}}) | |||
err = runtime.BindStyledParameter("{{.Style}}", {{.Explode}}, {{.Required}}, "{{.ParamName}}", c.Params("{{.ParamName}}"), &{{$varName}}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will fail now, as we've introduced a new function BindStyledParameterWithOptions
- mind refactoring these templates to use that new function now?
There was a problem hiding this comment.
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
Ready to be merged. |
Thank you @renom 👏 cc @itpavelkozlov |
.Required
to BindStyledParameterWithLocation
and BindStyledParameter
Fixes #954
Works along with oapi-codegen/runtime/pull/14