Don't use pointer to slice of types
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)
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.
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...
Related: https://github.com/oapi-codegen/runtime/pull/40
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