hey-api / openapi-ts

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

TypeScript 4.x compatibility #916

Open Markizzio opened 1 month ago

Markizzio commented 1 month ago

Description

npx @hey-api/openapi-ts -i ./api-airflow.yaml -o src/airflow-client -c @hey-api/client-fetch --debug

Trying to generate client for airflow API Specs can be loaded here

After it got an error

Markizzio commented 1 month ago

openapi-ts-error-1723530501482.log

mrlubos commented 1 month ago

Hey @Markizzio, is this a regression? Which TypeScript version are you using?

Markizzio commented 1 month ago

@mrlubos hello! "typescript": "4.5"

mrlubos commented 1 month ago

@Markizzio The recommended version is 5.x, are you able to upgrade? https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/package.json#L69

Markizzio commented 1 month ago

@mrlubos no, I am not able to upgrade)

mrlubos commented 1 month ago

I'll need to check how viable it is to support 4.x, though I know a few people have already asked about it