[Schema Inaccuracy] `GET /repos/{owner}/{repo}/contents/{path}` spec is missing raw+json / html+json response media types
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
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/rest-api-description
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
github/rest-api-description#7220 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
github/rest-api-description#7201 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/rest-api-description#7163 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7162 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7135 ·
All issues in github/rest-api-description
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
canonical/paas-charm#368 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
area:workflow bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fil-donadoni/tolaria#4409 ·
-
status/awaiting_triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100