[Schema Inaccuracy] `GET /repos/{owner}/{repo}/contents/{path}` spec is missing raw+json / html+json response media types

オープン
#6,089 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
openapi
領域
api

調査の方向性

まず GET /repos/{owner}/{repo}/contents/{path} の OpenAPI 定義を見つけ、リンク先の REST API ドキュメントとその 200 レスポンスを比較します。fpt、ghec、ghes-* のすべてのバリアントに、issue に示されているスキーマを使用した raw+json および html+json メディアタイプを追加し、その後、エンドポイント定義に一貫性があることを確認します。

索引モデルが issue の本文から書いたものです。

説明

documentation

Schema Inaccuracy

The Get repository content docs list these custom media types for that path, but the structured schema doesn't have them:

  • application/vnd.github.raw+json – Returns the raw file contents for files and symlinks.
  • application/vnd.github.html+json – Returns the file contents in HTML (e.g. via GitHub's Markup library).

The description currently only includes application/json and application/vnd.github.object for the 200 response.

Expected

{
  "paths": {
    "/repos/{owner}/{repo}/contents/{path}": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": { "...": "..." },
              "application/vnd.github.object": { "...": "..." },
              "application/vnd.github.raw+json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "application/vnd.github.html+json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}

Reproduction Steps

This applies to all variants:

  • fpt
  • ghec
  • ghes-*
主要言語
言語のデータがありません
スター
1.6k
フォーク
342
平均マージ
3時間 33分
マージ済み PR(30日)
51

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/rest-api-description のほかの issue

github/rest-api-description の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。