You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having discussed this today with someone, I just want to clarify my opinion here - I agree that it doesn't make sense to have i.e. *[]strng and instead having us using []string. Using this as an opt-in change is needed so we can make it backwards-compatible, but this is a good one that we should also make a default when we come to a v3 release
Reacted by James Dyke, Kevin Disneur, David Robertson, Ashish, Matthias Preu, Emre Ovacik, Adam Brightwell and fangxlmr
Activity
jamietanna commentedon Apr 20, 2024
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-optionswould be reasonable, allowing folks to choose whether they want it or not.thatjames commentedon Apr 23, 2024
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-optionsconfig items, sheepishly admitting I completely misunderstood that in my first read through...jamietanna commentedon Aug 20, 2024
Related: oapi-codegen/runtime#40
jamietanna commentedon Aug 20, 2024
Having discussed this today with someone, I just want to clarify my opinion here - I agree that it doesn't make sense to have i.e.
*[]strngand instead having us using[]string. Using this as an opt-in change is needed so we can make it backwards-compatible, but this is a good one that we should also make a default when we come to a v3 releasejamietanna commentedon May 10, 2025
Related: #609
jamietanna commentedon May 10, 2025
I'm making a start with this in #1979
feat(output-options): add `prefer-skip-optional-pointer-on-container-…
feat(output-options): add `prefer-skip-optional-pointer-on-container-…