Skip to content
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

undocumented resource field in the /rate_limit endpoint #3268

Open
skedwards88 opened this issue Jan 2, 2024 · 1 comment
Open

undocumented resource field in the /rate_limit endpoint #3268

skedwards88 opened this issue Jan 2, 2024 · 1 comment

Comments

@skedwards88
Copy link
Collaborator

In some cases, a request to the /rate_limit endpoint returns a resource field for each resources object:

{
  "resources": {
    "core": {
      "limit": 15000,
      "used": 0,
      "remaining": 15000,
      "reset": 1704236754,
      "resource": "core" // returned in some cases but not documented
    },
...
}

(Note that this resource field is not returned with an authenticated gh api request but is returned with an unauthenticated request to https://api.github.com/rate_limit.)

However, this resource field is not documented. We should:

  • omit this field from the response
    OR
  • add this field to the schema and note that it is not always returned (the docs will automatically update once the schema is updated)

For internal discussion, see here and here.

@JLLeitschuh
Copy link

The reason I ran into this was because auto-generated code against the schema breaks Jackson's JSON parser when executed in it's default mode, which is to fail when JSON fields aren't explicitly specified, but are present in the data it's attempting to deserialize from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants