Skip to content
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

Fix breaking changes recently committed #20

Merged
merged 2 commits into from
Nov 14, 2023

Conversation

deepmap-marcinr
Copy link
Contributor

Pull request #19 introduced an extra parameter into a widely used function, which would break existing generated code with the next release.

Restore the previous function to its old signature, and add a new one which takes additional options in an options structure.

Pull request oapi-codegen#19 introduced
an extra parameter into a widely used function, which would break existing
generated code with the next release.

Restore the previous function to its old signature, and add a new one
which takes additional options in an options structure.
@deepmap-marcinr deepmap-marcinr requested a review from a team as a code owner November 14, 2023 15:38
bindparam_test.go Outdated Show resolved Hide resolved
// BindStyledParameterWithOptions binds a parameter as described in the Path Parameters
// section here to a Go object:
// https://swagger.io/docs/specification/serialization/
func BindStyledParameterWithOptions(style string, paramName string, value string, dest any, opts BindStyledParameterOptions) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth having style as an option, too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those four args, style, paramName, value, dest are required, which makes them different from the options in the opts struct, where zerovalues are ok.

@jamietanna jamietanna added the enhancement New feature or request label Nov 14, 2023
@jamietanna jamietanna merged commit 53c0dbc into oapi-codegen:main Nov 14, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants