GET /user/repos: `homepage` field declared as format "uri" but API returns empty string ""
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- openapi
- Domain
- api
Research direction
Locate the repository schema and its homepage definition, then inspect the schemas used by GET /user/repos and GET /repos/{owner}/{repo}. Compare the declared URI constraint with responses where homepage is "" and validate the affected schemas; done means those responses pass while valid homepage URLs remain constrained.
Written by the indexing model from the issue text.
Description
Description
The repository schema declares the homepage field with format: "uri", but the GitHub API returns an empty string "" for repositories that have no homepage set.
An empty string is not a valid URI per RFC 3986, so MCP servers and other tools that validate API responses against this schema will reject the entire response with a schema validation error.
Error observed
When calling GET /user/repos (or any endpoint returning repository objects), tools that validate against this schema produce:
MCP error -32602: Structured content does not match the tool's output schema:
data/result/23/homepage must match format "uri"
The offending field is homepage: "" — GitHub returns an empty string when no homepage has been set on a repo, rather than null or omitting the field.
Expected behavior
The schema should either:
- Change
homepageto allownullor an empty string alongside valid URIs (e.g.type: ["string", "null"]with theformat: "uri"applied only when non-null/non-empty), or - Document that the API returns
""for unset homepages and update the format constraint accordingly
Steps to reproduce
- Call
GET /user/reposorGET /repos/{owner}/{repo}for any repository that has no homepage URL set in its settings - The response will contain
"homepage": "" - Validating this response against the current OpenAPI schema will fail on the
format: "uri"constraint
Notes
- This affects all repository-returning endpoints, not just
/user/repos - The
homepagefield is likely nullable/optional in practice — the schema should reflect this
- Dominant language
- No language data
- Stars
- 1.6k
- Forks
- 342
- Avg merge
- 3h 33m
- Merged PRs (30d)
- 51
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 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 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
github/rest-api-description#7111 · 1 comment ·
All issues in github/rest-api-description
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
crossplane/crossplane#7859 ·
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nightscout/nocturne#1379 ·