Create non-pointer map/slice fields from optional properties
Partially resolves #266.
No support for string, as it is still under discussion. map/slice can represent nil without making it a pointer, so this patch should be able to resolve the issue about for map/slice.
I'd love to see this go in. Is there an issue blocking merge? If so, can I help?
The build failure appears to come from the main branch.
Thank you. I think you are right, the build failure appears to come from the main branch. Now I'm waiting for the fix and this patch to be reviewed and accepted. No TODO.
@deepmap-marcinr is this will be merged?
@deepmap-marcinr is there any updates on this change?
This will break existing generated code. I've taken the approach of making these kinds of changes changed by flag. Your change moves the decision from templates ({{if not .Requored}}) to code. Could you extend the code generation options to provide the old behavior with an option? Please see: https://github.com/deepmap/oapi-codegen/blob/master/pkg/codegen/configuration.go#L37
Whenever changes liek this go in, they cause some hate mail.
@deepmap-marcinr Hi,
Would it be an option to introduce an extended property such as x-go-non-pointer to make a filed with this tag presented as non-pointer in go code?
Is there any interest in this PR?
I just bumped into this and would like to get it sorted.
@karupanerura do you have any interest in doing the change yourself? Should I fork the PR and send an upgraded one to address anything else required to merge it? Do maintainers have any interest to get it done?
Thank you?
@dlsniper Sorry for the late reply. I'm happy if you fork from this branch. I don't have enough time to solve the problem for a while.