{
  "openapi": "3.0.0",
  "paths": {
    "/api": {
      "get": {
        "operationId": "AppController_getHello",
        "parameters": [],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "App"
        ]
      }
    },
    "/api/repositories": {
      "post": {
        "description": "Create Repository",
        "operationId": "RepositoriesController_createRepository",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRepositoryRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateRepositoryResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Create Repository",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}": {
      "get": {
        "description": "Get repositories for username",
        "operationId": "RepositoriesController_getRepositories",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Opaque cursor returned as `nextCursor` by the previous page. Omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Page size.",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRepositoriesResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Get repositories for username",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{slug}": {
      "get": {
        "description": "Get a single repository by owner username and slug",
        "operationId": "RepositoriesController_getRepository",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RepositoryEntity"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Get repository details",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{slug}/fork": {
      "post": {
        "description": "Copy a repository under the requester. One fork per repository per owner.",
        "operationId": "RepositoriesController_forkRepository",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForkRepositoryRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForkRepositoryResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Fork repository",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{slug}/star": {
      "post": {
        "description": "Star a repository. Starring twice leaves the count unchanged.",
        "operationId": "RepositoriesController_starRepository",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StarRepositoryResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Star repository",
        "tags": [
          "Repositories"
        ]
      },
      "delete": {
        "description": "Remove the requester's star from a repository.",
        "operationId": "RepositoriesController_unstarRepository",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StarRepositoryResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Unstar repository",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{slug}/contents": {
      "get": {
        "description": "One level of a directory at the requested ref - a branch or a commit sha - or the default branch when none is given, with the newest commit touching each entry. Directories report the newest commit anywhere beneath them.",
        "operationId": "RepositoriesController_getRepositoryContents",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "required": false,
            "in": "query",
            "description": "Directory to list, relative to the repository root. Omit for the root. Slashes may be sent percent-encoded (`src%2Fdeep`); they are decoded once, so an already-decoded `src/deep` works too.",
            "schema": {
              "maxLength": 4096,
              "example": "src/services",
              "type": "string"
            }
          },
          {
            "name": "ref",
            "required": false,
            "in": "query",
            "description": "Branch or commit sha to list. Accepts `main`, `refs/heads/main` or a commit sha. Omit for the default branch.",
            "schema": {
              "example": "main",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRepositoryContentsResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "The `path` query parameter is not a repository-relative directory.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List repository contents",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{slug}/readme": {
      "get": {
        "description": "The README of a directory - the root of the repository when no `path` is given - at the requested ref.",
        "operationId": "RepositoriesController_getRepositoryReadme",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "required": false,
            "in": "query",
            "description": "Branch, tag-free ref or commit sha to read from. Accepts `main`, `refs/heads/main` or a commit sha. Omit for the default branch.",
            "schema": {
              "example": "main",
              "type": "string"
            }
          },
          {
            "name": "path",
            "required": false,
            "in": "query",
            "description": "Directory to look in. Omit for the root of the repository.",
            "schema": {
              "example": "packages/db",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRepositoryReadmeResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Read the README",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{slug}/blob": {
      "get": {
        "description": "Contents of a single file at the requested ref - a branch or a commit sha - or the default branch when none is given. Binary files come back base64-encoded, and a file past the inline size limit comes back without contents.",
        "operationId": "RepositoriesController_getRepositoryBlob",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "required": true,
            "in": "query",
            "description": "File to read, relative to the repository root.",
            "schema": {
              "maxLength": 4096,
              "example": "src/main.ts",
              "type": "string"
            }
          },
          {
            "name": "ref",
            "required": false,
            "in": "query",
            "description": "Branch, tag-free ref or commit sha to read from. Accepts `main`, `refs/heads/main` or a commit sha. Omit for the default branch.",
            "schema": {
              "example": "main",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRepositoryBlobResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "The `path` query parameter is not a repository-relative file.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Read a file",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{slug}/raw": {
      "get": {
        "description": "The raw bytes of a file. Images, audio, video and PDFs are served inline for the browser to render; everything else downloads.",
        "operationId": "RepositoriesController_getRawBlob",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "required": true,
            "in": "query",
            "description": "File to read, relative to the repository root.",
            "schema": {
              "maxLength": 4096,
              "example": "src/main.ts",
              "type": "string"
            }
          },
          {
            "name": "ref",
            "required": false,
            "in": "query",
            "description": "Branch, tag-free ref or commit sha to read from. Accepts `main`, `refs/heads/main` or a commit sha. Omit for the default branch.",
            "schema": {
              "example": "main",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Download a file",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{slug}/commits": {
      "get": {
        "description": "History of a branch or commit, newest first, optionally narrowed to one path. Pages are cursor-based: pass a response `nextCursor` back as `cursor`.",
        "operationId": "RepositoriesController_getRepositoryCommits",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "required": false,
            "in": "query",
            "description": "Branch or commit sha to walk. Omit for the default branch.",
            "schema": {
              "example": "main",
              "type": "string"
            }
          },
          {
            "name": "path",
            "required": false,
            "in": "query",
            "description": "Only commits touching this path.",
            "schema": {
              "maxLength": 4096,
              "example": "apps/api",
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Sha to resume from, taken from a previous `nextCursor`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRepositoryCommitsResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List commits",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{slug}/commits/{sha}": {
      "get": {
        "description": "One commit with the paths it changed, against its first parent. Accepts a full sha or any unambiguous prefix.",
        "operationId": "RepositoriesController_getRepositoryCommit",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sha",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRepositoryCommitResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Read a commit",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{slug}/commits/{sha}/patch": {
      "get": {
        "description": "The commit as a git patch file, unparsed.",
        "operationId": "RepositoriesController_getCommitPatch",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sha",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "required": false,
            "in": "query",
            "description": "Limit the patch to one path.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/x-patch": {
                "example": ""
              }
            },
            "description": ""
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Read a commit as a patch",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{slug}/branches": {
      "get": {
        "description": "Every branch of the repository, and which one it opens on.",
        "operationId": "RepositoriesController_getRepositoryBranches",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRepositoryBranchesResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List repository branches",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{slug}/languages": {
      "get": {
        "description": "Bytes per language on the default branch, largest first",
        "operationId": "RepositoriesController_getRepositoryLanguages",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRepositoryLanguagesResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Language breakdown",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{slug}/stargazers": {
      "get": {
        "description": "Who starred the repository, most recently first. Pages are cursor-based: pass a response `nextCursor` back as `cursor`.",
        "operationId": "RepositoriesController_getRepositoryStargazers",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Opaque cursor returned as `nextCursor` by the previous page. Omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Page size.",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRepositoryStargazersResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List stargazers",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{slug}/forks": {
      "get": {
        "description": "Forks of the repository, newest push first. A private fork is only listed to its own owner.",
        "operationId": "RepositoriesController_getRepositoryForks",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Opaque cursor returned as `nextCursor` by the previous page. Omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Page size.",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRepositoryForksResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List forks",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{slug}/contributors": {
      "get": {
        "description": "Authors of the default branch, most commits first, read from the contribution index with linked Ghost accounts. Never materializes the repository.",
        "operationId": "RepositoriesController_getRepositoryContributors",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Maximum contributors to return.",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 100,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRepositoryContributorsResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List contributors",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls": {
      "post": {
        "operationId": "PullRequestsController_createPullRequest",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePullRequestRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PullRequestDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Open a pull request",
        "tags": [
          "Pull requests"
        ]
      },
      "get": {
        "operationId": "PullRequestsController_getPullRequests",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/PullRequestStateFilter"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPullRequestsResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List pull requests",
        "tags": [
          "Pull requests"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/compare/patch": {
      "get": {
        "operationId": "PullRequestsController_comparePatch",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "required": true,
            "in": "query",
            "description": "Branch the changes would merge into.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "head",
            "required": true,
            "in": "query",
            "description": "Branch the changes come from, `owner:branch` for a fork.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "required": false,
            "in": "query",
            "description": "Limit the patch to one path.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "The patch two branches would open a request with",
        "tags": [
          "Pull requests"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/compare": {
      "get": {
        "operationId": "PullRequestsController_compare",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "required": true,
            "in": "query",
            "description": "Branch the changes would merge into.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "head",
            "required": true,
            "in": "query",
            "description": "Branch the changes come from, `owner:branch` for a fork.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompareResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "The files two branches would open a request with",
        "tags": [
          "Pull requests"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}": {
      "get": {
        "operationId": "PullRequestsController_getPullRequest",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PullRequestDetailDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Get a pull request",
        "tags": [
          "Pull requests"
        ]
      },
      "patch": {
        "operationId": "PullRequestsController_updatePullRequest",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePullRequestRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PullRequestDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Edit a pull request title or description",
        "tags": [
          "Pull requests"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}/commits": {
      "get": {
        "operationId": "PullRequestsController_getCommits",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Sha to resume from, taken from a previous `nextCursor`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPullRequestCommitsResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Commits a pull request adds",
        "tags": [
          "Pull requests"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}/files": {
      "get": {
        "operationId": "PullRequestsController_getFiles",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPullRequestFilesResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Paths a pull request changes",
        "tags": [
          "Pull requests"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}/patch": {
      "get": {
        "operationId": "PullRequestsController_getPatch",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "path",
            "required": false,
            "in": "query",
            "description": "Limit the patch to one path.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "The patch itself, as text",
        "tags": [
          "Pull requests"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}/comments": {
      "get": {
        "operationId": "PullRequestsController_getComments",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPullRequestCommentsResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Comments on a pull request",
        "tags": [
          "Pull requests"
        ]
      },
      "post": {
        "operationId": "PullRequestsController_createComment",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePullRequestCommentRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PullRequestCommentDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Comment on a pull request",
        "tags": [
          "Pull requests"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}/merge": {
      "post": {
        "operationId": "PullRequestsController_mergePullRequest",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MergePullRequestRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MergePullRequestResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Merge a pull request into its base branch",
        "tags": [
          "Pull requests"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}/close": {
      "patch": {
        "operationId": "PullRequestsController_closePullRequest",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PullRequestDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Close a pull request without merging",
        "tags": [
          "Pull requests"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/issues": {
      "post": {
        "operationId": "IssuesController_createIssue",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIssueRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Open an issue",
        "tags": [
          "Issues"
        ]
      },
      "get": {
        "operationId": "IssuesController_getIssues",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "required": false,
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/IssueStateFilter"
            }
          },
          {
            "name": "q",
            "required": false,
            "in": "query",
            "description": "Full-text search over title and body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "author",
            "required": false,
            "in": "query",
            "description": "Filter by author username.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assignee",
            "required": false,
            "in": "query",
            "description": "Filter by assignee username.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "labels",
            "required": false,
            "in": "query",
            "description": "Comma-separated label names. An issue must carry all of them.",
            "schema": {
              "example": "bug,help wanted",
              "type": "string"
            }
          },
          {
            "name": "sort",
            "required": false,
            "in": "query",
            "schema": {
              "default": "created",
              "type": "string",
              "enum": [
                "created",
                "updated",
                "comments"
              ]
            }
          },
          {
            "name": "direction",
            "required": false,
            "in": "query",
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetIssuesResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List issues",
        "tags": [
          "Issues"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/issues/{number}": {
      "get": {
        "operationId": "IssuesController_getIssue",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueDetailDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Get an issue",
        "tags": [
          "Issues"
        ]
      },
      "patch": {
        "operationId": "IssuesController_updateIssue",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIssueRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Edit an issue title or description",
        "tags": [
          "Issues"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/issues/{number}/close": {
      "post": {
        "operationId": "IssuesController_closeIssue",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Close an issue",
        "tags": [
          "Issues"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/issues/{number}/reopen": {
      "post": {
        "operationId": "IssuesController_reopenIssue",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Reopen a closed issue",
        "tags": [
          "Issues"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/issues/{number}/comments": {
      "get": {
        "operationId": "IssuesController_getComments",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetIssueCommentsResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Comments on an issue",
        "tags": [
          "Issues"
        ]
      },
      "post": {
        "operationId": "IssuesController_createComment",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIssueCommentRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueCommentDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Comment on an issue",
        "tags": [
          "Issues"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/issues/{number}/comments/{commentId}": {
      "patch": {
        "operationId": "IssuesController_updateComment",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "commentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIssueCommentRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueCommentDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Edit an issue comment",
        "tags": [
          "Issues"
        ]
      },
      "delete": {
        "operationId": "IssuesController_deleteComment",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "commentId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Delete an issue comment",
        "tags": [
          "Issues"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/issues/{number}/timeline": {
      "get": {
        "operationId": "IssuesController_getTimeline",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetIssueTimelineResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Comments and events interleaved oldest-first",
        "tags": [
          "Issues"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/issues/{number}/labels": {
      "put": {
        "operationId": "IssuesController_setIssueLabels",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetIssueLabelsRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Replace the labels on an issue",
        "tags": [
          "Issues"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/issues/{number}/assignees": {
      "put": {
        "operationId": "IssuesController_setIssueAssignees",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "required": true,
            "in": "path",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetIssueAssigneesRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Replace the assignees on an issue",
        "tags": [
          "Issues"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/labels": {
      "get": {
        "operationId": "LabelsController_listLabels",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetLabelsResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List labels in a repository",
        "tags": [
          "Labels"
        ]
      },
      "post": {
        "operationId": "LabelsController_createLabel",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLabelRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Create a label",
        "tags": [
          "Labels"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/labels/{labelId}": {
      "patch": {
        "operationId": "LabelsController_updateLabel",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "labelId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLabelRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Update a label",
        "tags": [
          "Labels"
        ]
      },
      "delete": {
        "operationId": "LabelsController_deleteLabel",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "labelId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Delete a label",
        "tags": [
          "Labels"
        ]
      }
    },
    "/api/emails": {
      "get": {
        "operationId": "EmailsController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListEmailsResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List the addresses on the signed-in account",
        "tags": [
          "Emails"
        ]
      },
      "post": {
        "description": "Mails a verification link. The address counts for nothing - sign-in, commit attribution - until that link is followed.",
        "operationId": "EmailsController_add",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddEmailDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserEmailDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Add an address to the signed-in account",
        "tags": [
          "Emails"
        ]
      }
    },
    "/api/emails/verify": {
      "get": {
        "description": "Redirects to the web app either way; the link is single use.",
        "operationId": "EmailsController_verify",
        "parameters": [
          {
            "name": "token",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "summary": "Follow an address verification link",
        "tags": [
          "Emails"
        ]
      }
    },
    "/api/emails/{id}/resend": {
      "post": {
        "description": "For the mail that never arrived or expired. The previous link stops working, and a resend is refused for a minute after the last one.",
        "operationId": "EmailsController_resend",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Send the verification link again",
        "tags": [
          "Emails"
        ]
      }
    },
    "/api/emails/{id}/primary": {
      "post": {
        "description": "Swaps it with the current primary, which stays on the account as an extra so sign-in with it keeps working.",
        "operationId": "EmailsController_makePrimary",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListEmailsResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Make a verified address the account address",
        "tags": [
          "Emails"
        ]
      }
    },
    "/api/emails/{id}": {
      "delete": {
        "operationId": "EmailsController_remove",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Remove an address from the signed-in account",
        "tags": [
          "Emails"
        ]
      }
    },
    "/api/users/avatar": {
      "put": {
        "description": "Takes the raw image bytes. Returns the URL to store on the user; writing `user.image` stays with Better Auth’s `update-user`.",
        "operationId": "UserController_uploadAvatar",
        "parameters": [
          {
            "name": "content-type",
            "required": true,
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "image/png": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "image/jpeg": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadAvatarResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Upload the signed-in user’s avatar",
        "tags": [
          "Users"
        ]
      },
      "delete": {
        "operationId": "UserController_deleteAvatar",
        "parameters": [],
        "responses": {
          "204": {
            "description": ""
          }
        },
        "summary": "Delete the signed-in user’s stored avatar",
        "tags": [
          "Users"
        ]
      }
    },
    "/api/users/avatars/{userId}/{name}": {
      "get": {
        "operationId": "UserController_getAvatar",
        "parameters": [
          {
            "name": "userId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Serve a stored avatar",
        "tags": [
          "Users"
        ]
      }
    },
    "/api/users/{username}": {
      "get": {
        "operationId": "UserController_getProfile",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserProfileResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Read a user's public profile",
        "tags": [
          "Users"
        ]
      }
    },
    "/api/users/{username}/contributions": {
      "get": {
        "description": "Daily commit counts for a calendar year, across the repositories the requester may see that the user owns. Days are UTC, in order.",
        "operationId": "UserController_getContributions",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "required": false,
            "in": "query",
            "description": "Calendar year to render. Defaults to the current year.",
            "schema": {
              "example": 2026,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUserContributionsResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Read a user's contribution calendar",
        "tags": [
          "Users"
        ]
      }
    }
  },
  "info": {
    "title": "Ghost",
    "description": "API reference for Ghost's API",
    "version": "0.0.1",
    "contact": {}
  },
  "tags": [],
  "servers": [],
  "components": {
    "schemas": {
      "RepositoryVisibility": {
        "type": "string",
        "enum": [
          "public",
          "private"
        ]
      },
      "CreateRepositoryRequestDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryVisibility"
              }
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "CreateRepositoryResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "slug"
        ]
      },
      "ErrorResponseDTO": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ]
      },
      "RepositoryParentEntity": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "username",
          "slug",
          "name"
        ]
      },
      "RepositoryEntity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryVisibility"
              }
            ]
          },
          "lastPushedAt": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "starCount": {
            "type": "number"
          },
          "viewerHasStarred": {
            "type": "boolean"
          },
          "forkCount": {
            "type": "number"
          },
          "viewerForkSlug": {
            "type": "string",
            "nullable": true,
            "description": "Slug of the viewer's own fork of this repository, if any"
          },
          "parent": {
            "nullable": true,
            "description": "The repository this one was forked from",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryParentEntity"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "visibility",
          "lastPushedAt",
          "createdAt",
          "updatedAt",
          "starCount",
          "viewerHasStarred",
          "forkCount"
        ]
      },
      "GetRepositoriesResponseDTO": {
        "type": "object",
        "properties": {
          "repositories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RepositoryEntity"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true,
            "description": "Pass back as `cursor` for the next page. `null` on the last page."
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "required": [
          "repositories",
          "nextCursor",
          "hasMore"
        ]
      },
      "ForkRepositoryRequestDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryVisibility"
              }
            ]
          }
        },
        "required": [
          "name",
          "visibility"
        ]
      },
      "ForkRepositoryResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "slug",
          "username"
        ]
      },
      "StarRepositoryResponseDTO": {
        "type": "object",
        "properties": {
          "starCount": {
            "type": "number"
          },
          "viewerHasStarred": {
            "type": "boolean"
          }
        },
        "required": [
          "starCount",
          "viewerHasStarred"
        ]
      },
      "CommitSummaryDTO": {
        "type": "object",
        "properties": {
          "sha": {
            "type": "string",
            "description": "Full 40-character commit sha."
          },
          "message": {
            "type": "string",
            "description": "Commit subject - the first line of the message."
          },
          "committedAt": {
            "type": "string",
            "description": "Committer timestamp, ISO 8601."
          }
        },
        "required": [
          "sha",
          "message",
          "committedAt"
        ]
      },
      "TreeEntryType": {
        "type": "string",
        "enum": [
          "blob",
          "tree",
          "commit"
        ],
        "description": "`tree` is a directory, `commit` a submodule."
      },
      "TreeEntryDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Entry name within the listed directory."
          },
          "path": {
            "type": "string",
            "description": "Full path from the repository root."
          },
          "type": {
            "description": "`tree` is a directory, `commit` a submodule.",
            "allOf": [
              {
                "$ref": "#/components/schemas/TreeEntryType"
              }
            ]
          },
          "mode": {
            "type": "string",
            "description": "Git file mode, e.g. `100644`.",
            "example": "100644"
          },
          "oid": {
            "type": "string",
            "description": "Object id of the blob or tree."
          },
          "size": {
            "type": "number",
            "nullable": true,
            "description": "Blob size in bytes; `null` for trees and submodules."
          },
          "lastCommit": {
            "nullable": true,
            "description": "Newest commit touching this entry, or anything beneath it for a tree. `null` only if the index has not caught up with the ref.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CommitSummaryDTO"
              }
            ]
          }
        },
        "required": [
          "name",
          "path",
          "type",
          "mode",
          "oid",
          "size",
          "lastCommit"
        ]
      },
      "GetRepositoryContentsResponseDTO": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string",
            "description": "Ref that was listed, always fully qualified.",
            "example": "refs/heads/main"
          },
          "path": {
            "type": "string",
            "description": "Normalized directory that was listed, with a trailing slash. Empty at the root.",
            "example": "src/services/"
          },
          "commitCount": {
            "type": "number",
            "description": "Commits reachable from the ref. `0` for an unborn ref.",
            "example": 128
          },
          "commit": {
            "nullable": true,
            "description": "Tip commit of the ref. `null` when nothing has been pushed yet.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CommitSummaryDTO"
              }
            ]
          },
          "entries": {
            "description": "One level of the directory: directories first (submodules among them), then files, each group alphabetical. Case is a minor difference, so `readme.md` and `README.md` sit together rather than in separate blocks, and embedded numbers order naturally (`file2` before `file10`). Empty for an unborn ref or a path that is not a directory.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TreeEntryDTO"
            }
          }
        },
        "required": [
          "ref",
          "path",
          "commitCount",
          "commit",
          "entries"
        ]
      },
      "GetRepositoryReadmeResponseDTO": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string",
            "description": "Ref that was read, always fully qualified.",
            "example": "refs/heads/main"
          },
          "path": {
            "type": "string",
            "nullable": true,
            "description": "Path of the README that was found, `null` when the repository has none.",
            "example": "README.md"
          },
          "size": {
            "type": "number",
            "description": "README size in bytes, 0 when there is none."
          },
          "content": {
            "type": "string",
            "nullable": true,
            "description": "Markdown source. `null` when there is no README, when it is past the inline size limit, or when it is not valid UTF-8 text."
          }
        },
        "required": [
          "ref",
          "path",
          "size",
          "content"
        ]
      },
      "BlobEncoding": {
        "type": "string",
        "enum": [
          "utf-8",
          "base64"
        ],
        "description": "`base64` for binary files, and for anything that is not valid UTF-8."
      },
      "GetRepositoryBlobResponseDTO": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string",
            "description": "Ref that was read, always fully qualified.",
            "example": "refs/heads/main"
          },
          "path": {
            "type": "string",
            "description": "Normalized path of the file.",
            "example": "src/main.ts"
          },
          "oid": {
            "type": "string",
            "description": "Object id of the blob."
          },
          "size": {
            "type": "number",
            "description": "File size in bytes."
          },
          "encoding": {
            "description": "`base64` for binary files, and for anything that is not valid UTF-8.",
            "allOf": [
              {
                "$ref": "#/components/schemas/BlobEncoding"
              }
            ]
          },
          "content": {
            "type": "string",
            "nullable": true,
            "description": "File contents, `null` when the file is past the inline size limit."
          },
          "commit": {
            "nullable": true,
            "description": "Newest commit touching this file.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CommitSummaryDTO"
              }
            ]
          }
        },
        "required": [
          "ref",
          "path",
          "oid",
          "size",
          "encoding",
          "content",
          "commit"
        ]
      },
      "CommitDTO": {
        "type": "object",
        "properties": {
          "sha": {
            "type": "string",
            "description": "Full 40-character commit sha."
          },
          "subject": {
            "type": "string",
            "description": "Commit subject, the first line of the message."
          },
          "body": {
            "type": "string",
            "description": "The rest of the message. Empty when there is none."
          },
          "authorName": {
            "type": "string"
          },
          "authorEmail": {
            "type": "string"
          },
          "committedAt": {
            "type": "string",
            "description": "Committer timestamp, ISO 8601."
          }
        },
        "required": [
          "sha",
          "subject",
          "body",
          "authorName",
          "authorEmail",
          "committedAt"
        ]
      },
      "GetRepositoryCommitsResponseDTO": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string",
            "description": "Ref that was walked, always fully qualified.",
            "example": "refs/heads/main"
          },
          "from": {
            "type": "number",
            "description": "Position of this page's first commit in the walk, 1-based. `0` when the page is empty.",
            "example": 41
          },
          "to": {
            "type": "number",
            "description": "Position of this page's last commit. `0` when the page is empty.",
            "example": 60
          },
          "total": {
            "type": "number",
            "description": "Commits the walk can reach in total, narrowed by `path` when one is given.",
            "example": 128
          },
          "commits": {
            "description": "Newest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommitDTO"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true,
            "description": "Pass back as `cursor` for the next page. `null` on the last page."
          }
        },
        "required": [
          "ref",
          "from",
          "to",
          "total",
          "commits",
          "nextCursor"
        ]
      },
      "CommitFileDTO": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "`A` added, `M` modified, `D` deleted."
          },
          "path": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "path"
        ]
      },
      "GetRepositoryCommitResponseDTO": {
        "type": "object",
        "properties": {
          "sha": {
            "type": "string",
            "description": "Full 40-character commit sha."
          },
          "subject": {
            "type": "string",
            "description": "Commit subject, the first line of the message."
          },
          "body": {
            "type": "string",
            "description": "The rest of the message. Empty when there is none."
          },
          "authorName": {
            "type": "string"
          },
          "authorEmail": {
            "type": "string"
          },
          "committedAt": {
            "type": "string",
            "description": "Committer timestamp, ISO 8601."
          },
          "files": {
            "description": "Paths this commit changed, against its first parent.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommitFileDTO"
            }
          }
        },
        "required": [
          "sha",
          "subject",
          "body",
          "authorName",
          "authorEmail",
          "committedAt",
          "files"
        ]
      },
      "GetRepositoryBranchesResponseDTO": {
        "type": "object",
        "properties": {
          "defaultBranch": {
            "type": "string",
            "nullable": true,
            "description": "Branch the repository opens on. `null` when nothing has been pushed yet.",
            "example": "main"
          },
          "branches": {
            "description": "Branch names, without the `refs/heads/` prefix, ordered by name.",
            "example": [
              "main",
              "feat/contents"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "defaultBranch",
          "branches"
        ]
      },
      "RepositoryLanguageDTO": {
        "type": "object",
        "properties": {
          "language": {
            "type": "string",
            "example": "TypeScript"
          },
          "bytes": {
            "type": "number",
            "description": "Total size of the files in this language.",
            "example": 128400
          },
          "percent": {
            "type": "number",
            "description": "Share of the counted bytes, 0-100.",
            "example": 72.4
          }
        },
        "required": [
          "language",
          "bytes",
          "percent"
        ]
      },
      "GetRepositoryLanguagesResponseDTO": {
        "type": "object",
        "properties": {
          "languages": {
            "description": "Languages on the default branch, largest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RepositoryLanguageDTO"
            }
          }
        },
        "required": [
          "languages"
        ]
      },
      "StargazerDTO": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "image": {
            "type": "string",
            "nullable": true
          },
          "starredAt": {
            "type": "string",
            "description": "When this user starred the repository."
          }
        },
        "required": [
          "username",
          "name",
          "image",
          "starredAt"
        ]
      },
      "GetRepositoryStargazersResponseDTO": {
        "type": "object",
        "properties": {
          "stargazers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StargazerDTO"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "required": [
          "stargazers",
          "nextCursor",
          "hasMore"
        ]
      },
      "ForkDTO": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "description": "Owner of the fork."
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "lastPushedAt": {
            "type": "string"
          }
        },
        "required": [
          "username",
          "slug",
          "name",
          "description",
          "lastPushedAt"
        ]
      },
      "GetRepositoryForksResponseDTO": {
        "type": "object",
        "properties": {
          "forks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ForkDTO"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "required": [
          "forks",
          "nextCursor",
          "hasMore"
        ]
      },
      "ContributorDTO": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "description": "Linked Ghost username, when the commit email matches an account.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Commit author name, as written in git."
          },
          "image": {
            "type": "string",
            "description": "Avatar of the linked account, if any.",
            "nullable": true
          },
          "commits": {
            "type": "number",
            "description": "Commits by this author on the default branch."
          },
          "percent": {
            "type": "number",
            "description": "Share of the default-branch commits, 0-100."
          },
          "lastCommittedAt": {
            "type": "string",
            "description": "Day of the author’s most recent commit, ISO 8601 at UTC midnight. Day-granular: the index stores days, not timestamps."
          }
        },
        "required": [
          "username",
          "name",
          "image",
          "commits",
          "percent",
          "lastCommittedAt"
        ]
      },
      "GetRepositoryContributorsResponseDTO": {
        "type": "object",
        "properties": {
          "contributors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContributorDTO"
            }
          },
          "totalCommits": {
            "type": "number",
            "description": "Default-branch commits indexed in total."
          },
          "totalContributors": {
            "type": "number",
            "description": "Distinct indexed authors in total."
          }
        },
        "required": [
          "contributors",
          "totalCommits",
          "totalContributors"
        ]
      },
      "CreatePullRequestRequestDTO": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Add a rate limiter"
          },
          "body": {
            "type": "string"
          },
          "base": {
            "type": "string",
            "description": "Branch to merge into, in this repository.",
            "example": "main"
          },
          "head": {
            "type": "string",
            "description": "Branch to merge from. `owner:branch` for a fork, or a bare branch name for this repository.",
            "example": "alice:feature"
          }
        },
        "required": [
          "title",
          "base",
          "head"
        ]
      },
      "PullRequestState": {
        "type": "string",
        "enum": [
          "open",
          "closed",
          "merged"
        ]
      },
      "PullRequestSideDTO": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "example": "bob"
          },
          "slug": {
            "type": "string",
            "example": "ghost"
          },
          "ref": {
            "type": "string",
            "example": "main"
          }
        },
        "required": [
          "username",
          "slug",
          "ref"
        ]
      },
      "PullRequestDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "number": {
            "type": "number",
            "description": "Per base repository, and what the URL carries."
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PullRequestState"
              }
            ]
          },
          "base": {
            "$ref": "#/components/schemas/PullRequestSideDTO"
          },
          "head": {
            "$ref": "#/components/schemas/PullRequestSideDTO"
          },
          "headSha": {
            "type": "string",
            "description": "Head tip as of the last read."
          },
          "mergeCommitSha": {
            "type": "string",
            "nullable": true
          },
          "authorUsername": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "number",
          "title",
          "body",
          "state",
          "base",
          "head",
          "headSha",
          "mergeCommitSha",
          "authorUsername",
          "createdAt",
          "updatedAt"
        ]
      },
      "PullRequestStateFilter": {
        "type": "string",
        "enum": [
          "open",
          "closed",
          "merged",
          "all"
        ]
      },
      "GetPullRequestsResponseDTO": {
        "type": "object",
        "properties": {
          "pullRequests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PullRequestDTO"
            }
          },
          "total": {
            "type": "number",
            "description": "Matching the state filter, ignoring the page."
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "required": [
          "pullRequests",
          "total",
          "nextCursor",
          "hasMore"
        ]
      },
      "PullRequestFileDTO": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "`A` added, `M` modified, `D` deleted."
          },
          "path": {
            "type": "string"
          },
          "additions": {
            "type": "number"
          },
          "deletions": {
            "type": "number"
          },
          "binary": {
            "type": "boolean",
            "description": "Line counts are meaningless when true."
          }
        },
        "required": [
          "status",
          "path",
          "additions",
          "deletions",
          "binary"
        ]
      },
      "CompareResponseDTO": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "description": "Merge base of the two branches."
          },
          "to": {
            "type": "string",
            "description": "Head tip the diff is taken to."
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PullRequestFileDTO"
            }
          }
        },
        "required": [
          "from",
          "to",
          "files"
        ]
      },
      "PullRequestDetailDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "number": {
            "type": "number",
            "description": "Per base repository, and what the URL carries."
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PullRequestState"
              }
            ]
          },
          "base": {
            "$ref": "#/components/schemas/PullRequestSideDTO"
          },
          "head": {
            "$ref": "#/components/schemas/PullRequestSideDTO"
          },
          "headSha": {
            "type": "string",
            "description": "Head tip as of the last read."
          },
          "mergeCommitSha": {
            "type": "string",
            "nullable": true
          },
          "authorUsername": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "mergeBase": {
            "type": "string",
            "nullable": true,
            "description": "Commit the two branches diverged from."
          },
          "commitCount": {
            "type": "number",
            "description": "Commits the head branch adds on top of the base."
          },
          "changedFiles": {
            "type": "number"
          },
          "additions": {
            "type": "number"
          },
          "deletions": {
            "type": "number"
          },
          "mergeable": {
            "type": "boolean",
            "description": "Whether the merge is conflict-free right now. Never cached."
          }
        },
        "required": [
          "id",
          "number",
          "title",
          "body",
          "state",
          "base",
          "head",
          "headSha",
          "mergeCommitSha",
          "authorUsername",
          "createdAt",
          "updatedAt",
          "mergeBase",
          "commitCount",
          "changedFiles",
          "additions",
          "deletions",
          "mergeable"
        ]
      },
      "GetPullRequestCommitsResponseDTO": {
        "type": "object",
        "properties": {
          "commits": {
            "description": "Newest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommitDTO"
            }
          },
          "total": {
            "type": "number"
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "commits",
          "total",
          "nextCursor"
        ]
      },
      "GetPullRequestFilesResponseDTO": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "description": "Commit the diff is taken from, the merge base of the two branches."
          },
          "to": {
            "type": "string",
            "description": "Head tip the diff is taken to."
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PullRequestFileDTO"
            }
          }
        },
        "required": [
          "from",
          "to",
          "files"
        ]
      },
      "PullRequestCommentDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "body": {
            "type": "string",
            "description": "Markdown, rendered by the client."
          },
          "authorUsername": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "body",
          "authorUsername",
          "createdAt",
          "updatedAt"
        ]
      },
      "GetPullRequestCommentsResponseDTO": {
        "type": "object",
        "properties": {
          "comments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PullRequestCommentDTO"
            }
          }
        },
        "required": [
          "comments"
        ]
      },
      "CreatePullRequestCommentRequestDTO": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "maxLength": 20000
          }
        },
        "required": [
          "body"
        ]
      },
      "MergePullRequestRequestDTO": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Merge commit subject. Defaults to the request title."
          }
        }
      },
      "MergePullRequestResponseDTO": {
        "type": "object",
        "properties": {
          "mergeCommitSha": {
            "type": "string"
          },
          "seq": {
            "type": "number",
            "description": "Sequence the merge landed at in the base log."
          }
        },
        "required": [
          "mergeCommitSha",
          "seq"
        ]
      },
      "UpdatePullRequestRequestDTO": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Add a rate limiter"
          },
          "body": {
            "type": "string",
            "nullable": true,
            "description": "Markdown. `null` clears the description."
          }
        }
      },
      "CreateIssueRequestDTO": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Login fails with 500 on Safari"
          },
          "body": {
            "type": "string",
            "description": "Markdown."
          },
          "labels": {
            "description": "Label names in this repository.",
            "example": [
              "bug"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "assignees": {
            "description": "Usernames to assign.",
            "example": [
              "octocat"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "title"
        ]
      },
      "IssueState": {
        "type": "string",
        "enum": [
          "open",
          "closed"
        ]
      },
      "LabelDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "example": "bug"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "6 hex chars, no `#`. The client adds `#` when rendering.",
            "example": "d73a4a"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "color",
          "createdAt",
          "updatedAt"
        ]
      },
      "IssueDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "number": {
            "type": "number",
            "description": "Per repository, and what the URL carries."
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IssueState"
              }
            ]
          },
          "authorUsername": {
            "type": "string"
          },
          "closedByUsername": {
            "type": "string",
            "nullable": true
          },
          "labels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LabelDTO"
            }
          },
          "assignees": {
            "example": [
              "octocat"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "commentCount": {
            "type": "number"
          },
          "closedAt": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "viewerCanEdit": {
            "type": "boolean",
            "description": "True when the requesting user is the author or can write to the repository."
          }
        },
        "required": [
          "id",
          "number",
          "title",
          "body",
          "state",
          "authorUsername",
          "closedByUsername",
          "labels",
          "assignees",
          "commentCount",
          "closedAt",
          "createdAt",
          "updatedAt",
          "viewerCanEdit"
        ]
      },
      "IssueStateFilter": {
        "type": "string",
        "enum": [
          "open",
          "closed",
          "all"
        ]
      },
      "GetIssuesResponseDTO": {
        "type": "object",
        "properties": {
          "issues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IssueDTO"
            }
          },
          "total": {
            "type": "number",
            "description": "Matching every filter except `state`."
          },
          "openCount": {
            "type": "number"
          },
          "closedCount": {
            "type": "number"
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "required": [
          "issues",
          "total",
          "openCount",
          "closedCount",
          "nextCursor",
          "hasMore"
        ]
      },
      "IssueDetailDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "number": {
            "type": "number",
            "description": "Per repository, and what the URL carries."
          },
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IssueState"
              }
            ]
          },
          "authorUsername": {
            "type": "string"
          },
          "closedByUsername": {
            "type": "string",
            "nullable": true
          },
          "labels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LabelDTO"
            }
          },
          "assignees": {
            "example": [
              "octocat"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "commentCount": {
            "type": "number"
          },
          "closedAt": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "viewerCanEdit": {
            "type": "boolean",
            "description": "True when the requesting user is the author or can write to the repository."
          }
        },
        "required": [
          "id",
          "number",
          "title",
          "body",
          "state",
          "authorUsername",
          "closedByUsername",
          "labels",
          "assignees",
          "commentCount",
          "closedAt",
          "createdAt",
          "updatedAt",
          "viewerCanEdit"
        ]
      },
      "UpdateIssueRequestDTO": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Login fails with 500 on Safari"
          },
          "body": {
            "type": "string",
            "nullable": true,
            "description": "Markdown. `null` clears the description."
          }
        }
      },
      "IssueCommentDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "body": {
            "type": "string",
            "description": "Markdown, rendered by the client."
          },
          "authorUsername": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "body",
          "authorUsername",
          "createdAt",
          "updatedAt"
        ]
      },
      "GetIssueCommentsResponseDTO": {
        "type": "object",
        "properties": {
          "comments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IssueCommentDTO"
            }
          }
        },
        "required": [
          "comments"
        ]
      },
      "CreateIssueCommentRequestDTO": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "maxLength": 20000
          }
        },
        "required": [
          "body"
        ]
      },
      "UpdateIssueCommentRequestDTO": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "maxLength": 20000
          }
        },
        "required": [
          "body"
        ]
      },
      "IssueTimelineCommentDTO": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "comment"
            ],
            "example": "comment"
          },
          "id": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "authorUsername": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "id",
          "body",
          "authorUsername",
          "createdAt",
          "updatedAt"
        ]
      },
      "IssueEventType": {
        "type": "string",
        "enum": [
          "opened",
          "closed",
          "reopened",
          "renamed",
          "edited",
          "labeled",
          "unlabeled",
          "assigned",
          "unassigned"
        ]
      },
      "IssueTimelineEventDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IssueEventType"
              }
            ]
          },
          "actorUsername": {
            "type": "string"
          },
          "labelName": {
            "type": "string",
            "nullable": true
          },
          "assigneeUsername": {
            "type": "string",
            "nullable": true
          },
          "oldTitle": {
            "type": "string",
            "nullable": true
          },
          "newTitle": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "actorUsername",
          "labelName",
          "assigneeUsername",
          "oldTitle",
          "newTitle",
          "createdAt"
        ]
      },
      "IssueTimelineEventItemDTO": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "event"
            ],
            "example": "event"
          },
          "event": {
            "$ref": "#/components/schemas/IssueTimelineEventDTO"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "event",
          "createdAt"
        ]
      },
      "GetIssueTimelineResponseDTO": {
        "type": "object",
        "properties": {
          "timeline": {
            "type": "array",
            "description": "Comments and events interleaved oldest-first, exactly as rendered.",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/IssueTimelineCommentDTO"
                },
                {
                  "$ref": "#/components/schemas/IssueTimelineEventItemDTO"
                }
              ]
            }
          }
        },
        "required": [
          "timeline"
        ]
      },
      "SetIssueLabelsRequestDTO": {
        "type": "object",
        "properties": {
          "names": {
            "description": "Full replacement set. Label names in this repository.",
            "example": [
              "bug",
              "help wanted"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "names"
        ]
      },
      "SetIssueAssigneesRequestDTO": {
        "type": "object",
        "properties": {
          "usernames": {
            "description": "Full replacement set. Usernames to assign.",
            "example": [
              "octocat"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "usernames"
        ]
      },
      "GetLabelsResponseDTO": {
        "type": "object",
        "properties": {
          "labels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LabelDTO"
            }
          }
        },
        "required": [
          "labels"
        ]
      },
      "CreateLabelRequestDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "bug"
          },
          "description": {
            "type": "string",
            "example": "Something is not working"
          },
          "color": {
            "type": "string",
            "example": "d73a4a"
          }
        },
        "required": [
          "name",
          "color"
        ]
      },
      "UpdateLabelRequestDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "bug"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "`null` clears the description."
          },
          "color": {
            "type": "string",
            "example": "d73a4a"
          }
        }
      },
      "UserEmailDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Row id, or `primary` for the account address itself"
          },
          "email": {
            "type": "string"
          },
          "verified": {
            "type": "boolean",
            "description": "Only verified addresses are usable"
          },
          "primary": {
            "type": "boolean",
            "description": "The address Better Auth signs the user in with"
          }
        },
        "required": [
          "id",
          "email",
          "verified",
          "primary"
        ]
      },
      "ListEmailsResponseDTO": {
        "type": "object",
        "properties": {
          "emails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserEmailDTO"
            }
          }
        },
        "required": [
          "emails"
        ]
      },
      "AddEmailDTO": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "Address to add to the signed-in account"
          }
        },
        "required": [
          "email"
        ]
      },
      "UploadAvatarResponseDTO": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Absolute URL the stored avatar is served from",
            "example": "http://localhost:3001/api/users/avatars/<userId>/<name>.png"
          }
        },
        "required": [
          "url"
        ]
      },
      "UserProfileResponseDTO": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "image": {
            "type": "string",
            "nullable": true
          },
          "joinedAt": {
            "type": "string",
            "description": "ISO timestamp the account was created"
          },
          "repositoryCount": {
            "type": "number",
            "description": "Public repositories owned by the user"
          },
          "starCount": {
            "type": "number",
            "description": "Stars across the user’s public repositories"
          }
        },
        "required": [
          "username",
          "name",
          "image",
          "joinedAt",
          "repositoryCount",
          "starCount"
        ]
      },
      "ContributionDayDTO": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "Calendar day, YYYY-MM-DD (UTC).",
            "example": "2026-09-18"
          },
          "count": {
            "type": "number",
            "description": "Commits authored that day."
          }
        },
        "required": [
          "date",
          "count"
        ]
      },
      "GetUserContributionsResponseDTO": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "year": {
            "type": "number",
            "description": "Calendar year rendered."
          },
          "totalContributions": {
            "type": "number",
            "description": "Commits authored that year across visible owned repositories."
          },
          "days": {
            "description": "Every day of the year, in order.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContributionDayDTO"
            }
          }
        },
        "required": [
          "username",
          "year",
          "totalContributions",
          "days"
        ]
      }
    }
  }
}
