Tu

Turn OpenAPI to Universal TypeScript SDKs

Hacker News

Turn OpenAPI to Universal TypeScript SDKs

Hi HN! We’re excited to share our new code generator that lets you ship high-quality TypeScript SDKs, that your users will love, from your OpenAPI documents. Our ongoing goal is to help you build one SDK that runs anywhere modern JavaScript runs. This includes new runtimes like Deno and Bun in addition to the ever-popular Node.js. Additionally, the popularity of AI has meant server-sent events and file streaming are also commonplace - we wanted to cover these use cases too. This explosion in new runtimes and ways of interacting with APIs shifts cognitive burden on API developers often having to work with different technologies when integrating an API. At Speakeasy we set out to create a “Universal Typescript SDK” that would work across browser, servers and other runtimes. There are a number of open source generators out there but none of them provided enough coverage across the variety of APIs we see modelled with OpenAPI. Some of the requirements we tried to hit in this release: - Compatibility with the browser & server - Support for popular, backend JavaScript runtimes including Node.js, Bun, Deno - User input and server response validation with Zod - Support for polymorphic types, also known as unions or `oneOf` in OpenAPI. - Support for constant and default values, big integers and decimals - Support for multipart streaming upload - Support for server sent events using native OpenAPI constructs We want to give a special shout out to Zod because it served as a great foundation for translating all the JSON Schema primitives used in OpenAPI into TypeScript types that you can trust. By this we mean that the types are backed by runtime validation so vanilla JS users have a safeguard and servers that drift from their OpenAPI spec are caught instead of silently failing or triggering obscure runtime errors. If you’re curious to dive into our learnings check out this post https://www.speakeasyapi.dev/post/how-we-built-universal-ts We’d love for folks to check out our new generator and give us feedback. Its really easy to get started. Install our CLI with `brew install speakeasy-api/homebrew-tap/speakeasy` and run `speakeasy generate sdk -s openapi.yaml --output ./sdk -l typescript` . If you want to chat directly with us you can reach us on slack : https://join.slack.com/t/speakeasy-dev/shared_invite/zt-1cwb... .

Share card

Actual performance

27points
5comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: started, including · Missing: supports, reddit linkedin, podcasting
92%92% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: model, slack, user · Missing: mac, agents, macos
92%92% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: excited, open source, ide · Missing: https docs, just released, exist
61%61% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: users, way · Missing: mobile apps, ios, personal
38%38% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: users · Missing: plus, platform, intuitive
31%31% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
13%13% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: chat · Missing: web3, crypto, cryptocurrency
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Ce
Cerialize – Typescript serialization by annotation39%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Cerialize – Typescript serialization by annotation

Hacker News1
Sc
Scala-ts – Scala to TypeScript compiler41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Scala-ts – Scala to TypeScript compiler

Hacker News66
Ha
Hapi with Typescript51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Hapi with Typescript

Hacker News2
JS
JSONSchema to TypeScript compiler51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

JSONSchema to TypeScript compiler

Hacker News72
Tr
Transpile Scala to TypeScript29%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Transpile Scala to TypeScript

Hacker News1
Ge
Get started modding Factorio in TypeScript44%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Get started modding Factorio in TypeScript

Hacker News69
We
WebSockets Explained with TypeScript64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

WebSockets Explained with TypeScript

Hacker News3
A
A BubbleShooter Implementation in TypeScript38%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A BubbleShooter Implementation in TypeScript

Hacker News2
Bi
Binary Serialization with TypeScript40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Binary Serialization with TypeScript

Hacker News2
Du
DuoCode 1.0 bridges the gap between C# and TypeScript31%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

DuoCode 1.0 bridges the gap between C# and TypeScript

Hacker News7