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

Fix missing prefix on map types where value is an array of structs #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MiddleMan5
Copy link

Given converter with prefix = "test_" and exported types:

type MapArrayValue struct {
	Name string `json:"name"`
}
type StructWithEnumMapArrayStruct struct {
	Value  string                     `json:"value"`
	Values map[string][]MapArrayValue `json:"values"`
}

Output misses prefix on nested struct type

export interface test_StructWithEnumMapArrayStruct {
  value: string;
  values: {[key: string]: MapArrayValue[]};
}
export interface test_MapArrayValue {
  name: string;
}

This PR addresses this edge case and includes unit tests

@MiddleMan5 MiddleMan5 changed the title Fix missing prefix on map types where value is an array or slice of s… Fix missing prefix on map types where value is an array of structs Oct 12, 2024
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.

1 participant