Live data from Hacker News

Show HN: TypeAPI – An OpenAPI alternative optimized for code generation

typeapi.org

1–10 of 22 posts

Re: Show HN: TypeAPI – An OpenAPI alternative optimized for code generation

#2
Looks interesting

My current way of achieving codegen sdk w openapi is using the readme/api sdk framework maker, if you have good specs it works pretty great.

Add tests to the sdk, and you're both testing your openapi implementation, docs, and sdk in one test

Re: Show HN: TypeAPI – An OpenAPI alternative optimized for code generation

#4
What does this do better than OpenAPI? OpenAPI has many code generators. And more importantly: Many servers support it, making it really easy to implement.

So why would I chose this? How do I even implement it on the server? There's a lot of talk about client libraries, even with OpenAPI as an output format (nice!), but what about the server side?

Re: Show HN: TypeAPI – An OpenAPI alternative optimized for code generation

#9
post #2

Looks interesting My current way of achieving codegen sdk w openapi is using the readme/api sdk framework maker, if you have good specs it works pretty great. Add tests to the sdk, and you're both testing your openapi implementation, docs, and sdk in one test

I searched for what you're describing here, and I don't believe I found the service you're describing - I'm not seeing how it could generate code.

Would you mind expanding on what you're talking about here? It sounds intriguing, I'm just not following.

Re: Show HN: TypeAPI – An OpenAPI alternative optimized for code generation

#10
We went into another direction, leveraging the existing ecosystem instead of re-inventing the wheel. Although I appreciate the effort of improving the DX for REST APIs, I think the OpenAPI ecosystem is very strong and established.

Contrary to this approach, we (https://WunderGraph.com) ingest one or more OpenAPI and GraphQL apis and combine them into a backend for frontend. We have code generators for all major frontend frameworks, like react, svelte, Vue, solid, astro, etc... These don't just make calling APIs type-safe but also handle authentication, etc...

The BFF approach allows us to securely inject API keys or add a middleware using Typescript.

I'm curious what people think of this approach. Our users don't usually integrate one or two APIs but rather 20 or more. I guess it would be quite expensive if you had to write a custom specification for each service.

Post reply on HN