Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Casework OpenAPI: describe the review result read's 202, 404 and 410 as pending, not found and expired

未关闭 适合新手
#2,199 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 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 内容生成。

描述

area:casework bug criticality:p2 triage:needs-implementation
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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

registrystack/registry-stack 的其他 Issue

查看 registrystack/registry-stack 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。