Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#6,089 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
openapi
Domain
api

Research direction

Start by locating the OpenAPI definition for GET /repos/{owner}/{repo}/contents/{path} and compare its 200 response with the linked REST API documentation. Add the raw+json and html+json media types with the schemas shown in the issue for all fpt, ghec, and ghes-* variants, then verify the endpoint definitions are consistent.

Written by the indexing model from the issue text.

Description

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-*
Dominant language
No language data
Stars
1.6k
Forks
342
Avg merge
2h 23m
Merged PRs (30d)
57

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/rest-api-description

All issues in github/rest-api-description

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.