tutone
tutone copied to clipboard
feat(typegen): support generating fields as pointers, including lists/slices
⚠️ WIP: Early POC ⚠️
Adds support for always prepending *
for a struct field type, especially in the case of lists. We currently don't support this functionality for lists. In the example below, the destination configurations are optional, so we would want to omit empty and use a pointer for JSON serialization.
e.g.
- name: AiWorkflowsDestinationConfigurationInput
create_as_pointer: true
Would result in the following generated struct field:
type AiWorkflowsCreateWorkflowInput struct {
DestinationConfigurations *[]AiWorkflowsDestinationConfigurationInput `json:"destinationConfigurations,omitempty"`
// ...