You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Schema Inaccuracy] Should GET /user/repos be paginated? #4048
changed the title [-][Schema Inaccuracy] Should /user/repos be paginated?[/-][+][Schema Inaccuracy] Should `GET /user/repos` be paginated?[/+]on Oct 7, 2024
I have tried both the JSON and the YAML schema, but I found if I located the section for /user/repos, and added the following under the existing content block, the Link properties come through in the response:
I'm generating Swift sources using Apple's Swift OpenAPI Generator, and compiling them into a desktop app that I've been building for monitoring workflow changes on my Mac.
and did not show up for my other account with few repositories (as the documentation mentions).
I'm not familiar with Swift OpenAPI Generator - is the purpose of that configuration to allow certain headers through? Does the same thing happen with other GitHub API endpoints?
The issue I'm trying to report here is that the Link header is not in the Open API spec that's been published for api.github.com for this endpoint, so it's not being decoded by tooling that uses the spec to generate code around this.
I'm not familiar with Swift OpenAPI Generator […]
From the repository:
"Generate Swift client and server code from an OpenAPI document."
"Swift OpenAPI Generator is a Swift package plugin that can generate the ceremony code required to make API calls, or implement API servers."
as some others do. I imagine this is the issue - we'll get on this 👍 (and this is something we should more actively check against our API documentation)
Activity
[-][Schema Inaccuracy] Should /user/repos be paginated?[/-][+][Schema Inaccuracy] Should `GET /user/repos` be paginated?[/+]calvinchilds commentedon Oct 8, 2024
Thanks for your report @tonyarnold ! Could you clarify what you mean by
that is, what schema and what did you add to make the pagination details show up when they weren't before?
tonyarnold commentedon Oct 8, 2024
Hi @calvinchilds - no worries at all!
I have tried both the JSON and the YAML schema, but I found if I located the section for
/user/repos, and added the following under the existingcontentblock, the Link properties come through in the response:calvinchilds commentedon Oct 8, 2024
Thanks for replying! What are you plugging that schema into i.e. what are you using to call the API, is it a client library, CLI, curl?
tonyarnold commentedon Oct 8, 2024
I'm generating Swift sources using Apple's Swift OpenAPI Generator, and compiling them into a desktop app that I've been building for monitoring workflow changes on my Mac.
calvinchilds commentedon Oct 9, 2024
I tried this with
curl -I "https://api.github.com/user/repos"and found the link header which looked likelink: <https://api.github.com/user/repos?page=2>; rel="next", <https://api.github.com/user/repos?page=35>; rel="last"and did not show up for my other account with few repositories (as the documentation mentions).
I'm not familiar with Swift OpenAPI Generator - is the purpose of that configuration to allow certain headers through? Does the same thing happen with other GitHub API endpoints?
tonyarnold commentedon Oct 9, 2024
The issue I'm trying to report here is that the Link header is not in the Open API spec that's been published for api.github.com for this endpoint, so it's not being decoded by tooling that uses the spec to generate code around this.
From the repository:
"Generate Swift client and server code from an OpenAPI document."
"Swift OpenAPI Generator is a Swift package plugin that can generate the ceremony code required to make API calls, or implement API servers."
calvinchilds commentedon Oct 10, 2024
Ah I think I get you now. In https://raw.githubusercontent.com/github/rest-api-description/refs/heads/main/descriptions/api.github.com/api.github.com.yaml search for
repos/list-for-authenticated-userand theresponsessection doesn't haveas some others do. I imagine this is the issue - we'll get on this 👍 (and this is something we should more actively check against our API documentation)
tonyarnold commentedon Oct 10, 2024
That's exactly the issue. Sorry I wasn't able to be clearer in explaining it.
calvinchilds commentedon Oct 10, 2024
No worries, glad we got there in the end 😄
nickfloyd commentedon Nov 4, 2025
Please let us know if this work is still needed. We're trying to follow up on any older issues to make sure they get properly routed.
becco commentedon Jan 8, 2026
Closing as stale.