[Schema Inaccuracy] Add `format: int64` to organization `private_repos`

Open
#707 4 comments 0 reactions 1 assignee View on GitHub

@nickfloyd is already working on this.

Since Nov 6, 2025.

Assessment

This issue has not been assessed yet.

Description

feature inaccuracy P2

Schema Inaccuracy

The organization-full -> plan -> private_repos key is defined as type: integer, which is interpreted by many codegen tools as int32. However, if you have an enterprise plan (or at least in our case) the # of private repos returned from the API is 999999999999, which causes a runtime error.

 com.fasterxml.jackson.databind.JsonMappingException: Numeric value (999999999999) out of range of int (-2147483648 - 2147483647)

Schema

 organization-full:
      title: Organization Full
      description: Organization Full
      type: object
      properties:
        plan:
          type: object
          properties:
            private_repos:
              type: integer

Expected

The schema includes a [format: int64 type definition] https://swagger.io/docs/specification/data-models/data-types/#numbers).

Reproduction Steps

From an Enterprise plan on GitHub Enterprise Server 3.1.12:

$ curl --request GET \
  --url https://gh-enterprise.com/api/v3/orgs/ORG_NAME \
  --header 'Accept: application/vnd.github.v3+json'

{
 // other properties
  "plan": {
    "name": "enterprise",
    "space": 123456789,
    "private_repos": 999999999999,
    "filled_seats": 18,
    "seats": 0
  }
}
Dominant language
No language data
Stars
1.6k
Forks
342
Avg merge
3h 33m
Merged PRs (30d)
51

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/rest-api-description

All issues in github/rest-api-description

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.