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: add populate_by_name=True to all schema models inheriting from BaseModel #2006

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

yesudeep
Copy link
Contributor

@yesudeep yesudeep commented Feb 18, 2025

feat: add populate_by_name=True to all schema models inheriting from BaseModel

CHANGELOG:

  • We add the populate_by_name=True parameter to ensure serialization uses camelCase for attributes since the JS implementation uses camelCase and Python uses snake_case. The codegen pass is configured to generate snake_case for a Pythonic API but serialize to camelCase in order to be compatible with runtimes.
  • Update bin/fmt to organize imports.

Checklist (if applicable):

@yesudeep yesudeep requested a review from kirgrim February 18, 2025 00:12
@github-actions github-actions bot added feature New feature or request python Python labels Feb 18, 2025
@yesudeep yesudeep force-pushed the yesudeep/feat/schemas-transforms branch from 050ee29 to 08cb03d Compare February 18, 2025 00:13
…BaseModel

CHANGELOG:
- [ ] We add the `populate_by_name=True` parameter to ensure serialization uses
  camelCase for attributes since the JS implementation uses camelCase and Python
  uses snake_case. The codegen pass is configured to genearte snake_case for a
  Pythonic API but serialize to camelCase in order to be compatible with
  runtimes.
- [ ] Update `bin/fmt` to organize imports.
@yesudeep yesudeep force-pushed the yesudeep/feat/schemas-transforms branch from 08cb03d to 5f9ddc9 Compare February 18, 2025 00:20
@github-actions github-actions bot added the root label Feb 18, 2025
@yesudeep yesudeep merged commit f3a3c44 into main Feb 18, 2025
7 checks passed
@yesudeep yesudeep deleted the yesudeep/feat/schemas-transforms branch February 18, 2025 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request python Python root
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants