[Schema Inaccuracy] Get Repository Unavailable for Legal Reasons
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 35/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- github, openapi
- 领域
- api, documentation
调研方向
先从 GET /repos/{owner}/{repo} 操作及其列出的响应定义开始,然后将它们与 gh api --verbose /repositories/239386228 的复现结果进行比较。完成标准是 schema 描述 451 状态以及 issue 中显示的响应正文字段。
由索引模型根据 Issue 内容生成。
描述
Schema Inaccuracy
When retrieving a repository that is unavailable for legal reasons (e.g. a DMCA takedown request), the GitHub API responds with an HTTP status "451 Unavailable For Legal Reasons" and a response body such as:
{
"message": "Repository access blocked",
"block": {
"reason": "dmca",
"created_at": "2021-04-22T17:53:56Z",
"html_url": "https://github.com/github/dmca/blob/master/2021/04/2021-04-20-ultimate-character-controller.md"
}
}
This response code and error body are not described in the schema.
Relevant schema excerpt:
"/repos/{owner}/{repo}":
get:
summary: Get a repository
description: |-
The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network.
**Note:** In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."
tags:
- repos
operationId: repos/get
externalDocs:
description: API method documentation
url: https://docs.github.com/rest/repos/repos#get-a-repository
parameters:
- "$ref": "#/components/parameters/owner"
- "$ref": "#/components/parameters/repo"
responses:
'200':
description: Response
content:
application/json:
schema:
"$ref": "#/components/schemas/full-repository"
examples:
default-response:
"$ref": "#/components/examples/full-repository-default-response"
'403':
"$ref": "#/components/responses/forbidden"
'404':
"$ref": "#/components/responses/not_found"
'301':
"$ref": "#/components/responses/moved_permanently"
Expected
Expected a 451 response description for "Get a repository".
Reproduction Steps
gh api --verbose /repositories/239386228
- 主要语言
- 没有语言数据
- 星标
- 1.6k
- 派生
- 342
- 平均合并
- 2 小时 23 分钟
- 30 天内合并 PR
- 57
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/rest-api-description 的其他 Issue
-
feature
难度 2/5 1-3 小时 新手友好度 85/100
github/rest-api-description#7220 ·
-
feature
难度 2/5 1-3 小时 新手友好度 82/100
github/rest-api-description#7201 ·
-
feature
难度 2/5 1-3 小时 新手友好度 72/100
github/rest-api-description#7163 ·
-
feature
难度 2/5 1-3 小时 新手友好度 68/100
github/rest-api-description#7162 ·
-
feature
难度 2/5 1-3 小时 新手友好度 68/100
github/rest-api-description#7135 ·
查看 github/rest-api-description 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
speaches-ai/speaches#678 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's 未关闭bug ecr
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
conda-forge/spacy-feedstock#177 ·
-
难度 2/5 1-3 小时 新手友好度 70/100