feat(server): stream events across locations

This commit is contained in:
Dax Raad
2026-06-22 08:12:38 -04:00
parent 57ce1b9ca8
commit 595cc91ddc
11 changed files with 2088 additions and 226 deletions
@@ -152,7 +152,7 @@ function matchLegacyOpenApi(input: Record<string, unknown>) {
normalizeLegacyErrorResponses(operation)
}
normalizeLegacyOperation(operation, path, method)
if ((path === "/event" || path === "/global/event") && method === "get") {
if ((path === "/event" || path === "/global/event" || path === "/api/event") && method === "get") {
// HttpApi has no first-class SSE response schema, and these handlers are
// raw/streaming routes. Document the actual wire protocol explicitly.
operation.responses!["200"] = {
@@ -162,7 +162,9 @@ function matchLegacyOpenApi(input: Record<string, unknown>) {
schema:
path === "/event"
? { $ref: "#/components/schemas/Event" }
: { $ref: "#/components/schemas/GlobalEvent" },
: path === "/global/event"
? { $ref: "#/components/schemas/GlobalEvent" }
: { $ref: "#/components/schemas/V2Event" },
},
},
}