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

🐍 Snake_case parsing issue in list field names when generating data classes #1

Closed
wants to merge 5 commits into from

Conversation

yelmuratoff
Copy link

If snake_case is selected as the naming convention, the generated list fields do not properly follow the conversion rule.

Expected behavior:

The generated code should respect the snake_case convention and produce:

subGroupStories: List<StorySubGroupItemDTO>.from(
    cast<Iterable>('sub_group_stories').map((x) => StorySubGroupItemDTO.fromMap(Map.from(x as Map)))),

Actual behavior:

Instead, the field name remains in camelCase:

subGroupStories: List<StorySubGroupItemDTO>.from(
    cast<Iterable>('subGroupStories').map((x) => StorySubGroupItemDTO.fromMap(Map.from(x as Map)))),

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