Skip to main content

api-typing

github.com

一个基于axios的强类型提示HTTP客户端,旨在解决前端接口对接中的常见问题,如字段拼写错误和接口变更未通知等,通过OpenAPI协议自动生成TypeScript类型提示。

Developer Tools & APIsOpen source#typescript#api-client#openapi
Visit website
api-typing preview

接口的对接在前端的工作中占据了很大一部分时间,我们在接口对接时经常会遇到以下这些情况:1. 不小心写错了接口字段( url 拼写错误,入参,回参错误)。2. 后端接口变更了(可能是 url,入参,或者回参),但是没有通知到前端。这些错误可能不会立即被暴露出来,直到测试时才会被发现,但是如果项目已经有了完善的 swagger 文档或者其他基于 openapi 协议的文档的话,那么就完全可以在编写接口的时候将这些错误排除掉。那么完成整个逻辑的链条就是 openapi > typescript > 全自动的类型提示。如果你觉得工作中有这些痛点的话,欢迎参与这个项目贡献代码 🌟项目仓库:api-typing

More in Developer Tools & APIs

SolveHub

API for CAPTCHA and anti-bot tasks in authorized testing

Dev Tools ·

liarjs.dev

Scanner that cross-checks browser JavaScript fingerprint against network layer

Dev Tools ·

AntiBrow

Antidetect browser for managing multiple browser identities with real-device

Dev Tools ·

HostlessWP

Open source CLI to move WordPress to Cloudflare Workers

Dev Tools ·

deed.page

Permanent web hosting with an API for AI agents

Dev Tools ·

Rowflare

Open-source Airtable alternative running on your Cloudflare account

Dev Tools ·