fix(httpapi): expose unavailable v2 session mutations (#28624)
This commit is contained in:
parent
7d5e91b801
commit
f5d20c580b
1 changed files with 96 additions and 10 deletions
|
|
@ -115,4 +115,18 @@ describe("PublicApi OpenAPI v2 errors", () => {
|
|||
)
|
||||
}
|
||||
})
|
||||
|
||||
test("documents v2 unfinished session mutation errors", () => {
|
||||
const spec = OpenApi.fromApi(PublicApi) as OpenApiSpec
|
||||
|
||||
for (const route of [
|
||||
["post", "/api/session/{sessionID}/prompt"],
|
||||
["post", "/api/session/{sessionID}/compact"],
|
||||
["post", "/api/session/{sessionID}/wait"],
|
||||
] as const) {
|
||||
expect(componentName(responseRef(spec.paths[route[1]]?.[route[0]]?.responses?.["503"]) ?? "")).toBe(
|
||||
"ServiceUnavailableError",
|
||||
)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue