Settings

Theme

Show HN: Native TypeScript API client generator from OpenAPI schema

github.com

2 points by vladkens 2 years ago · 0 comments · 1 min read

Reader

Hi, HN! I wrote a native TypeScript utility to generate typed HTTP client from OpenAPI schema. The existing solution didn't work for me for various reasons.

Please take a look, maybe it will be useful/convenient for someone else too.

The main idea is to generate a typed client in one file with normal function names (abstraction over bare paths), to be able to understand what broke on the frontend when changing APIs, without extra dependencies on the frontend.

My main usecase of this library is with React / NestJS backends. So the generation of api call names is well adapted to its swagger plugin.

Issues welcome if something doesn't work well with your backend framework.

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection