FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: make BindQueryParameter play along with x-go-type-skip-optional-pointer by swistakm · Pull Request #47 · oapi-codegen/runtime · GitHub

fix: make BindQueryParameter play along with x-go-type-skip-optional-pointer - #47

Merged
mromaszewicz merged 1 commit into
oapi-codegen:mainfrom
swistakm:fix/make-query-bindparam-play-along-with-x-go-type-skip-optional-pointer
Jul 9, 2024
Merged

fix: make BindQueryParameter play along with x-go-type-skip-optional-pointer#47
mromaszewicz merged 1 commit into
oapi-codegen:mainfrom
swistakm:fix/make-query-bindparam-play-along-with-x-go-type-skip-optional-pointer

Conversation

swistakm commented Jul 9, 2024

Copy link
Copy Markdown
Contributor

I've run into the same issue as described in oapi-codegen/oapi-codegen#1344 with in: query parameters annotated with x-go-type-skip-optional-pointer extension.

I was a bit surprised at the beginning because codegen generates the code with plain struct field (i.e. skips pointer) as expected in the query string params struct but fails with panic during runtime. Turns out it wasn't that hard to fix and it seems am useful addition for users that desire zero values for optional parameters instead of pointers with nil value to communicate lack of parameter.

swistakm requested a review from a team as a code owner July 9, 2024 13:58
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL