Skip to content

Conversation

@sanderblue
Copy link
Contributor

⚠️ 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"`
  // ...

@sanderblue sanderblue changed the title feat(typegen): support generating fields as pointers, including liss/slices feat(typegen): support generating fields as pointers, including lists/slices Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants