11---
2- title : About openapi-typescript
2+ title : 关于 openapi-typescript
33description : Additional info about this project
44---
55
@@ -8,31 +8,53 @@ description: Additional info about this project
88 import contributors from ' ../data/contributors.json' ;
99</script >
1010
11- # About openapi-typescript
11+ # 关于 openapi-typescript
1212
13- ::: warning
13+ ## 使用者
1414
15- This article is a stub. Please help [ expand it] ( https://github.com/drwpow/openapi-typescript/tree/main/docs/zh/ ) !
15+ - [ ** Bigcommerce** ] ( https://github.com/bigcommerce/bigcommerce-api-node ) : 用于 BigCommerce API 的 Node SDK
16+ - [ ** Budibase** ] ( https://github.com/Budibase/budibase ) : 用于创建内部工具、工作流和管理面板的低代码平台
17+ - [ ** Fedora ` fmn ` ** ] ( https://github.com/fedora-infra/fmn ) : Fedora 消息基础设施的工具和 API
18+ - [ ** Fingerprint** ] ( https://github.com/fingerprintjs/fingerprintjs-pro-server-api-node-sdk ) : 高规模应用的设备指纹技术
19+ - [ ** Google Firebase CLI** ] ( https://github.com/firebase/firebase-tools ) : 用于 Google Firebase 平台的官方 CLI
20+ - [ ** GitHub Octokit** ] ( https://github.com/octokit ) : GitHub API 的官方 SDK
21+ - [ ** Lotus** ] ( https://github.com/uselotus/lotus ) : 开源定价和打包基础设施
22+ - [ ** Jitsu** ] ( https://github.com/jitsucom/jitsu ) : 现代、开源的数据摄取/数据流水线
23+ - [ ** Medusa** ] ( https://github.com/medusajs/medusa ) : 数字商务的构建模块
24+ - [ ** Netlify** ] ( https://netlify.com ) : 现代开发平台
25+ - [ ** Nuxt** ] ( https://github.com/unjs/nitro ) : 直观的 Vue 框架
26+ - [ ** Relevance AI** ] ( https://github.com/RelevanceAI/relevance-js-sdk ) : 构建和部署 AI 链
27+ - [ ** Revolt** ] ( https://github.com/revoltchat/api ) : 开源用户优先的聊天平台
28+ - [ ** Spacebar** ] ( https://github.com/spacebarchat ) : 免费、开源、可自托管的与 Discord 兼容的聊天/语音/视频平台
29+ - [ ** Supabase** ] ( https://github.com/supabase/supabase ) : 开源的 Firebase 替代方案
30+ - [ ** Twitter API** ] ( https://github.com/twitterdev/twitter-api-typescript-sdk ) : Twitter API 的官方 SDK
1631
17- :::
32+ ## 项目目标
1833
19- ## Used by
34+ 1 . 支持将任何有效的 OpenAPI 模式转换为 TypeScript 类型,无论多么复杂。
35+ 2 . 生成的类型应该是静态分析的、无运行时依赖的(有一些例外,比如 [ enums] ( https://www.typescriptlang.org/docs/handbook/enums.html ) )。
36+ 3 . 生成的类型应尽可能与原始模式匹配,保留原始的大写形式等。
37+ 4 . Typegen 只需要 Node.js 来运行(不需要 Java、Python 等),可以在任何环境中运行。
38+ 5 . 支持从文件以及本地和远程服务器获取 OpenAPI 模式。
2039
21- - [ ** Bigcommerce** ] ( https://github.com/bigcommerce/bigcommerce-api-node ) : Node SDK for the BigCommerce API
22- - [ ** Budibase** ] ( https://github.com/Budibase/budibase ) : low code platform for creating internal tools, workflows, and admin panels
23- - [ ** Fedora ` fmn ` ** ] ( https://github.com/fedora-infra/fmn ) : tools and APIs for Fedora’s messaging infra
24- - [ ** Fingerprint** ] ( https://github.com/fingerprintjs/fingerprintjs-pro-server-api-node-sdk ) : device fingerprinting for high-scale applications
25- - [ ** Google Firebase CLI** ] ( https://github.com/firebase/firebase-tools ) : Official CLI for Google’s Firebase platform
26- - [ ** GitHub Octokit** ] ( https://github.com/octokit ) : Official SDK for the GitHub API
27- - [ ** Lotus** ] ( https://github.com/uselotus/lotus ) : open source pricing & packaging infra
28- - [ ** Jitsu** ] ( https://github.com/jitsucom/jitsu ) : modern, open source data ingestion / data pipelines
29- - [ ** Medusa** ] ( https://github.com/medusajs/medusa ) : building blocks for digital commerce
30- - [ ** Netlify** ] ( https://netlify.com ) : the modern development platform
31- - [ ** Nuxt** ] ( https://github.com/unjs/nitro ) : The Intuitive Vue framework
32- - [ ** Relevance AI** ] ( https://github.com/RelevanceAI/relevance-js-sdk ) : build and deploy AI chains
33- - [ ** Revolt** ] ( https://github.com/revoltchat/api ) : open source user-first chat platform
34- - [ ** Spacebar** ] ( https://github.com/spacebarchat ) : a free, open source, self-hostable Discord-compatible chat/voice/video platform
35- - [ ** Supabase** ] ( https://github.com/supabase/supabase ) : The open source Firebase alternative.
36- - [ ** Twitter API** ] ( https://github.com/twitterdev/twitter-api-typescript-sdk ) : Official SDK for the Twitter API
40+ ## 差异
3741
38- ## Project goals
42+ ### 与 swagger-codegen 比较
43+
44+ openapi-typescript 专门为 swagger-codegen 的轻量、易于使用的替代方案而创建,它不需要 Java 运行时或运行 OpenAPI 服务器。它也不生成庞大的客户端端代码。实际上,openapi-typescript 生成的所有代码都是** 无运行时的静态类型** ,以实现最大性能和最小的客户端体积。
45+
46+ ### 与 openapi-typescript-codegen 比较
47+
48+ 这两个项目无关。openapi-typescript-codegen 是原始 swagger-codegen 的 Node.js 替代方案,但实际上是一样的。openapi-typescript 具有与 openapi-typescript-codegen 相同的优势,即** 无运行时** ,而 openapi-typescript-codegen 可以生成相当庞大的捆绑包,取决于模式的复杂性,可以达到 ` 250 kB ` 或更多。
49+
50+ ### 与 tRPC 比较
51+
52+ [ tRPC] ( https://trpc.io/ ) 是一个对服务器和客户端都进行类型安全的框架。它要求服务器和客户端都使用 tRPC 编写(这意味着后端使用 Node.js)。
53+
54+ 如果您符合此用例,那么这将是一次很好的体验!但对于其他所有人,openapi-typescript(和 openapi-fetch)是一个更灵活、更低级的解决方案,可以适用于任何技术选择(甚至可以在没有任何成本的情况下逐步采用)。
55+
56+ ## 贡献者
57+
58+ 没有这些出色的贡献者,这个库将不可能存在:
59+
60+ <VPTeamMembers size =" small " :members =" contributors['openapi-typescript'] " />
0 commit comments