You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a createClient operation in my openAPI schema, generating the createClient function. But at the same time createClient function is imported from the @hey-api/client-fetch package. It results in the name collision in the services.gen file. It would be nice to have an option to avoid collision.
Reproducible example or configuration
No response
OpenAPI specification (optional)
No response
System information (optional)
No response
The text was updated successfully, but these errors were encountered:
@mrlubos I'm not sure, to be honest. It can be done in several ways:
For example, add the ability to override the createClient function name from the settings. But I'm not sure it's a good way to do this;
I guess that preferred way is:
Leave the public API of '@hey-api/client-fetch` the same, to not introduce any breaking changes to it.
Anyway, createClient is not exported from the generated file, it's an internal implementation. So, to avoid name collisions, we add the _ internal property mark. It can be the same for the createConfig function.
Yeah I think I'll need to move the client entirely out of the file since you'd be running into the same problem if your service was called "client", except I wouldn't be able to alias it then. Thanks for reporting, will improve this
Description
I have a createClient operation in my openAPI schema, generating the
createClient
function. But at the same timecreateClient
function is imported from the@hey-api/client-fetch
package. It results in the name collision in theservices.gen
file. It would be nice to have an option to avoid collision.Reproducible example or configuration
No response
OpenAPI specification (optional)
No response
System information (optional)
No response
The text was updated successfully, but these errors were encountered: