hey-api / openapi-ts

✨ Turn your OpenAPI specification into a beautiful TypeScript client
https://heyapi.vercel.app
MIT License
634 stars 44 forks source link

Ability to customize service operation parameter name #724

Closed jakubdrozdek closed 4 days ago

jakubdrozdek commented 4 days ago

Description

My OpenAPI schema uses data for many POST/PUT request body parameter names. This leads to naming conflicts with the service operation's parameter name data (when using useOptions: true).

It would be awesome to either hard-code this parameter to a different value, like __data, to ensure no naming clashes with potential OpenAPI schemas, or let developers customize the default parameter's name.

image

jakubdrozdek commented 4 days ago

Sorry, I just noticed it's resolved in one of the latest versions. I recently migrated from openapi-typescript-codegen and forgot to remove old generated files.

Works fine in the latest version (0.48.0): image

mrlubos commented 4 days ago

@jakubdrozdek No worries. The higher you keep climbing in the version number, hopefully the better it gets overall 🚀