We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, the oapi-codegen tool will generate a pointer to a slice of types.
This is unnecessary, as slices are already reference values, per the language spec
This gives the ability to distinguish between an empty slice (len ==0) and an unset field (array == nil)
The text was updated successfully, but these errors were encountered:
This is something I've considered before, too.
I think this keeps in line with the fact that if there's an optional value, it has a pointer associated with it.
However, I think adding an opt-in configuration via output-options would be reasonable, allowing folks to choose whether they want it or not.
output-options
Sorry, something went wrong.
That's a fair point, there are certainly valid reasons to use pointers to slices (beyond verifying if they are set or not).
I need to read up more on the output-options config items, sheepishly admitting I completely misunderstood that in my first read through...
No branches or pull requests
Currently, the oapi-codegen tool will generate a pointer to a slice of types.
This is unnecessary, as slices are already reference values, per the language spec
This gives the ability to distinguish between an empty slice (len ==0) and an unset field (array == nil)
The text was updated successfully, but these errors were encountered: