acacode / acacode/swagger-typescript-api
Support generating EventSource clients for text/event-stream endpoints
未關閉
- 主要語言
- TypeScript
- 星號
- 4.1k
- 分支
- 436
- PR 合併指標
- 30 天內沒有已合併 PR
描述
OpenAPI explicitly supports text/event-stream as a response media type (See https://spec.openapis.org/oas/latest.html#media-types). Currently swagger-typescript-api generates these endpoints as a standard request(), where T is the schema of a single event payload. However, this is semantically incorrect because an SSE endpoint produces a sequence of events rather than a single response object.
Would you be interested in adding optional support for generating SSE-aware clients (for example returning EventSource, AsyncIterable, or via a configurable template) when the response media type is `text/event-stream`?
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。