hey-api / openapi-ts

✨ Turn your OpenAPI specification into a beautiful TypeScript client
https://heyapi.vercel.app
Other
1.08k stars 89 forks source link

fetch client: snake_case path arguments get converted to camelCase in types, but not in template string #615

Closed CodeWitchBella closed 4 months ago

CodeWitchBella commented 4 months ago

Description

In the new fetch client (awesome, btw, I like the tree-shakeability), path arguments do not work if specified as directed by types - types expect camelCase, but it only works with snake_case at runtime.

OpenAPI specification (optional)

I think the above is enough to reproduce, let me know if you have any trouble reproducing it and I'll prepare some kind of minimal schema.

Configuration

No response

System information (optional)

No response

mrlubos commented 4 months ago

Do you mind adding a small schema please? I've heard this reported already but I haven't fixed it precisely because no schema was provided. Will help me to debug it faster

CodeWitchBella commented 4 months ago

I see you fixed this before I could get back to you with the schema 😯

I tried it on my schema and it works, thanks.

mrlubos commented 4 months ago

Ya, you snooze you lose 😀