Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(typegen): support generating fields as pointers, including lists/slices #217

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

None yet

1 participant