Skip to content
所有標籤

#openapi

7 篇文章

openapi-typescript:把 OpenAPI 變成零 runtime 的型別與 Fetch client

openapi-typescript 將 OpenAPI 3.0/3.1 產成純 TypeScript 型別;搭配 openapi-fetch,method、literal path、parameters 與 response union 都能由 schema 推導。

oRPC:把 end-to-end type safety 與 OpenAPI 放在同一條路徑

oRPC 同時支援 implementation-first 與 contract-first,能用 RPC client,也能由同一個 router 服務 OpenAPI 3.1.1 HTTP endpoint。

Speakeasy:用 OpenAPI Overlay 與 workflow 管理多語言 SDK

Speakeasy 把 OpenAPI、Overlay、target 與 generator version 寫進 `.speakeasy/workflow.yaml`,可在本機或 CI 產生、編譯並發布多語言 SDK。

Stainless:SDK generator 停止對外服務後,多語言 SDK 管線該怎麼選

Stainless 在 2026-05 併入 Anthropic,hosted 產品(含 SDK generator)停收新註冊並逐步結束,新專案已經不能選它。它示範的 spec+config、preview、發布管線仍然是好做法,改用 Speakeasy、Fern 或 OpenAPI Generator 時照樣適用。

tRPC:用 TypeScript inference 連起 client 與 server 的 API 合約

tRPC 讓 client 直接引用 server router 的型別,不需先寫 schema 或產生程式碼;v11 另有 alpha 階段的官方 OpenAPI 3.1 產生器。

ts-rest:保留 REST 語意的 TypeScript contract-first API,以及停止維護後的去留

ts-rest 用共享 contract 描述 method、path、status code 與 schema,在不產生程式碼的前提下讓 server 與 client 保有端到端型別。2026-10 起官方宣布停止維護、不再有 bug 或安全修補,新專案改看 oRPC contract-first 或 OpenAPI-first;它的 contract 設計觀念仍然適用。

Zodios:用 Zod endpoint definition 建立 Axios 型別安全 client

Zodios 以中央 Zod endpoint definition 驅動 Axios client 的型別、runtime validation 與 alias,也能接 Express 和產生 OpenAPI。