{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/github/main/json-schema/github-milestone-schema.json",
  "title": "Milestone",
  "description": "A collection of related issues and pull requests.",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/github-issues-api-openapi.yml#/components/schemas/milestone",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "format": "uri"
    },
    "html_url": {
      "type": "string",
      "format": "uri"
    },
    "labels_url": {
      "type": "string",
      "format": "uri"
    },
    "id": {
      "type": "integer"
    },
    "node_id": {
      "type": "string"
    },
    "number": {
      "description": "The number of the milestone.",
      "type": "integer"
    },
    "state": {
      "description": "The state of the milestone.",
      "type": "string",
      "enum": [
        "open",
        "closed"
      ],
      "default": "open"
    },
    "title": {
      "description": "The title of the milestone.",
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "creator": {
      "$ref": "#/$defs/nullable-simple-user"
    },
    "open_issues": {
      "type": "integer"
    },
    "closed_issues": {
      "type": "integer"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "closed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "due_on": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  },
  "required": [
    "closed_issues",
    "creator",
    "description",
    "due_on",
    "closed_at",
    "id",
    "node_id",
    "labels_url",
    "html_url",
    "number",
    "open_issues",
    "state",
    "title",
    "url",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "nullable-simple-user": {
      "title": "Simple User",
      "description": "A GitHub user.",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        },
        "login": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "node_id": {
          "type": "string"
        },
        "avatar_url": {
          "type": "string",
          "format": "uri"
        },
        "gravatar_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "html_url": {
          "type": "string",
          "format": "uri"
        },
        "followers_url": {
          "type": "string",
          "format": "uri"
        },
        "following_url": {
          "type": "string"
        },
        "gists_url": {
          "type": "string"
        },
        "starred_url": {
          "type": "string"
        },
        "subscriptions_url": {
          "type": "string",
          "format": "uri"
        },
        "organizations_url": {
          "type": "string",
          "format": "uri"
        },
        "repos_url": {
          "type": "string",
          "format": "uri"
        },
        "events_url": {
          "type": "string"
        },
        "received_events_url": {
          "type": "string",
          "format": "uri"
        },
        "type": {
          "type": "string"
        },
        "site_admin": {
          "type": "boolean"
        },
        "starred_at": {
          "type": "string"
        }
      },
      "required": [
        "avatar_url",
        "events_url",
        "followers_url",
        "following_url",
        "gists_url",
        "gravatar_id",
        "html_url",
        "id",
        "node_id",
        "login",
        "organizations_url",
        "received_events_url",
        "repos_url",
        "site_admin",
        "starred_url",
        "subscriptions_url",
        "type",
        "url"
      ]
    }
  }
}