hey-api / openapi-ts

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

[methodNameBuilder] KO without asClass: true, #762

Closed Kalshu closed 1 month ago

Kalshu commented 1 month ago

Description

Hello,

My method for generating a custom name is not used by the generator when the service's asClass property is not set.

Is this the desired behavior?

I have to use this method because the native generation, which is based on a swagger that I don't control directly, uses reserved words (like "delete").

Reproducible example or configuration

https://stackblitz.com/edit/hey-api-client-fetch-example-generatorname?file=openapi-ts.config.ts

OpenAPI specification (optional)

No response

System information (optional)

No response

stackblitz[bot] commented 1 month ago

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

mrlubos commented 1 month ago

Hey @Kalshu, yes that sounds about right. Will fix, thanks for reporting.

mrlubos commented 1 month ago

@Kalshu this is now fixed!

Kalshu commented 1 month ago

@Kalshu this is now fixed!

I see that, thanks ! I see you also fix the generation with reserved keyword, really great job!