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

Support x-go-type-skip-optional-pointer in client query #1695

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TelpeNight
Copy link

Hello.
We've tried to use x-go-type-skip-optional-pointer with optional slices in our code base. But generated client code became invalid. Original template makes dereference of pure slice.
I've added an extra check for this case, for query parameters. Other param locations may need the same check.
Note, that supporting optional not-nilable types (ex int) with x-go-type-skip-optional-pointer requires extra work. As if params.{{.GoName}} != nil check will not compile. But zero value semantic is not well defined in this case.

@TelpeNight TelpeNight requested a review from a team as a code owner July 10, 2024 15:22
@jamietanna
Copy link
Member

Thanks for this - will try and look at it once the backlog of items for v2.4.0 are down!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants