mirror of
https://github.com/rancher/norman.git
synced 2025-09-01 23:36:58 +00:00
Currently, `*string` fields in Go structs are converted to `{type: string, nullable: true}` in the API schema, which is right, but then converted down to just `string` when converted to generated client structs. Without this patch, there is no way to express that `*string`s should stay as `*string`s when run through the generator, because the 'nullable' flag is ignored. Compare this to `*bool`s, which become `boolean` in the schema and then correctly converted back to *bool in the generator. This patch adds a backwards-compatible way to opt in to converting `*string`s in the original struct to *strings in the generated struct.