DEV Community

Discussion on: Which OpenAPI Codegen Should You Choose? openapi-typescript vs hey-api vs Orval vs Kubb

Collapse
 
nyaomaru profile image
nyaomaru

Thanks a lot for the detailed comment! 😺

I also took a look at your benchmark repository. It’s interesting, although I’d be careful about drawing strong conclusions from older versions since this space moves quite fast.

For example, I’ve already received feedback that newer versions of hey-api have improved generation speed quite a bit, and that the output structure can be customized with options like getFilePath. Things are moving really fast.

The client completely trusts the TypeScript types blindly

Absolutely, TypeScript types alone are not runtime validation. I agree that we still need to think carefully about runtime validation, especially at API boundaries.

Therefore, a massive raw output size might have a negligible impact on bundle size.

I agree with your point that raw output size and actual runtime/bundle impact should be considered separately. Type-only output and gzip can make the practical impact very different from the raw generated size.

And the response schema discrimination issue is also a really interesting point. I didn’t cover it deeply in this article, but I can see why that could become a reason to build a custom solution.

Thanks again, your comment gives me several good points to revisit. 👍