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

[Schema Inaccuracy] `issue.state_reason` missing enum variant: `duplicate`

未关闭
#4,492 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
openapi
领域
api

调研方向

首先定位 issue 中显示的 issue.state_reason 的 OpenAPI schema 定义,然后使用提供的 curl 命令确认 API 当前返回 duplicate。完成的标准是 enum 在现有变体旁列出 duplicate,并且 schema 准确描述该响应。

由索引模型根据 Issue 内容生成。

描述

feature

Schema Inaccuracy

(this issue was reposted from https://github.com/orgs/community/discussions/150535, cc https://github.com/yanyongyu/githubkit/issues/188)

Current definition:

      "state_reason": {
        "description": "The reason for the current state",
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "completed",
          "reopened",
          "not_planned",
          null
        ],
        "examples": [
          "not_planned"
        ]
      },

Expected

duplicate listed among variants. Here's an issue with that state_reason (https://api.github.com/repos/python/mypy/issues/18584):

    {
        "active_lock_reason": null,
        "assignee": null,
        "assignees": [],
        "author_association": "CONTRIBUTOR",
        "body": "...",                                                                                                     
        "closed_at": "2025-02-02T16:24:49Z",
        "closed_by": {...},
        "comments": 1,
        "comments_url": "https://api.github.com/repos/python/mypy/issues/18584/comments",
        "created_at": "2025-02-01T23:28:55Z",
        "events_url": "https://api.github.com/repos/python/mypy/issues/18584/events",
        "html_url": "https://github.com/python/mypy/issues/18584",
        "id": 2825499430,
        "labels": [...],
        "labels_url": "https://api.github.com/repos/python/mypy/issues/18584/labels{/name}",
        "locked": false,
        "milestone": null,
        "node_id": "I_kwDOAGuhRc6oabMm",
        "number": 18584,
        "performed_via_github_app": null,
        "reactions": {...},
        "repository_url": "https://api.github.com/repos/python/mypy",
        "state": "closed",
        "state_reason": "duplicate",
        "sub_issues_summary": {
            "completed": 0,
            "percent_completed": 0,
            "total": 0
        },
        "timeline_url": "https://api.github.com/repos/python/mypy/issues/18584/timeline",
        "title": "Overloaded signature with `LiteralString` is seen as \"broader or same\" as `str`",
        "updated_at": "2025-02-02T16:24:50Z",
        "url": "https://api.github.com/repos/python/mypy/issues/18584",
        "user": {...}
    }

Reproduction Steps

$ curl -fs https://api.github.com/repos/python/mypy/issues/18584 | jq -r '.state_reason'
duplicate
主要语言
没有语言数据
星标
1.6k
派生
342
平均合并
7 小时 29 分钟
30 天内合并 PR
62

环境准备

从这里开始

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

github/rest-api-description 的其他 Issue

查看 github/rest-api-description 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

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