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

Add --to-camel option to convert from snake_case to camelCase #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ryanjdillon
Copy link

What this PR does

  • Adds an option flag --to-camel, which triggers model property names to be converted from snake_case to camelCase in the resulting TS interfaces
  • Fixes cli/script.py to fail gracefully when no Pydantic models are found, resulting in an empty .ts file. This could instead just create nothing out output a warning to stdout.

Why this is necessary

We would like our resulting TS interfaces to follow the camel case convention when the model is defined via TS, and snake case when in Python

Also, the CLI hard fails when no Pydantic models are found.

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