{
  "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"
        ]
      },
      "get": {
        "description": "Repositories the signed-in user owns or collaborates on, most recently pushed first, with the user's role on each. Pages are cursor-based: pass a response `nextCursor` back as `cursor`.",
        "operationId": "RepositoriesController_getViewerRepositories",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "description": "Keep repositories whose name or description contains this text, ignoring case. `org:<name>` or `user:<name>` keeps one owner's repositories, where the listing spans several owners.",
            "schema": {
              "example": "ghost",
              "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/GetViewerRepositoriesResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List my repositories",
        "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": "q",
            "required": false,
            "in": "query",
            "description": "Keep repositories whose name or description contains this text, ignoring case. `org:<name>` or `user:<name>` keeps one owner's repositories, where the listing spans several owners.",
            "schema": {
              "example": "ghost",
              "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"
        ]
      },
      "patch": {
        "description": "Rename, describe, change visibility or pick the default branch. Owner only. Omitted fields are left as they are.",
        "operationId": "RepositoriesController_updateRepository",
        "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/UpdateRepositoryRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateRepositoryResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "The repository, or the requested default branch, does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Update repository settings",
        "tags": [
          "Repositories"
        ]
      },
      "delete": {
        "description": "Deletes the repository with its issues, pull requests and stars, and everything it stored. Owner only. Forks are kept and detached; closed and merged pull requests this repository opened elsewhere are kept without it.",
        "operationId": "RepositoriesController_deleteRepository",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "The repository heads an open pull request into another repository.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Delete repository",
        "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}/transfer": {
      "post": {
        "description": "Owner only. Moves at once to the requester's own account or an organization they administer; any other recipient accepts first. The old name keeps redirecting.",
        "operationId": "RepositoriesController_transferRepository",
        "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/TransferRepositoryRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferRepositoryResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Transfer 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}/tags": {
      "get": {
        "description": "Every tag, newest first, with the commit each one points at. Pages are cursor-based: pass a response `nextCursor` back as `cursor`.",
        "operationId": "RepositoriesController_getRepositoryTags",
        "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/GetRepositoryTagsResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List repository tags",
        "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}/search": {
      "get": {
        "description": "Full-text and regex search over the files on the default branch, powered by zoekt.",
        "operationId": "RepositoriesController_searchRepositoryCode",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "required": true,
            "in": "query",
            "description": "A zoekt query: plain text, `/regex/`, `file:` and `lang:` filters, `case:yes`.",
            "schema": {
              "example": "readReceivePackHeader lang:typescript",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Most files to return.",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchRepositoryCodeResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Search code",
        "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/search/repositories": {
      "get": {
        "description": "Public repositories whose name or description matches, most recently pushed first. Pages are cursor-based: pass a response `nextCursor` back as `cursor`.",
        "operationId": "SearchController_searchRepositories",
        "parameters": [
          {
            "name": "q",
            "required": false,
            "in": "query",
            "description": "Keep repositories whose name or description contains this text, ignoring case. `org:<name>` or `user:<name>` keeps one owner's repositories, where the listing spans several owners.",
            "schema": {
              "example": "ghost",
              "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/SearchRepositoriesResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Search repositories",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/search/code": {
      "get": {
        "description": "Full-text and regex search over the default branch of public repositories, powered by zoekt.",
        "operationId": "SearchController_searchCode",
        "parameters": [
          {
            "name": "q",
            "required": true,
            "in": "query",
            "description": "A zoekt query: plain text, `/regex/`, `file:` and `lang:` filters, `case:yes`.",
            "schema": {
              "example": "readReceivePackHeader lang:typescript",
              "type": "string"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Most files to return.",
            "schema": {
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchCodeResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "503": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Search code",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/transfers": {
      "get": {
        "description": "Repositories offered to the signed-in user or to an organization they administer.",
        "operationId": "TransfersController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListIncomingTransfersResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List transfers waiting for me",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/transfers/{repositoryId}/accept": {
      "post": {
        "operationId": "TransfersController_accept",
        "parameters": [
          {
            "name": "repositoryId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "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"
                }
              }
            }
          }
        },
        "summary": "Accept a transfer",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/transfers/{repositoryId}": {
      "delete": {
        "description": "The recipient declines it, or whoever requested it withdraws it.",
        "operationId": "TransfersController_cancel",
        "parameters": [
          {
            "name": "repositoryId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Decline or withdraw a transfer",
        "tags": [
          "Repositories"
        ]
      }
    },
    "/api/organizations": {
      "get": {
        "description": "Organizations the signed-in user belongs to, with the user's role in each.",
        "operationId": "OrganizationsController_listMine",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListMyOrganizationsResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List my organizations",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/api/organizations/{slug}/logo": {
      "put": {
        "description": "Takes the raw image bytes, PNG or JPEG, and sets them as the logo. Admins only.",
        "operationId": "OrganizationsController_setLogo",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "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"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "415": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Upload the organization's logo",
        "tags": [
          "Organizations"
        ]
      },
      "delete": {
        "operationId": "OrganizationsController_removeLogo",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Remove the organization's logo. Admins only.",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/api/organizations/{slug}/settings": {
      "get": {
        "operationId": "OrganizationsController_getSettings",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationSettingsDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Organization settings. Admins only.",
        "tags": [
          "Organizations"
        ]
      },
      "patch": {
        "description": "Base permission, repository policies and the public profile. Admins only.",
        "operationId": "OrganizationsController_updateSettings",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationSettingsDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationSettingsDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Change organization settings",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/api/organizations/{slug}/public-members": {
      "put": {
        "description": "Lists the requester among the organization's public members, and the organization on their profile.",
        "operationId": "OrganizationsController_publicize",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Make my membership public",
        "tags": [
          "Organizations"
        ]
      },
      "delete": {
        "operationId": "OrganizationsController_conceal",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Make my membership private",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/api/organizations/{slug}/pins": {
      "put": {
        "description": "Replaces the pinned repositories, up to six, in the order given. Admins only.",
        "operationId": "OrganizationsController_setPinned",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPinnedRepositoriesDTO"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Pin repositories",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/api/organizations/{slug}/outside-collaborators": {
      "get": {
        "description": "People with access to the organization's repositories who are not members. Admins only.",
        "operationId": "OrganizationsController_listOutsideCollaborators",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListOutsideCollaboratorsResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List outside collaborators",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/api/organizations/{slug}/outside-collaborators/{username}": {
      "delete": {
        "description": "Removes them, and their pending invitations, from every repository of the organization. Admins only.",
        "operationId": "OrganizationsController_removeOutsideCollaborator",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Remove an outside collaborator",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/api/organizations/{slug}/invitations": {
      "post": {
        "description": "Creates the same invitation an email invite would, addressed to the user's email without revealing it. Admins only.",
        "operationId": "OrganizationsController_inviteByUsername",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteByUsernameRequestDTO"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Invite a user by username",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/api/organizations/{slug}": {
      "get": {
        "description": "Public, except that members and the viewer role are only returned to members.",
        "operationId": "OrganizationsController_getProfile",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationProfileDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Organization profile",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/api/users/{username}/organizations": {
      "get": {
        "description": "Membership is private: the user sees all of theirs, anyone else only the ones they share.",
        "operationId": "UserOrganizationsController_listForUser",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListOrganizationsResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List the organizations a user belongs to",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/api/invitations/organizations": {
      "get": {
        "description": "Pending invitations to organizations, addressed to the signed-in account's email. Accept or reject them through Better Auth's organization endpoints.",
        "operationId": "OrganizationInvitationsController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListReceivedOrganizationInvitationsResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List my organization invitations",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/api/organizations/{slug}/teams": {
      "get": {
        "description": "Members only.",
        "operationId": "OrganizationTeamsController_list",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListOrganizationTeamsResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List teams",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/api/organizations/{slug}/teams/{team}": {
      "get": {
        "description": "Its members, its maintainers and the repositories it reaches. Members only.",
        "operationId": "OrganizationTeamsController_get",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "team",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationTeamDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Read a team",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/api/organizations/{slug}/teams/{team}/members/{username}": {
      "put": {
        "description": "Takes a member of the organization. Admins and the team maintainers only.",
        "operationId": "OrganizationTeamsController_addMember",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "team",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Add a member to a team",
        "tags": [
          "Organizations"
        ]
      },
      "delete": {
        "description": "Admins and the team maintainers only.",
        "operationId": "OrganizationTeamsController_removeMember",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "team",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Remove a member from a team",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/api/organizations/{slug}/teams/{team}/maintainers/{username}": {
      "put": {
        "description": "A maintainer manages the team's members. Admins only.",
        "operationId": "OrganizationTeamsController_appoint",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "team",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Make a team member a maintainer",
        "tags": [
          "Organizations"
        ]
      },
      "delete": {
        "operationId": "OrganizationTeamsController_dismiss",
        "parameters": [
          {
            "name": "slug",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "team",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Stop a member maintaining a team. Admins only.",
        "tags": [
          "Organizations"
        ]
      }
    },
    "/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}/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}/pulls/{number}/ready": {
      "post": {
        "operationId": "PullRequestsController_markReadyForReview",
        "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": "Mark a draft pull request ready for review",
        "tags": [
          "Pull requests"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}/draft": {
      "post": {
        "operationId": "PullRequestsController_convertToDraft",
        "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": "Turn a pull request back into a draft",
        "tags": [
          "Pull requests"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}/reviews": {
      "post": {
        "operationId": "ReviewsController_submitReview",
        "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/CreateReviewRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PullRequestReviewDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Comment on, approve or request changes to a pull request",
        "tags": [
          "Pull request reviews"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}/reviews/pending": {
      "get": {
        "operationId": "ReviewsController_getPendingReview",
        "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/GetPendingReviewResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Your pending review",
        "tags": [
          "Pull request reviews"
        ]
      },
      "delete": {
        "operationId": "ReviewsController_discardPendingReview",
        "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": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Discard your pending review and its comments",
        "tags": [
          "Pull request reviews"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}/reviews/pending/comments": {
      "post": {
        "operationId": "ReviewsController_addPendingComment",
        "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/ReviewCommentRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPendingReviewResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Add a line comment to your pending review",
        "tags": [
          "Pull request reviews"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}/reviews/{reviewId}": {
      "patch": {
        "operationId": "ReviewsController_updateReview",
        "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": "reviewId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReviewRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PullRequestReviewDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Edit a review's summary",
        "tags": [
          "Pull request reviews"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}/reviews/{reviewId}/dismiss": {
      "post": {
        "operationId": "ReviewsController_dismissReview",
        "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": "reviewId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DismissReviewRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PullRequestReviewDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Dismiss an approval or a request for changes",
        "tags": [
          "Pull request reviews"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}/comments/{commentId}/replies": {
      "post": {
        "operationId": "ReviewsController_replyToComment",
        "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/ReviewCommentBodyDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewReplyDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Reply to a line comment",
        "tags": [
          "Pull request reviews"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}/comments/{commentId}": {
      "patch": {
        "operationId": "ReviewsController_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/ReviewCommentBodyDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewReplyDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Edit a line comment or reply",
        "tags": [
          "Pull request reviews"
        ]
      },
      "delete": {
        "operationId": "ReviewsController_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 a line comment and its replies, or one reply",
        "tags": [
          "Pull request reviews"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/pulls/{number}/comments/{commentId}/apply": {
      "post": {
        "operationId": "ReviewsController_applySuggestion",
        "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": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplySuggestionResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Commit a comment's suggested change to the head branch",
        "tags": [
          "Pull request reviews"
        ]
      }
    },
    "/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/repositories/{username}/{repo}/releases": {
      "get": {
        "description": "Newest first. Drafts are listed only for people who can write to the repository. Pages are cursor-based: pass a response `nextCursor` back as `cursor`.",
        "operationId": "ReleasesController_listReleases",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "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": 10,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetReleasesResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List releases",
        "tags": [
          "Releases"
        ]
      },
      "post": {
        "description": "Needs write access. A tag that does not exist yet is created at `target`, or at the default branch.",
        "operationId": "ReleasesController_createRelease",
        "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/CreateReleaseRequestDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleaseDTO"
                }
              }
            }
          },
          "400": {
            "description": "The tag name is not one git accepts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "The repository, or the target to tag, does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "The tag already has a release.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Create a release",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/releases/latest": {
      "get": {
        "description": "The most recently published release that is neither a draft nor a prerelease.",
        "operationId": "ReleasesController_getLatestRelease",
        "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/ReleaseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Read the latest release",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/releases/tags/{tag}": {
      "get": {
        "description": "A tag containing `/` is sent percent-encoded.",
        "operationId": "ReleasesController_getReleaseByTag",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleaseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Read a release by tag",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/releases/{id}": {
      "patch": {
        "description": "Needs write access. Omitted fields are left as they are.",
        "operationId": "ReleasesController_updateRelease",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReleaseRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleaseDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Edit a release",
        "tags": [
          "Releases"
        ]
      },
      "delete": {
        "description": "Needs write access. The tag is kept.",
        "operationId": "ReleasesController_deleteRelease",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Delete a release",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/releases/{id}/assets": {
      "post": {
        "description": "Needs write access. Takes the raw file bytes as `application/octet-stream` with a `Content-Length`; the file's own type goes in `type`. The file counts against the storage quota of the repository's owner, when the instance sets one.",
        "operationId": "ReleaseAssetsController_uploadReleaseAsset",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "required": true,
            "in": "query",
            "description": "File name the asset is saved and downloaded under.",
            "schema": {
              "example": "ghost-linux-x64.tar.gz",
              "type": "string"
            }
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "description": "Media type the file is served with. The request body itself is always `application/octet-stream`.",
            "schema": {
              "example": "application/gzip",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReleaseAssetDTO"
                }
              }
            }
          },
          "400": {
            "description": "The file name is not a plain file name.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "The release already has an asset with this name.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "413": {
            "description": "The file is over the per-file limit, or would take the owner over their storage quota.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "415": {
            "description": "The body was not sent as `application/octet-stream`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Upload a release asset",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/releases/tags/{tag}/assets/{name}": {
      "get": {
        "description": "Always served as an attachment. A tag or name containing `/` is sent percent-encoded.",
        "operationId": "ReleaseAssetsController_downloadReleaseAsset",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "description": ""
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Download a release asset",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/releases/assets/{assetId}": {
      "delete": {
        "description": "Needs write access.",
        "operationId": "ReleaseAssetsController_deleteReleaseAsset",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assetId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Delete a release asset",
        "tags": [
          "Releases"
        ]
      }
    },
    "/api/storage/{owner}": {
      "get": {
        "description": "Bytes the signed-in user's own account, or an organization they belong to, keeps in release assets, against this instance's quota.",
        "operationId": "StorageController_getStorageUsage",
        "parameters": [
          {
            "name": "owner",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageUsageDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Storage usage of an account",
        "tags": [
          "Storage"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/collaborators": {
      "get": {
        "description": "Collaborators and pending invitations. Admins only.",
        "operationId": "CollaboratorsController_list",
        "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/ListCollaboratorsResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List collaborators",
        "tags": [
          "Collaborators"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/collaborators/{collaborator}": {
      "put": {
        "description": "Invites the user, who gets access once they accept. For someone already invited or collaborating, changes the role. Admins only.",
        "operationId": "CollaboratorsController_invite",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "collaborator",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteCollaboratorRequestDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollaboratorDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Invite a collaborator or change their role",
        "tags": [
          "Collaborators"
        ]
      },
      "delete": {
        "description": "Removes a collaborator or withdraws an invitation. Admins only, except that collaborators may remove themselves.",
        "operationId": "CollaboratorsController_remove",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "collaborator",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Remove a collaborator",
        "tags": [
          "Collaborators"
        ]
      }
    },
    "/api/invitations": {
      "get": {
        "description": "Repositories the signed-in user has been invited to collaborate on.",
        "operationId": "InvitationsController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListInvitationsResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List my pending invitations",
        "tags": [
          "Collaborators"
        ]
      }
    },
    "/api/invitations/{id}/accept": {
      "post": {
        "operationId": "InvitationsController_accept",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Accept an invitation",
        "tags": [
          "Collaborators"
        ]
      }
    },
    "/api/invitations/{id}": {
      "delete": {
        "operationId": "InvitationsController_decline",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Decline an invitation",
        "tags": [
          "Collaborators"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/teams": {
      "get": {
        "description": "Every team in the repository's organization, with its role here or null. Admins only.",
        "operationId": "TeamsController_list",
        "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/ListRepositoryTeamsResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List teams and their access",
        "tags": [
          "Collaborators"
        ]
      }
    },
    "/api/repositories/{username}/{repo}/teams/{teamId}": {
      "put": {
        "description": "Every member of the team gets the role on this repository. Admins only.",
        "operationId": "TeamsController_setRole",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "teamId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTeamRoleRequestDTO"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Give a team a role",
        "tags": [
          "Collaborators"
        ]
      },
      "delete": {
        "operationId": "TeamsController_remove",
        "parameters": [
          {
            "name": "username",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "teamId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Remove a team's access. Admins only.",
        "tags": [
          "Collaborators"
        ]
      }
    },
    "/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/gpg-keys": {
      "get": {
        "operationId": "GpgKeysController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListGpgKeysResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List the signing keys on the signed-in account",
        "tags": [
          "GPG keys"
        ]
      },
      "post": {
        "description": "Commits signed with it read as verified once the key carries an address this account has verified.",
        "operationId": "GpgKeysController_add",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddGpgKeyDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GpgKeyDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Add a public key to the signed-in account",
        "tags": [
          "GPG keys"
        ]
      }
    },
    "/api/gpg-keys/{id}": {
      "delete": {
        "description": "Commits it signed stop reading as verified; nothing about the commits themselves changes.",
        "operationId": "GpgKeysController_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 a key",
        "tags": [
          "GPG keys"
        ]
      }
    },
    "/api/ssh-keys": {
      "get": {
        "operationId": "SshKeysController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSshKeysResponseDTO"
                }
              }
            }
          }
        },
        "summary": "List the SSH keys on the signed-in account",
        "tags": [
          "SSH keys"
        ]
      },
      "post": {
        "description": "Anyone holding the matching private key can then fetch and push as this account over SSH.",
        "operationId": "SshKeysController_add",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddSshKeyDTO"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SshKeyDTO"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "summary": "Add an SSH key to the signed-in account",
        "tags": [
          "SSH keys"
        ]
      }
    },
    "/api/ssh-keys/{id}": {
      "delete": {
        "description": "The next connection holding it is refused.",
        "operationId": "SshKeysController_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 a key",
        "tags": [
          "SSH keys"
        ]
      }
    },
    "/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"
          },
          "organization": {
            "type": "string",
            "description": "Slug of the organization to create the repository in; the requester's own account when omitted. Needs admin in the organization."
          },
          "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"
        ]
      },
      "ViewerRole": {
        "type": "string",
        "enum": [
          "read",
          "triage",
          "write",
          "maintain",
          "admin",
          "owner"
        ]
      },
      "ViewerRepositoryDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "owner": {
            "type": "string",
            "example": "octocat"
          },
          "name": {
            "type": "string",
            "example": "ghost"
          },
          "slug": {
            "type": "string",
            "example": "ghost"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "lastPushedAt": {
            "type": "string",
            "format": "date-time"
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryVisibility"
              }
            ]
          },
          "viewerRole": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ViewerRole"
              }
            ]
          }
        },
        "required": [
          "id",
          "owner",
          "name",
          "slug",
          "description",
          "lastPushedAt",
          "visibility",
          "viewerRole"
        ]
      },
      "GetViewerRepositoriesResponseDTO": {
        "type": "object",
        "properties": {
          "repositories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ViewerRepositoryDTO"
            }
          },
          "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"
        ]
      },
      "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"
          },
          "owner": {
            "type": "string",
            "description": "The owner it lives under now; differs from the requested one after a rename or transfer."
          },
          "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"
          },
          "viewerRole": {
            "nullable": true,
            "description": "The viewer's role here: `owner`, a collaborator role, or null for anyone else.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ViewerRole"
              }
            ]
          },
          "parent": {
            "nullable": true,
            "description": "The repository this one was forked from",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryParentEntity"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "owner",
          "visibility",
          "lastPushedAt",
          "createdAt",
          "updatedAt",
          "starCount",
          "viewerHasStarred",
          "forkCount",
          "viewerRole"
        ]
      },
      "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"
        ]
      },
      "UpdateRepositoryRequestDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Renaming also changes the slug, so the old URL stops resolving."
          },
          "description": {
            "type": "string"
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryVisibility"
              }
            ]
          },
          "defaultBranch": {
            "type": "string",
            "description": "A branch name without `refs/heads/`. The branch must already exist."
          }
        }
      },
      "ForkRepositoryRequestDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryVisibility"
              }
            ]
          },
          "organization": {
            "type": "string",
            "description": "Slug of the organization to fork into; the requester's own account when omitted. Needs admin in the organization."
          }
        },
        "required": [
          "name",
          "visibility"
        ]
      },
      "ForkRepositoryResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "slug",
          "username"
        ]
      },
      "TransferRepositoryRequestDTO": {
        "type": "object",
        "properties": {
          "owner": {
            "type": "string",
            "description": "The new owner: the requester's own username, or the slug of an organization the requester administers."
          }
        },
        "required": [
          "owner"
        ]
      },
      "TransferRepositoryResponseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "pending": {
            "type": "boolean",
            "description": "True when the recipient has to accept it first; the repository has not moved yet."
          }
        },
        "required": [
          "id",
          "slug",
          "username",
          "pending"
        ]
      },
      "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."
          },
          "subject": {
            "type": "string",
            "description": "Commit subject - the first line of the message."
          },
          "committedAt": {
            "type": "string",
            "description": "Committer timestamp, ISO 8601."
          }
        },
        "required": [
          "sha",
          "subject",
          "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"
        ]
      },
      "CommitVerificationDTO": {
        "type": "object",
        "properties": {
          "verified": {
            "type": "boolean",
            "description": "True only when the signature checks out *and* the signing key belongs to an account that has verified the commit's author address."
          },
          "reason": {
            "type": "string",
            "description": "Why it reads the way it does, for a tooltip."
          },
          "keyId": {
            "type": "string",
            "description": "Long key id the signature names, lowercase hex."
          }
        },
        "required": [
          "verified",
          "reason",
          "keyId"
        ]
      },
      "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."
          },
          "verification": {
            "nullable": true,
            "description": "Signature status, or `null` when the commit carries none.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CommitVerificationDTO"
              }
            ]
          }
        },
        "required": [
          "sha",
          "subject",
          "body",
          "authorName",
          "authorEmail",
          "committedAt",
          "verification"
        ]
      },
      "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."
          },
          "verification": {
            "nullable": true,
            "description": "Signature status, or `null` when the commit carries none.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/CommitVerificationDTO"
              }
            ]
          },
          "files": {
            "description": "Paths this commit changed, against its first parent.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommitFileDTO"
            }
          }
        },
        "required": [
          "sha",
          "subject",
          "body",
          "authorName",
          "authorEmail",
          "committedAt",
          "verification",
          "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"
        ]
      },
      "TagDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Tag name, without the `refs/tags/` prefix.",
            "example": "v1.0.0"
          },
          "sha": {
            "type": "string",
            "description": "The commit the tag points at, through any annotation."
          },
          "message": {
            "type": "string",
            "nullable": true,
            "description": "The annotation's subject; `null` for a lightweight tag."
          },
          "createdAt": {
            "type": "string",
            "description": "When the annotation was made, or for a lightweight tag when its commit was."
          }
        },
        "required": [
          "name",
          "sha",
          "message",
          "createdAt"
        ]
      },
      "GetRepositoryTagsResponseDTO": {
        "type": "object",
        "properties": {
          "tags": {
            "description": "Newest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagDTO"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "tags",
          "nextCursor"
        ]
      },
      "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"
        ]
      },
      "CodeSearchRangeDTO": {
        "type": "object",
        "properties": {
          "start": {
            "type": "number",
            "example": 16
          },
          "end": {
            "type": "number",
            "example": 37
          }
        },
        "required": [
          "start",
          "end"
        ]
      },
      "CodeSearchLineDTO": {
        "type": "object",
        "properties": {
          "lineNumber": {
            "type": "number",
            "example": 42
          },
          "line": {
            "type": "string",
            "example": "export async function readReceivePackHeader(body) {"
          },
          "ranges": {
            "description": "Matched spans of `line`, as [start, end) offsets that slice a JavaScript string directly.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeSearchRangeDTO"
            }
          }
        },
        "required": [
          "lineNumber",
          "line",
          "ranges"
        ]
      },
      "CodeSearchFileDTO": {
        "type": "object",
        "properties": {
          "commit": {
            "type": "string",
            "description": "The commit the index was built from; line numbers refer to it.",
            "example": "9311a72c0e7f4b8a1d2e3f4a5b6c7d8e9f0a1b2c"
          },
          "path": {
            "type": "string",
            "example": "apps/api/src/lib/git/protocol/receive-pack-request.ts"
          },
          "language": {
            "type": "string",
            "example": "TypeScript"
          },
          "lines": {
            "description": "Matching lines. Empty when only the path matched.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeSearchLineDTO"
            }
          }
        },
        "required": [
          "commit",
          "path",
          "language",
          "lines"
        ]
      },
      "SearchRepositoryCodeResponseDTO": {
        "type": "object",
        "properties": {
          "indexing": {
            "type": "boolean",
            "description": "The default branch has commits the index does not cover yet. They are being indexed and show up in results within seconds.",
            "example": false
          },
          "files": {
            "description": "Files on the default branch that match, best first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeSearchFileDTO"
            }
          }
        },
        "required": [
          "indexing",
          "files"
        ]
      },
      "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"
        ]
      },
      "RepositorySearchResultDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "owner": {
            "type": "string",
            "example": "octocat"
          },
          "name": {
            "type": "string",
            "example": "ghost"
          },
          "slug": {
            "type": "string",
            "example": "ghost"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "lastPushedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "owner",
          "name",
          "slug",
          "description",
          "lastPushedAt"
        ]
      },
      "SearchRepositoriesResponseDTO": {
        "type": "object",
        "properties": {
          "repositories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RepositorySearchResultDTO"
            }
          },
          "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"
        ]
      },
      "SearchCodeRepositoryDTO": {
        "type": "object",
        "properties": {
          "owner": {
            "type": "string",
            "example": "octocat"
          },
          "slug": {
            "type": "string",
            "example": "ghost"
          },
          "name": {
            "type": "string",
            "example": "ghost"
          }
        },
        "required": [
          "owner",
          "slug",
          "name"
        ]
      },
      "SearchCodeFileDTO": {
        "type": "object",
        "properties": {
          "commit": {
            "type": "string",
            "description": "The commit the index was built from; line numbers refer to it.",
            "example": "9311a72c0e7f4b8a1d2e3f4a5b6c7d8e9f0a1b2c"
          },
          "path": {
            "type": "string",
            "example": "apps/api/src/lib/git/protocol/receive-pack-request.ts"
          },
          "language": {
            "type": "string",
            "example": "TypeScript"
          },
          "lines": {
            "description": "Matching lines. Empty when only the path matched.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CodeSearchLineDTO"
            }
          },
          "repository": {
            "$ref": "#/components/schemas/SearchCodeRepositoryDTO"
          }
        },
        "required": [
          "commit",
          "path",
          "language",
          "lines",
          "repository"
        ]
      },
      "SearchCodeResponseDTO": {
        "type": "object",
        "properties": {
          "files": {
            "description": "Files in public repositories that match, best first. Only repositories opened since code search was switched on are indexed.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchCodeFileDTO"
            }
          }
        },
        "required": [
          "files"
        ]
      },
      "IncomingTransferRepositoryDTO": {
        "type": "object",
        "properties": {
          "owner": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "owner",
          "slug",
          "name"
        ]
      },
      "IncomingTransferDTO": {
        "type": "object",
        "properties": {
          "repositoryId": {
            "type": "string"
          },
          "repository": {
            "$ref": "#/components/schemas/IncomingTransferRepositoryDTO"
          },
          "to": {
            "type": "string",
            "description": "The account or organization it would move to."
          },
          "requestedByUsername": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "repositoryId",
          "repository",
          "to",
          "requestedByUsername",
          "createdAt"
        ]
      },
      "ListIncomingTransfersResponseDTO": {
        "type": "object",
        "properties": {
          "transfers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncomingTransferDTO"
            }
          }
        },
        "required": [
          "transfers"
        ]
      },
      "OrganizationRole": {
        "type": "string",
        "enum": [
          "member",
          "admin",
          "owner"
        ],
        "description": "Highest built-in role held; null when only custom roles are held."
      },
      "MyOrganizationDTO": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "logo": {
            "type": "string",
            "nullable": true
          },
          "viewerRole": {
            "nullable": true,
            "description": "Highest built-in role held; null when only custom roles are held.",
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationRole"
              }
            ]
          },
          "canCreateRepositories": {
            "type": "boolean",
            "description": "Whether the organization lets the viewer create repositories in it, of at least one visibility."
          }
        },
        "required": [
          "slug",
          "name",
          "logo",
          "viewerRole",
          "canCreateRepositories"
        ]
      },
      "ListMyOrganizationsResponseDTO": {
        "type": "object",
        "properties": {
          "organizations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MyOrganizationDTO"
            }
          }
        },
        "required": [
          "organizations"
        ]
      },
      "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"
        ]
      },
      "RepositoryRole": {
        "type": "string",
        "enum": [
          "read",
          "triage",
          "write",
          "maintain",
          "admin"
        ],
        "description": "Every member's role on every repository; null grants members nothing beyond their teams and collaborations."
      },
      "OrganizationSettingsDTO": {
        "type": "object",
        "properties": {
          "basePermission": {
            "nullable": true,
            "description": "Every member's role on every repository; null grants members nothing beyond their teams and collaborations.",
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryRole"
              }
            ]
          },
          "membersCanCreatePublicRepositories": {
            "type": "boolean"
          },
          "membersCanCreatePrivateRepositories": {
            "type": "boolean"
          },
          "allowPrivateForks": {
            "type": "boolean",
            "description": "Whether its private repositories may be forked."
          },
          "defaultBranch": {
            "type": "string",
            "nullable": true,
            "description": "Recorded as the default branch of each new repository."
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "website": {
            "type": "string",
            "nullable": true
          },
          "location": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "basePermission",
          "membersCanCreatePublicRepositories",
          "membersCanCreatePrivateRepositories",
          "allowPrivateForks",
          "defaultBranch",
          "description",
          "website",
          "location",
          "email"
        ]
      },
      "UpdateOrganizationSettingsDTO": {
        "type": "object",
        "properties": {
          "basePermission": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryRole"
              }
            ]
          },
          "membersCanCreatePublicRepositories": {
            "type": "boolean"
          },
          "membersCanCreatePrivateRepositories": {
            "type": "boolean"
          },
          "allowPrivateForks": {
            "type": "boolean"
          },
          "defaultBranch": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "website": {
            "type": "string",
            "nullable": true
          },
          "location": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "SetPinnedRepositoriesDTO": {
        "type": "object",
        "properties": {
          "repositories": {
            "description": "Slugs of the organization's repositories, in display order.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "repositories"
        ]
      },
      "OutsideCollaboratorRepositoryDTO": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryRole"
              }
            ]
          },
          "pending": {
            "type": "boolean",
            "description": "Invited and not yet accepted."
          }
        },
        "required": [
          "slug",
          "role",
          "pending"
        ]
      },
      "OutsideCollaboratorDTO": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "image": {
            "type": "string",
            "nullable": true
          },
          "repositories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutsideCollaboratorRepositoryDTO"
            }
          }
        },
        "required": [
          "username",
          "name",
          "image",
          "repositories"
        ]
      },
      "ListOutsideCollaboratorsResponseDTO": {
        "type": "object",
        "properties": {
          "collaborators": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutsideCollaboratorDTO"
            }
          }
        },
        "required": [
          "collaborators"
        ]
      },
      "InviteByUsernameRequestDTO": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationRole"
              }
            ]
          }
        },
        "required": [
          "username",
          "role"
        ]
      },
      "OrganizationMemberDTO": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "image": {
            "type": "string",
            "nullable": true
          },
          "public": {
            "type": "boolean",
            "description": "Whether the member shows their membership outside the organization."
          }
        },
        "required": [
          "username",
          "name",
          "image",
          "public"
        ]
      },
      "PinnedRepositoryDTO": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryVisibility"
              }
            ]
          }
        },
        "required": [
          "slug",
          "name",
          "description",
          "visibility"
        ]
      },
      "OrganizationProfileDTO": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "logo": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "website": {
            "type": "string",
            "nullable": true
          },
          "location": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "repositoryCount": {
            "type": "number",
            "description": "Public repositories only."
          },
          "members": {
            "description": "Every member for a member; only public members for anyone else.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganizationMemberDTO"
            }
          },
          "pinned": {
            "description": "In pinned order, limited to repositories the viewer can read.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PinnedRepositoryDTO"
            }
          },
          "viewerRole": {
            "nullable": true,
            "description": "The viewer's role in the organization; null for anyone outside it.",
            "allOf": [
              {
                "$ref": "#/components/schemas/OrganizationRole"
              }
            ]
          }
        },
        "required": [
          "slug",
          "name",
          "logo",
          "createdAt",
          "description",
          "website",
          "location",
          "email",
          "repositoryCount",
          "members",
          "pinned",
          "viewerRole"
        ]
      },
      "OrganizationSummaryDTO": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "logo": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "slug",
          "name",
          "logo"
        ]
      },
      "ListOrganizationsResponseDTO": {
        "type": "object",
        "properties": {
          "organizations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganizationSummaryDTO"
            }
          }
        },
        "required": [
          "organizations"
        ]
      },
      "ReceivedOrganizationInvitationDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "organization": {
            "$ref": "#/components/schemas/OrganizationSummaryDTO"
          },
          "role": {
            "type": "string",
            "nullable": true
          },
          "invitedByUsername": {
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization",
          "role",
          "invitedByUsername",
          "expiresAt"
        ]
      },
      "ListReceivedOrganizationInvitationsResponseDTO": {
        "type": "object",
        "properties": {
          "invitations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReceivedOrganizationInvitationDTO"
            }
          }
        },
        "required": [
          "invitations"
        ]
      },
      "OrganizationTeamSummaryDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "description": "The team in URLs and `@org/team` mentions."
          },
          "memberCount": {
            "type": "number"
          },
          "repositoryCount": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "memberCount",
          "repositoryCount"
        ]
      },
      "ListOrganizationTeamsResponseDTO": {
        "type": "object",
        "properties": {
          "teams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganizationTeamSummaryDTO"
            }
          }
        },
        "required": [
          "teams"
        ]
      },
      "TeamMemberDTO": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "image": {
            "type": "string",
            "nullable": true
          },
          "maintainer": {
            "type": "boolean"
          }
        },
        "required": [
          "username",
          "name",
          "image",
          "maintainer"
        ]
      },
      "TeamRepositoryDTO": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "visibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryVisibility"
              }
            ]
          },
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryRole"
              }
            ]
          }
        },
        "required": [
          "slug",
          "name",
          "visibility",
          "role"
        ]
      },
      "OrganizationTeamDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamMemberDTO"
            }
          },
          "repositories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamRepositoryDTO"
            }
          },
          "viewerCanManage": {
            "type": "boolean",
            "description": "Whether the viewer may change the team's members: an admin or one of its maintainers."
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "members",
          "repositories",
          "viewerCanManage"
        ]
      },
      "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"
          },
          "draft": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "title",
          "base",
          "head"
        ]
      },
      "PullRequestState": {
        "type": "string",
        "enum": [
          "open",
          "closed",
          "merged"
        ]
      },
      "PullRequestSideDTO": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "example": "bob",
            "nullable": true,
            "description": "Null when the repository was deleted."
          },
          "slug": {
            "type": "string",
            "example": "ghost",
            "nullable": true
          },
          "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"
              }
            ]
          },
          "draft": {
            "type": "boolean",
            "description": "A draft cannot be merged until it is marked ready for review."
          },
          "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"
          },
          "authorImage": {
            "type": "string",
            "nullable": true,
            "description": "Avatar URL."
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "number",
          "title",
          "body",
          "state",
          "draft",
          "base",
          "head",
          "headSha",
          "mergeCommitSha",
          "authorUsername",
          "authorImage",
          "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"
        ]
      },
      "SquashMessageDTO": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Add a feature (#12)"
          },
          "message": {
            "type": "string",
            "description": "The head's commit messages, oldest first."
          }
        },
        "required": [
          "title",
          "message"
        ]
      },
      "ReviewerDTO": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "image": {
            "type": "string",
            "nullable": true,
            "description": "Avatar URL."
          },
          "state": {
            "type": "string",
            "enum": [
              "approved",
              "changes_requested"
            ],
            "description": "The reviewer's latest verdict, unless it was dismissed. Comment-only reviews do not change it."
          }
        },
        "required": [
          "username",
          "image",
          "state"
        ]
      },
      "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"
              }
            ]
          },
          "draft": {
            "type": "boolean",
            "description": "A draft cannot be merged until it is marked ready for review."
          },
          "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"
          },
          "authorImage": {
            "type": "string",
            "nullable": true,
            "description": "Avatar URL."
          },
          "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."
          },
          "conflicts": {
            "description": "Paths that conflict when the head is merged into the base, right now. Empty when it merges cleanly.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "squash": {
            "nullable": true,
            "description": "What a squash merge commits unless the merger rewrites it. Null when there is nothing to merge.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SquashMessageDTO"
              }
            ]
          },
          "reviewers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReviewerDTO"
            }
          }
        },
        "required": [
          "id",
          "number",
          "title",
          "body",
          "state",
          "draft",
          "base",
          "head",
          "headSha",
          "mergeCommitSha",
          "authorUsername",
          "authorImage",
          "createdAt",
          "updatedAt",
          "mergeBase",
          "commitCount",
          "changedFiles",
          "additions",
          "deletions",
          "mergeable",
          "conflicts",
          "squash",
          "reviewers"
        ]
      },
      "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"
        ]
      },
      "MergeMethod": {
        "type": "string",
        "enum": [
          "merge",
          "squash",
          "rebase"
        ],
        "description": "`merge` adds a merge commit, `squash` lands the whole request as one commit, `rebase` replays each of its commits onto the base."
      },
      "MergePullRequestRequestDTO": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Subject of the merge or squash commit. A rebase keeps every commit message and ignores it."
          },
          "message": {
            "type": "string",
            "description": "Body of the squash commit. Defaults to the head's commit messages; an empty string leaves the body out. Ignored by the other methods."
          },
          "method": {
            "default": "merge",
            "description": "`merge` adds a merge commit, `squash` lands the whole request as one commit, `rebase` replays each of its commits onto the base.",
            "allOf": [
              {
                "$ref": "#/components/schemas/MergeMethod"
              }
            ]
          }
        }
      },
      "MergePullRequestResponseDTO": {
        "type": "object",
        "properties": {
          "mergeCommitSha": {
            "type": "string",
            "description": "The new base tip: the merge commit, the squashed commit, or the last rebased one."
          },
          "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."
          }
        }
      },
      "PullRequestReviewState": {
        "type": "string",
        "enum": [
          "commented",
          "approved",
          "changes_requested"
        ],
        "description": "Submits your pending review, if you have one, together with any comments given here."
      },
      "DiffSide": {
        "type": "string",
        "enum": [
          "deletions",
          "additions"
        ],
        "description": "`deletions` is the base side of the diff, `additions` the head side."
      },
      "ReviewCommentRequestDTO": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string",
            "example": "src/index.ts"
          },
          "side": {
            "description": "`deletions` is the base side of the diff, `additions` the head side.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiffSide"
              }
            ]
          },
          "line": {
            "type": "number",
            "description": "Line number on that side of the diff; the last line of a range."
          },
          "startSide": {
            "description": "Side of the first line of a range. Defaults to `side`.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiffSide"
              }
            ]
          },
          "startLine": {
            "type": "number",
            "description": "First line of a range, for a comment on several lines."
          },
          "body": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "side",
          "line",
          "body"
        ]
      },
      "CreateReviewRequestDTO": {
        "type": "object",
        "properties": {
          "state": {
            "description": "Submits your pending review, if you have one, together with any comments given here.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PullRequestReviewState"
              }
            ]
          },
          "body": {
            "type": "string"
          },
          "comments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReviewCommentRequestDTO"
            }
          }
        },
        "required": [
          "state"
        ]
      },
      "ReviewReplyDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "authorUsername": {
            "type": "string"
          },
          "authorImage": {
            "type": "string",
            "nullable": true,
            "description": "Avatar URL."
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "body",
          "authorUsername",
          "authorImage",
          "createdAt",
          "updatedAt"
        ]
      },
      "ReviewThreadDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "authorUsername": {
            "type": "string"
          },
          "authorImage": {
            "type": "string",
            "nullable": true,
            "description": "Avatar URL."
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "side": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DiffSide"
              }
            ]
          },
          "line": {
            "type": "number"
          },
          "startSide": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/DiffSide"
              }
            ]
          },
          "startLine": {
            "type": "number",
            "nullable": true,
            "description": "First line of a range; null for a single line."
          },
          "commitSha": {
            "type": "string",
            "description": "Head commit the comment was made on. Once the head moves on, the comment is outdated."
          },
          "diffHunk": {
            "type": "string",
            "nullable": true,
            "description": "The rows of the diff the comment points at, as a hunk with its own `@@` header, kept as they were when it was written."
          },
          "replies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReviewReplyDTO"
            }
          }
        },
        "required": [
          "id",
          "body",
          "authorUsername",
          "authorImage",
          "createdAt",
          "updatedAt",
          "path",
          "side",
          "line",
          "startSide",
          "startLine",
          "commitSha",
          "diffHunk",
          "replies"
        ]
      },
      "PullRequestReviewDTO": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "review"
            ],
            "example": "review"
          },
          "id": {
            "type": "string"
          },
          "state": {
            "nullable": true,
            "description": "Null while the review is pending.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PullRequestReviewState"
              }
            ]
          },
          "body": {
            "type": "string",
            "nullable": true
          },
          "authorUsername": {
            "type": "string"
          },
          "authorImage": {
            "type": "string",
            "nullable": true,
            "description": "Avatar URL."
          },
          "commitSha": {
            "type": "string",
            "description": "Head commit when the review was submitted, or started if it is pending."
          },
          "dismissedByUsername": {
            "type": "string",
            "nullable": true,
            "description": "Null once that account is deleted, even though the review stays dismissed."
          },
          "dismissalMessage": {
            "type": "string",
            "nullable": true,
            "description": "Set once the review is dismissed; a dismissed verdict no longer counts."
          },
          "comments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReviewThreadDTO"
            }
          },
          "createdAt": {
            "type": "string",
            "description": "When the review was submitted, or started if it is pending."
          }
        },
        "required": [
          "kind",
          "id",
          "state",
          "body",
          "authorUsername",
          "authorImage",
          "commitSha",
          "dismissedByUsername",
          "dismissalMessage",
          "comments",
          "createdAt"
        ]
      },
      "GetPendingReviewResponseDTO": {
        "type": "object",
        "properties": {
          "review": {
            "nullable": true,
            "description": "Your unsubmitted review, visible to nobody else.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/PullRequestReviewDTO"
              }
            ]
          }
        },
        "required": [
          "review"
        ]
      },
      "UpdateReviewRequestDTO": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "nullable": true,
            "description": "`null` clears the summary."
          }
        },
        "required": [
          "body"
        ]
      },
      "DismissReviewRequestDTO": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Addressed in the latest push"
          }
        },
        "required": [
          "message"
        ]
      },
      "ReviewCommentBodyDTO": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          }
        },
        "required": [
          "body"
        ]
      },
      "ApplySuggestionResponseDTO": {
        "type": "object",
        "properties": {
          "commitSha": {
            "type": "string",
            "description": "The commit pushed to the head branch."
          }
        },
        "required": [
          "commitSha"
        ]
      },
      "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"
              }
            ]
          },
          "isPullRequest": {
            "type": "boolean",
            "description": "True when this number belongs to a pull request; its page lives under `/pulls`."
          },
          "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",
          "isPullRequest",
          "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"
              }
            ]
          },
          "isPullRequest": {
            "type": "boolean",
            "description": "True when this number belongs to a pull request; its page lives under `/pulls`."
          },
          "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",
          "isPullRequest",
          "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"
          },
          "authorImage": {
            "type": "string",
            "nullable": true,
            "description": "Avatar URL."
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "id",
          "body",
          "authorUsername",
          "authorImage",
          "createdAt",
          "updatedAt"
        ]
      },
      "IssueEventType": {
        "type": "string",
        "enum": [
          "opened",
          "closed",
          "reopened",
          "renamed",
          "edited",
          "labeled",
          "unlabeled",
          "assigned",
          "unassigned",
          "merged",
          "ready_for_review",
          "converted_to_draft"
        ]
      },
      "IssueTimelineEventDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IssueEventType"
              }
            ]
          },
          "actorUsername": {
            "type": "string"
          },
          "actorImage": {
            "type": "string",
            "nullable": true,
            "description": "Avatar URL."
          },
          "labelName": {
            "type": "string",
            "nullable": true
          },
          "assigneeUsername": {
            "type": "string",
            "nullable": true
          },
          "oldTitle": {
            "type": "string",
            "nullable": true
          },
          "newTitle": {
            "type": "string",
            "nullable": true
          },
          "commitSha": {
            "type": "string",
            "nullable": true,
            "description": "The commit that closed the issue, or the merge commit of a `merged` event."
          },
          "sourceRepository": {
            "type": "string",
            "nullable": true,
            "example": "octocat/ghost",
            "description": "Repository of the pull request that closed the issue."
          },
          "sourceNumber": {
            "type": "number",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "actorUsername",
          "actorImage",
          "labelName",
          "assigneeUsername",
          "oldTitle",
          "newTitle",
          "commitSha",
          "sourceRepository",
          "sourceNumber",
          "createdAt"
        ]
      },
      "IssueTimelineEventItemDTO": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "event"
            ],
            "example": "event"
          },
          "id": {
            "type": "string"
          },
          "event": {
            "$ref": "#/components/schemas/IssueTimelineEventDTO"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "id",
          "event",
          "createdAt"
        ]
      },
      "IssueReferenceSourceType": {
        "type": "string",
        "enum": [
          "issue",
          "comment",
          "commit"
        ]
      },
      "IssueReferenceRepositoryDTO": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "example": "octocat"
          },
          "slug": {
            "type": "string",
            "example": "ghost"
          }
        },
        "required": [
          "username",
          "slug"
        ]
      },
      "IssueReferenceSourceDTO": {
        "type": "object",
        "properties": {
          "number": {
            "type": "number"
          },
          "title": {
            "type": "string"
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IssueState"
              }
            ]
          },
          "isPullRequest": {
            "type": "boolean"
          }
        },
        "required": [
          "number",
          "title",
          "state",
          "isPullRequest"
        ]
      },
      "IssueTimelineReferenceDTO": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "reference"
            ],
            "example": "reference"
          },
          "id": {
            "type": "string"
          },
          "sourceType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IssueReferenceSourceType"
              }
            ]
          },
          "actorUsername": {
            "type": "string"
          },
          "repository": {
            "$ref": "#/components/schemas/IssueReferenceRepositoryDTO"
          },
          "source": {
            "nullable": true,
            "description": "The issue or pull request the mention was written in; null for a commit.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/IssueReferenceSourceDTO"
              }
            ]
          },
          "commitSha": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "id",
          "sourceType",
          "actorUsername",
          "repository",
          "source",
          "commitSha",
          "createdAt"
        ]
      },
      "GetIssueTimelineResponseDTO": {
        "type": "object",
        "properties": {
          "timeline": {
            "type": "array",
            "description": "Comments, events and mentions from elsewhere interleaved oldest-first, exactly as rendered.",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/IssueTimelineCommentDTO"
                },
                {
                  "$ref": "#/components/schemas/IssueTimelineEventItemDTO"
                },
                {
                  "$ref": "#/components/schemas/IssueTimelineReferenceDTO"
                },
                {
                  "$ref": "#/components/schemas/PullRequestReviewDTO"
                }
              ]
            }
          }
        },
        "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"
          }
        }
      },
      "ReleaseAssetDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "example": "ghost-linux-x64.tar.gz"
          },
          "contentType": {
            "type": "string",
            "example": "application/gzip"
          },
          "size": {
            "type": "number",
            "description": "Bytes."
          },
          "downloadCount": {
            "type": "number"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "contentType",
          "size",
          "downloadCount",
          "createdAt"
        ]
      },
      "ReleaseDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tagName": {
            "type": "string",
            "description": "Tag name, without the `refs/tags/` prefix.",
            "example": "v1.0.0"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "`null` reads as the tag name."
          },
          "body": {
            "type": "string",
            "nullable": true,
            "description": "Markdown."
          },
          "isDraft": {
            "type": "boolean",
            "description": "Only people who can write to the repository see drafts."
          },
          "isPrerelease": {
            "type": "boolean"
          },
          "isLatest": {
            "type": "boolean",
            "description": "The most recently published release that is neither a draft nor a prerelease."
          },
          "authorUsername": {
            "type": "string",
            "nullable": true,
            "description": "Null once the author account is deleted."
          },
          "commitSha": {
            "type": "string",
            "nullable": true,
            "description": "The commit the tag points at. `null` when the tag has since been deleted."
          },
          "assets": {
            "description": "By name.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReleaseAssetDTO"
            }
          },
          "publishedAt": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "viewerCanEdit": {
            "type": "boolean",
            "description": "True when the requesting user can write to the repository."
          }
        },
        "required": [
          "id",
          "tagName",
          "name",
          "body",
          "isDraft",
          "isPrerelease",
          "isLatest",
          "authorUsername",
          "commitSha",
          "assets",
          "publishedAt",
          "createdAt",
          "updatedAt",
          "viewerCanEdit"
        ]
      },
      "GetReleasesResponseDTO": {
        "type": "object",
        "properties": {
          "releases": {
            "description": "Newest first.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReleaseDTO"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "releases",
          "nextCursor"
        ]
      },
      "CreateReleaseRequestDTO": {
        "type": "object",
        "properties": {
          "tagName": {
            "type": "string",
            "description": "An existing tag, or a new one to create at `target`. Without the `refs/tags/` prefix.",
            "example": "v1.0.0"
          },
          "target": {
            "type": "string",
            "description": "Branch or commit sha a new tag points at. Defaults to the default branch; ignored when the tag already exists.",
            "example": "main"
          },
          "name": {
            "type": "string",
            "example": "First stable release"
          },
          "body": {
            "type": "string",
            "description": "Markdown."
          },
          "isDraft": {
            "type": "boolean",
            "default": false
          },
          "isPrerelease": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "tagName"
        ]
      },
      "UpdateReleaseRequestDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true,
            "description": "`null` falls back to the tag name."
          },
          "body": {
            "type": "string",
            "nullable": true,
            "description": "Markdown. `null` clears the notes."
          },
          "isDraft": {
            "type": "boolean",
            "description": "Publishing a draft stamps `publishedAt` the first time."
          },
          "isPrerelease": {
            "type": "boolean"
          }
        }
      },
      "StorageUsageDTO": {
        "type": "object",
        "properties": {
          "usedBytes": {
            "type": "number",
            "description": "Bytes stored, including uploads in progress."
          },
          "quotaBytes": {
            "type": "number",
            "nullable": true,
            "description": "`null` when this instance sets no quota."
          },
          "maxAssetBytes": {
            "type": "number",
            "description": "Largest single release asset."
          }
        },
        "required": [
          "usedBytes",
          "quotaBytes",
          "maxAssetBytes"
        ]
      },
      "CollaboratorStatus": {
        "type": "string",
        "enum": [
          "accepted",
          "pending",
          "expired"
        ],
        "description": "Only `accepted` grants access. An `expired` invitation is sent again by inviting the user again."
      },
      "CollaboratorDTO": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "image": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryRole"
              }
            ]
          },
          "status": {
            "description": "Only `accepted` grants access. An `expired` invitation is sent again by inviting the user again.",
            "allOf": [
              {
                "$ref": "#/components/schemas/CollaboratorStatus"
              }
            ]
          },
          "invitedAt": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "nullable": true,
            "description": "When the invitation lapses, or lapsed. Null once accepted."
          }
        },
        "required": [
          "username",
          "name",
          "image",
          "role",
          "status",
          "invitedAt",
          "expiresAt"
        ]
      },
      "ListCollaboratorsResponseDTO": {
        "type": "object",
        "properties": {
          "collaborators": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CollaboratorDTO"
            }
          }
        },
        "required": [
          "collaborators"
        ]
      },
      "InviteCollaboratorRequestDTO": {
        "type": "object",
        "properties": {
          "role": {
            "description": "A new invitation is sent with this role; for someone already invited or collaborating, the role is changed in place.",
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryRole"
              }
            ]
          }
        },
        "required": [
          "role"
        ]
      },
      "InvitationRepositoryDTO": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "username",
          "slug",
          "name"
        ]
      },
      "InvitationDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "repository": {
            "$ref": "#/components/schemas/InvitationRepositoryDTO"
          },
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryRole"
              }
            ]
          },
          "invitedByUsername": {
            "type": "string",
            "nullable": true
          },
          "invitedAt": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "repository",
          "role",
          "invitedByUsername",
          "invitedAt",
          "expiresAt"
        ]
      },
      "ListInvitationsResponseDTO": {
        "type": "object",
        "properties": {
          "invitations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvitationDTO"
            }
          }
        },
        "required": [
          "invitations"
        ]
      },
      "RepositoryTeamDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "memberCount": {
            "type": "number"
          },
          "role": {
            "nullable": true,
            "description": "Null when the team has no access to this repository.",
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryRole"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "memberCount",
          "role"
        ]
      },
      "ListRepositoryTeamsResponseDTO": {
        "type": "object",
        "properties": {
          "teams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RepositoryTeamDTO"
            }
          }
        },
        "required": [
          "teams"
        ]
      },
      "SetTeamRoleRequestDTO": {
        "type": "object",
        "properties": {
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RepositoryRole"
              }
            ]
          }
        },
        "required": [
          "role"
        ]
      },
      "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"
        ]
      },
      "GpgKeyDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "keyId": {
            "type": "string",
            "description": "Long key id, lowercase hex. Signatures name this."
          },
          "fingerprint": {
            "type": "string",
            "description": "Full fingerprint, lowercase hex."
          },
          "emails": {
            "description": "Addresses the key's user ids claim.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "description": "When the key was added, ISO 8601."
          }
        },
        "required": [
          "id",
          "keyId",
          "fingerprint",
          "emails",
          "createdAt"
        ]
      },
      "ListGpgKeysResponseDTO": {
        "type": "object",
        "properties": {
          "keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GpgKeyDTO"
            }
          }
        },
        "required": [
          "keys"
        ]
      },
      "AddGpgKeyDTO": {
        "type": "object",
        "properties": {
          "publicKey": {
            "type": "string",
            "description": "Armored OpenPGP public key, as `gpg --armor --export` prints it.",
            "example": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n...",
            "maxLength": 65536
          }
        },
        "required": [
          "publicKey"
        ]
      },
      "SshKeyDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "description": "What the key is called on this account."
          },
          "type": {
            "type": "string",
            "description": "Key algorithm, e.g. `ssh-ed25519`."
          },
          "fingerprint": {
            "type": "string",
            "description": "SHA256 fingerprint, base64, as `ssh-keygen -lf` prints it."
          },
          "lastUsedAt": {
            "type": "string",
            "description": "When the key last authenticated a git session, ISO 8601.",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "description": "When the key was added, ISO 8601."
          }
        },
        "required": [
          "id",
          "title",
          "type",
          "fingerprint",
          "lastUsedAt",
          "createdAt"
        ]
      },
      "ListSshKeysResponseDTO": {
        "type": "object",
        "properties": {
          "keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SshKeyDTO"
            }
          }
        },
        "required": [
          "keys"
        ]
      },
      "AddSshKeyDTO": {
        "type": "object",
        "properties": {
          "publicKey": {
            "type": "string",
            "description": "One authorized_keys line, as `~/.ssh/id_ed25519.pub` holds it.",
            "example": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... laptop",
            "maxLength": 16384
          },
          "title": {
            "type": "string",
            "description": "What to call the key. Defaults to the key's own comment, then to its type.",
            "maxLength": 100
          }
        },
        "required": [
          "publicKey"
        ]
      },
      "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"
        ]
      }
    }
  }
}
