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

[Schema Inaccuracy] Issue event rename "from" and "to" fields can be null

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

还没有人认领这个 Issue。

评估

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

调研方向

首先,在 OpenAPI 描述中定位 issue-event-rename schema,并将其与链接的 issue-events API 响应进行比较。更新 schema,使其可空性与文档所述的数据相匹配;如果 repository 提供 schema 检查,则验证该描述。

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

描述

documentation

Schema Inaccuracy

Spec:

issue-event-rename": {
        "title": "Issue Event Rename",
        "description": "Issue Event Rename",
        "type": "object",
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },

Expected

Based on the above, since from and to are marked as required they should not be null in the data, but see an example below

Reproduction Steps

https://api.github.com/repos/golang/go/issues/50851/events?sort=updated&direction=desc&per_page=100

...
{
    "id": 5963856655,
    "node_id": "RTE_lADOAWBuf85CiGTczwAAAAFjeTsP",
    "url": "https://api.github.com/repos/golang/go/issues/events/5963856655",
    "actor": {
      "login": "hyangah",
      "id": 4999471,
      "node_id": "MDQ6VXNlcjQ5OTk0NzE=",
      "avatar_url": "https://avatars.githubusercontent.com/u/4999471?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/hyangah",
      "html_url": "https://github.com/hyangah",
      "followers_url": "https://api.github.com/users/hyangah/followers",
      "following_url": "https://api.github.com/users/hyangah/following{/other_user}",
      "gists_url": "https://api.github.com/users/hyangah/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/hyangah/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/hyangah/subscriptions",
      "organizations_url": "https://api.github.com/users/hyangah/orgs",
      "repos_url": "https://api.github.com/users/hyangah/repos",
      "events_url": "https://api.github.com/users/hyangah/events{/privacy}",
      "received_events_url": "https://api.github.com/users/hyangah/received_events",
      "type": "User",
      "user_view_type": "public",
      "site_admin": false
    },
    "event": "renamed",
    "commit_id": null,
    "commit_url": null,
    "created_at": "2022-01-27T13:46:50Z",
    "rename": {
      "from": null,
      "to": null
    },
    "performed_via_github_app": null
  },
...
主要语言
没有语言数据
星标
1.6k
派生
342
平均合并
2 小时 23 分钟
30 天内合并 PR
57

贡献指南

打开贡献指南

从这里开始

  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 摘要。