Casework OpenAPI: describe the review result read's 202, 404 and 410 as pending, not found and expired
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- openapi, rust
- 领域
- api, documentation
调研方向
阅读 products/casework/scripts/generate_openapi.py 并检查 response();将其输出与 crates/registry-casework/src/http.rs:get_review_result 中现有路由的行为以及 crates/registry-review-client/src/client.rs 中客户端的处理进行比较。更新 202、404 和 410 的描述及空响应体文档,重新生成 products/casework/generated/registry-casework.openapi.json,并验证漂移检查通过。
由索引模型根据 Issue 内容生成。
描述
What Happened
In the generated Casework OpenAPI document, GET /v1/review-requests/{request_id}/result describes four responses as "Success": 200, 202, 404 and 410. The runtime answers 202 while the review is pending, 404 when the request is unknown or concealed from the caller, and 410 when the result has expired, each with an empty body. The review client treats those as Pending, ConcealedOrUnknown and Expired and refuses a body on them. A reader or a code generator working from the document treats a missing or expired result as success. The document also does not say these three responses carry no problem body, while every other refusal on the route is application/problem+json.
Expected Behavior
The document describes 202 as pending (no body), 404 as unknown or not visible to the caller (no body), and 410 as result expired (no body), and the committed OpenAPI is regenerated so the drift check holds it.
Reproduction
jq '.paths["/v1/review-requests/{request_id}/result"].get.responses | map_values(.description)' \
products/casework/generated/registry-casework.openapi.json
Where
products/casework/scripts/generate_openapi.py (response() default description); products/casework/generated/registry-casework.openapi.json; behaviour in crates/registry-casework/src/http.rs:get_review_result and crates/registry-review-client/src/client.rs.
Environment
Registry Stack 0.42.0, main as of 2026-10-18.
- 主要语言
- Rust
- 星标
- 2
- 派生
- 0
- 平均合并
- 10 小时 45 分钟
- 30 天内合并 PR
- 259
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
registrystack/registry-stack 的其他 Issue
-
area:render bug criticality:p2
难度 2/5 1-3 小时 新手友好度 78/100
registrystack/registry-stack#2223 · 1 条评论 ·
维护者通常 1 天内回复
-
area:discovery bug criticality:p2
难度 2/5 1-3 小时 新手友好度 83/100
registrystack/registry-stack#2221 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
registrystack/registry-stack#2200 ·
维护者通常 1 天内回复
-
1.0-blocker area:casework bug criticality:p1 triage:needs-implementation
难度 2/5 1-3 小时 新手友好度 76/100
registrystack/registry-stack#2195 ·
维护者通常 1 天内回复
-
area:evidence bug criticality:p3 triage:needs-implementation
难度 1/5 1-3 小时 新手友好度 84/100
registrystack/registry-stack#2194 ·
维护者通常 1 天内回复
查看 registrystack/registry-stack 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
swc-project/swc#12576 ·
维护者通常 1 天内回复
-
good first issue gpu serve
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
维护者通常 1 天内回复