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

[Schema Inaccuracy] Response for "/repos/{owner}/{repo}/replicas/caches" has incompatible example

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

还没有人认领这个 Issue。

评估

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

调研方向

在 OpenAPI 描述中搜索以 responses/200/content/application~1json/examples/default/value 结尾的 JSON 引用,并检查 /repos/{owner}/{repo}/replicas/caches 的响应示例。使 git 示例符合所述对象架构;如果 API 返回的是列表,则更新架构,然后验证受影响的描述。

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

描述

feature fundamentals-and-support

Schema Inaccuracy

This is the json ref:

#/paths/~1repos~1{owner}~1{repo}~1replicas~1caches/get/responses/200/content/application~1json/examples/default/value

The field spec is

                      "git": {
                        "type": "object",
                        "properties": {
                          "sync_status": {
                            "type": "string",
                            "enum": [
                              "offline",
                              "inactive",
                              "in_sync",
                              "not_in_sync"
                            ]
                          },
                          "last_sync": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "sync_status",
                          "last_sync"
                        ]
                      }

The example is

                        "git": [
                          {
                            "sync_status": "in_sync"
                          },
                          {
                            "last_sync": "2022-01-10T19:33:52Z"
                          }
                        ]

I looked at GHES-3.12, GHES-3.13, GHES-3.14, GHES-3.15.

Expected

The example should have an object or the type spec should have a list.

Reproduction Steps

主要语言
没有语言数据
星标
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 摘要。