mirror of
https://github.com/rancher/norman.git
synced 2025-07-31 23:00:43 +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. |
||
---|---|---|
.. | ||
cleanup | ||
client_template.go | ||
controller_template.go | ||
funcs.go | ||
generator.go | ||
k8s_client_template.go | ||
lifecycle_template.go | ||
scheme_template.go | ||
type_template.go |