Typescript client not working when fastapi responses are in camelCase #763
Replies: 1 comment
-
I suspect some transformer shenanigans. Created a bug: #764 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a fastapi backend. I configured it to return responses in camelCase instead of snake_case. This is how I configured it:
The backend works as expected. I tested it with both
localhost:8000/docs
andcurl
command. The responses are in camelCase.I generated a typescript client using hey-api. The typescript response types are in camelCase. Yay!
However, the actual responses the
@hey-api/client-fetch
gets are in snake_case!!!This breaks the response types. camelCase fields are undefined as the raw responses are in snake_case.
What am I missing? How do I fix it?
Beta Was this translation helpful? Give feedback.
All reactions