swagger-api/swagger-codegen
View on GitHub[golang] Default to pointers for non-primitive types
Open
#2,330 opened on Mar 7, 2016
Client: GoEnhancement: GeneralGeneral: Discussionhelp wanted
Description
It generates code like this currently:
type JobWrapper struct {
Job Job `json:"job,omitempty"`
}
Same with slices and what not.
It would be nice (and probably what most people would want) to have it use pointers, eg:
type JobWrapper struct {
Job *Job `json:"job,omitempty"`
}