Show HN: Typoas TypeScript OpenAPI client generator https://ift.tt/eOQVAW1

Show HN: Typoas – TypeScript OpenAPI client generator Hi everyone, I started a couple years ago a new TS OpenAPI generator that would work for any complex OpenAPI specs. After trying the official openapi generator, I saw that it wasn't capable of generating complex schemas and was generating a lot of skeleton files that could be extracted to a separated package. That's why I started working on an alternative that would handle any complexity provided by OpenAPI specs while still being easy to setup. Typoas uses the TS AST to generate complex TS types and bundle everything in a single file. Because I wanted to have something as small as possible, I reworked it to be fully tree-shakable and only keep needed parts on bundling. Like, the official openapi generator, it will transform "dates" to JS Date, handle local refs (even circular). Moreover, it is capable of handling oneOf, allOf or anyOf schemas. There is more features (like JSDoc of every schemas) that is embedded that I'm eager to discuss! I created an example with Github, Stripe and the classic Petstore API. It's also used successfully at work in a production environment since the first release. You can try it just using yarn (for example: yarn dlx @typoas/cli generate -i https://ift.tt/yTl9n28... -o src/client.ts ) Thanks for checking it out! https://ift.tt/zYl7Z25 June 17, 2023 at 12:28AM

Komentar

Postingan populer dari blog ini

Show HN: Interactive exercises for GNU grep, sed and awk https://ift.tt/OxeFwah

Show HN: My Book Bulletproof TLS and PKI (Second Edition) Is Out https://ift.tt/5PZ9mxF