-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Schema Inaccuracy] Should GET /user/repos
be paginated?
#4048
Comments
GET /user/repos
be paginated?
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? |
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 headers:
Link: *37 |
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? |
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. |
I tried this with
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.
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." |
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
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) |
That's exactly the issue. Sorry I wasn't able to be clearer in explaining it. |
No worries, glad we got there in the end 😄 |
Schema Inaccuracy
GET /user/repos
does not include pagination information in the returned header responses, despite takingpage
/per_page
in the query.Expected
The response should include headers containing the standard set of links to the previous, next, first and last pages.
I've found that if I manually add these to the schema I'm using that this endpoint does return the expected pagination details.
The text was updated successfully, but these errors were encountered: