openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 135 kB
JSON
{"openapi":"3.0.0","info":{"contact":{"x-twitter":"giteaio"},"description":"This documentation describes the Gitea API.","license":{"name":"MIT","url":"http://opensource.org/licenses/MIT"},"title":"Gitea API.","version":"1.1.1","x-apisguru-categories":["developer_tools"],"x-logo":{"url":"https://twitter.com/giteaio/profile_image?size=original"},"x-origin":[{"format":"swagger","url":"https://try.gitea.io/swagger.v1.json","version":"2.0"}],"x-providerName":"gitea.io"},"security":[{"BasicAuth":[]},{"Token":[]},{"AccessToken":[]},{"AuthorizationHeaderToken":[]},{"SudoParam":[]},{"SudoHeader":[]}],"paths":{"/admin/orgs":{"get":{"operationId":"adminGetAllOrgs","responses":{"200":{"$ref":"#/components/responses/OrganizationList"},"403":{"$ref":"#/components/responses/forbidden"}},"summary":"List all organizations","tags":["admin"]}},"/admin/users":{"get":{"operationId":"adminGetAllUsers","responses":{"200":{"$ref":"#/components/responses/UserList"},"403":{"$ref":"#/components/responses/forbidden"}},"summary":"List all users","tags":["admin"]},"post":{"operationId":"adminCreateUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserOption"}}}},"responses":{"201":{"$ref":"#/components/responses/User"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validationError"}},"summary":"Create a user","tags":["admin"]}},"/admin/users/{username}":{"delete":{"operationId":"adminDeleteUser","parameters":[{"description":"username of user to delete","in":"path","name":"username","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/empty"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validationError"}},"summary":"Delete a user","tags":["admin"]},"patch":{"operationId":"adminEditUser","parameters":[{"description":"username of user to edit","in":"path","name":"username","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditUserOption"}}}},"responses":{"200":{"$ref":"#/components/responses/User"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validationError"}},"summary":"Edit an existing user","tags":["admin"]}},"/admin/users/{username}/keys":{"post":{"operationId":"adminCreatePublicKey","parameters":[{"description":"username of the user","in":"path","name":"username","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/CreateKeyOption"},"responses":{"201":{"$ref":"#/components/responses/PublicKey"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validationError"}},"summary":"Add a public key on behalf of a user","tags":["admin"]}},"/admin/users/{username}/keys/{id}":{"delete":{"operationId":"adminDeleteUserPublicKey","parameters":[{"description":"username of user","in":"path","name":"username","required":true,"schema":{"type":"string"}},{"description":"id of the key to delete","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"$ref":"#/components/responses/empty"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"}},"summary":"Delete a user's public key","tags":["admin"]}},"/admin/users/{username}/orgs":{"post":{"operationId":"adminCreateOrg","parameters":[{"description":"username of the user that will own the created organization","in":"path","name":"username","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/CreateOrgOption"},"responses":{"201":{"$ref":"#/components/responses/Organization"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validationError"}},"summary":"Create an organization","tags":["admin"]}},"/admin/users/{username}/repos":{"post":{"operationId":"adminCreateRepo","parameters":[{"description":"username of the user. This user will own the created repository","in":"path","name":"username","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRepoOption"}}},"required":true},"responses":{"201":{"$ref":"#/components/responses/Repository"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validationError"}},"summary":"Create a repository on behalf a user","tags":["admin"]}},"/markdown":{"post":{"operationId":"renderMarkdown","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkdownOption"}}}},"responses":{"200":{"$ref":"#/components/responses/MarkdownRender"},"422":{"$ref":"#/components/responses/validationError"}},"summary":"Render a markdown document as HTML","tags":["miscellaneous"]}},"/markdown/raw":{"post":{"operationId":"renderMarkdownRaw","requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"Request body to render","required":true},"responses":{"200":{"$ref":"#/components/responses/MarkdownRender"},"422":{"$ref":"#/components/responses/validationError"}},"summary":"Render raw markdown as HTML","tags":["miscellaneous"]}},"/org/{org}/repos":{"post":{"operationId":"createOrgRepo","parameters":[{"description":"name of organization","in":"path","name":"org","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/CreateRepoOption"},"responses":{"201":{"$ref":"#/components/responses/Repository"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validationError"}},"summary":"Create a repository in an organization","tags":["organization"]}},"/orgs":{"post":{"operationId":"orgCreate","requestBody":{"$ref":"#/components/requestBodies/CreateOrgOption"},"responses":{"201":{"$ref":"#/components/responses/Organization"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validationError"}},"summary":"Create an organization","tags":["organization"]}},"/orgs/{org}":{"delete":{"operationId":"orgDelete","parameters":[{"description":"organization that is to be deleted","in":"path","name":"org","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/empty"}},"summary":"Delete an organization","tags":["organization"]},"get":{"operationId":"orgGet","parameters":[{"description":"name of the organization to get","in":"path","name":"org","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/Organization"}},"summary":"Get an organization","tags":["organization"]},"patch":{"operationId":"orgEdit","parameters":[{"description":"name of the organization to edit","in":"path","name":"org","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditOrgOption"}}}},"responses":{"200":{"$ref":"#/components/responses/Organization"}},"summary":"Edit an organization","tags":["organization"]}},"/orgs/{org}/hooks":{"get":{"operationId":"orgListHooks","parameters":[{"description":"name of the organization","in":"path","name":"org","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/HookList"}},"summary":"List an organization's webhooks","tags":["organization"]}},"/orgs/{org}/hooks/":{"post":{"operationId":"orgCreateHook","parameters":[{"description":"name of the organization","in":"path","name":"org","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateHookOption"}}},"required":true},"responses":{"201":{"$ref":"#/components/responses/Hook"}},"summary":"Create a hook","tags":["organization"]}},"/orgs/{org}/hooks/{id}":{"delete":{"operationId":"orgDeleteHook","parameters":[{"description":"name of the organization","in":"path","name":"org","required":true,"schema":{"type":"string"}},{"description":"id of the hook to delete","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"$ref":"#/components/responses/empty"}},"summary":"Delete a hook","tags":["organization"]},"get":{"operationId":"orgGetHook","parameters":[{"description":"name of the organization","in":"path","name":"org","required":true,"schema":{"type":"string"}},{"description":"id of the hook to get","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"$ref":"#/components/responses/Hook"}},"summary":"Get a hook","tags":["organization"]},"patch":{"operationId":"orgEditHook","parameters":[{"description":"name of the organization","in":"path","name":"org","required":true,"schema":{"type":"string"}},{"description":"id of the hook to update","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditHookOption"}}}},"responses":{"200":{"$ref":"#/components/responses/Hook"}},"summary":"Update a hook","tags":["organization"]}},"/orgs/{org}/members":{"get":{"operationId":"orgListMembers","parameters":[{"description":"name of the organization","in":"path","name":"org","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/UserList"}},"summary":"List an organization's members","tags":["organization"]}},"/orgs/{org}/members/{username}":{"delete":{"operationId":"orgDeleteMember","parameters":[{"description":"name of the organization","in":"path","name":"org","required":true,"schema":{"type":"string"}},{"description":"username of the user","in":"path","name":"username","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"member removed"}},"summary":"Remove a member from an organization","tags":["organization"]},"get":{"operationId":"orgIsMember","parameters":[{"description":"name of the organization","in":"path","name":"org","required":true,"schema":{"type":"string"}},{"description":"username of the user","in":"path","name":"username","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"user is a member"},"404":{"description":"user is not a member"}},"summary":"Check if a user is a member of an organization","tags":["organization"]}},"/orgs/{org}/public_members":{"get":{"operationId":"orgListPublicMembers","parameters":[{"description":"name of the organization","in":"path","name":"org","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/UserList"}},"summary":"List an organization's public members","tags":["organization"]}},"/orgs/{org}/public_members/{username}":{"delete":{"operationId":"orgConcealMember","parameters":[{"description":"name of the organization","in":"path","name":"org","required":true,"schema":{"type":"string"}},{"description":"username of the user","in":"path","name":"username","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/empty"}},"summary":"Conceal a user's membership","tags":["organization"]},"get":{"operationId":"orgIsPublicMember","parameters":[{"description":"name of the organization","in":"path","name":"org","required":true,"schema":{"type":"string"}},{"description":"username of the user","in":"path","name":"username","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"user is a public member"},"404":{"description":"user is not a public member"}},"summary":"Check if a user is a public member of an organization","tags":["organization"]},"put":{"operationId":"orgPublicizeMember","parameters":[{"description":"name of the organization","in":"path","name":"org","required":true,"schema":{"type":"string"}},{"description":"username of the user","in":"path","name":"username","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"membership publicized"}},"summary":"Publicize a user's membership","tags":["organization"]}},"/orgs/{org}/repos":{"get":{"operationId":"orgListRepos","parameters":[{"description":"name of the organization","in":"path","name":"org","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/RepositoryList"}},"summary":"List an organization's repos","tags":["organization"]}},"/orgs/{org}/teams":{"get":{"operationId":"orgListTeams","parameters":[{"description":"name of the organization","in":"path","name":"org","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/TeamList"}},"summary":"List an organization's teams","tags":["organization"]},"post":{"operationId":"orgCreateTeam","parameters":[{"description":"name of the organization","in":"path","name":"org","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamOption"}}}},"responses":{"201":{"$ref":"#/components/responses/Team"}},"summary":"Create a team","tags":["organization"]}},"/repos/migrate":{"post":{"operationId":"repoMigrate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrateRepoForm"}}}},"responses":{"201":{"$ref":"#/components/responses/Repository"}},"summary":"Migrate a remote git repository","tags":["repository"]}},"/repos/search":{"get":{"operationId":"repoSearch","parameters":[{"description":"keyword","in":"query","name":"q","schema":{"type":"string"}},{"description":"search only for repos that the user with the given id owns or contributes to","in":"query","name":"uid","schema":{"type":"integer","format":"int64"}},{"description":"page number of results to return (1-based)","in":"query","name":"page","schema":{"type":"integer"}},{"description":"page size of results, maximum page size is 50","in":"query","name":"limit","schema":{"type":"integer"}},{"description":"type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"","in":"query","name":"mode","schema":{"type":"string"}},{"description":"if `uid` is given, search only for repos that the user owns","in":"query","name":"exclusive","schema":{"type":"boolean"}},{"description":"sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\"","in":"query","name":"sort","schema":{"type":"string"}},{"description":"sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified.","in":"query","name":"order","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/SearchResults"},"422":{"$ref":"#/components/responses/validationError"}},"summary":"Search for repositories","tags":["repository"]}},"/repos/{owner}/{repo}":{"delete":{"operationId":"repoDelete","parameters":[{"description":"owner of the repo to delete","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo to delete","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/empty"},"403":{"$ref":"#/components/responses/forbidden"}},"summary":"Delete a repository","tags":["repository"]},"get":{"operationId":"repoGet","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/Repository"}},"summary":"Get a repository","tags":["repository"]}},"/repos/{owner}/{repo}/archive/{archive}":{"get":{"operationId":"repoGetArchive","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"archive to download, consisting of a git reference and archive","in":"path","name":"archive","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"success"}},"summary":"Get an archive of a repository","tags":["repository"]}},"/repos/{owner}/{repo}/branches":{"get":{"operationId":"repoListBranches","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/BranchList"}},"summary":"List a repository's branches","tags":["repository"]}},"/repos/{owner}/{repo}/branches/{branch}":{"get":{"operationId":"repoGetBranch","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"branch to get","in":"path","name":"branch","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/Branch"}},"summary":"Retrieve a specific branch from a repository","tags":["repository"]}},"/repos/{owner}/{repo}/collaborators":{"get":{"operationId":"repoListCollaborators","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/UserList"}},"summary":"List a repository's collaborators","tags":["repository"]}},"/repos/{owner}/{repo}/collaborators/{collaborator}":{"delete":{"operationId":"repoDeleteCollaborator","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"username of the collaborator to delete","in":"path","name":"collaborator","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/empty"}},"summary":"Delete a collaborator from a repository","tags":["repository"]},"get":{"operationId":"repoCheckCollaborator","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"username of the collaborator","in":"path","name":"collaborator","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/empty"},"404":{"$ref":"#/components/responses/empty"}},"summary":"Check if a user is a collaborator of a repository","tags":["repository"]},"put":{"operationId":"repoAddCollaborator","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"username of the collaborator to add","in":"path","name":"collaborator","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCollaboratorOption"}},"text/plain":{"schema":{"$ref":"#/components/schemas/AddCollaboratorOption"}}}},"responses":{"204":{"$ref":"#/components/responses/empty"}},"summary":"Add a collaborator to a repository","tags":["repository"]}},"/repos/{owner}/{repo}/commits/{ref}/statuses":{"get":{"operationId":"repoGetCombinedStatusByRef","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"name of branch/tag/commit","in":"path","name":"ref","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/Status"}},"summary":"Get a commit's combined status, by branch/tag/commit reference","tags":["repository"]}},"/repos/{owner}/{repo}/editorconfig/{filepath}":{"get":{"operationId":"repoGetEditorConfig","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"filepath of file to get","in":"path","name":"filepath","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"success"}},"summary":"Get the EditorConfig definitions of a file in a repository","tags":["repository"]}},"/repos/{owner}/{repo}/forks":{"get":{"operationId":"listForks","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/RepositoryList"}},"summary":"List a repository's forks","tags":["repository"]},"post":{"operationId":"createFork","parameters":[{"description":"owner of the repo to fork","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo to fork","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateForkOption"}},"text/plain":{"schema":{"$ref":"#/components/schemas/CreateForkOption"}}}},"responses":{"202":{"$ref":"#/components/responses/Repository"}},"summary":"Fork a repository","tags":["repository"]}},"/repos/{owner}/{repo}/git/commits/{sha}":{"get":{"operationId":"repoGetSingleCommit","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"the commit hash","in":"path","name":"sha","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/Commit"},"404":{"$ref":"#/components/responses/notFound"}},"summary":"Get a single commit from a repository","tags":["repository"]}},"/repos/{owner}/{repo}/git/refs":{"get":{"operationId":"repoListAllGitRefs","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/ReferenceList"},"404":{"$ref":"#/components/responses/notFound"}},"summary":"Get specified ref or filtered repository's refs","tags":["repository"]}},"/repos/{owner}/{repo}/git/refs/{ref}":{"get":{"operationId":"repoListGitRefs","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"part or full name of the ref","in":"path","name":"ref","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/ReferenceList"},"404":{"$ref":"#/components/responses/notFound"}},"summary":"Get specified ref or filtered repository's refs","tags":["repository"]}},"/repos/{owner}/{repo}/git/trees/{sha}":{"get":{"operationId":"GetTree","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"sha of the commit","in":"path","name":"sha","required":true,"schema":{"type":"string"}},{"description":"show all directories and files","in":"query","name":"recursive","schema":{"type":"boolean"}},{"description":"page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page","in":"query","name":"page","schema":{"type":"integer"}},{"description":"number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE","in":"query","name":"per_page","schema":{"type":"integer"}}],"responses":{"200":{"$ref":"#/components/responses/GitTreeResponse"}},"summary":"Gets the tree of a repository.","tags":["repository"]}},"/repos/{owner}/{repo}/hooks":{"get":{"operationId":"repoListHooks","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/HookList"}},"summary":"List the hooks in a repository","tags":["repository"]},"post":{"operationId":"repoCreateHook","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateHookOption"}}}},"responses":{"201":{"$ref":"#/components/responses/Hook"}},"summary":"Create a hook","tags":["repository"]}},"/repos/{owner}/{repo}/hooks/{id}":{"delete":{"operationId":"repoDeleteHook","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"id of the hook to delete","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"$ref":"#/components/responses/empty"},"404":{"$ref":"#/components/responses/notFound"}},"summary":"Delete a hook in a repository","tags":["repository"]},"get":{"operationId":"repoGetHook","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"id of the hook to get","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"$ref":"#/components/responses/Hook"}},"summary":"Get a hook","tags":["repository"]},"patch":{"operationId":"repoEditHook","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"index of the hook","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditHookOption"}},"text/plain":{"schema":{"$ref":"#/components/schemas/EditHookOption"}}}},"responses":{"200":{"$ref":"#/components/responses/Hook"}},"summary":"Edit a hook in a repository","tags":["repository"]}},"/repos/{owner}/{repo}/hooks/{id}/tests":{"post":{"operationId":"repoTestHook","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"id of the hook to test","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"$ref":"#/components/responses/empty"}},"summary":"Test a push webhook","tags":["repository"]}},"/repos/{owner}/{repo}/issues":{"get":{"operationId":"issueListIssues","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"whether issue is open or closed","in":"query","name":"state","schema":{"type":"string"}},{"description":"comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded","in":"query","name":"labels","schema":{"type":"string"}},{"description":"page number of requested issues","in":"query","name":"page","schema":{"type":"integer"}},{"description":"search string","in":"query","name":"q","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/IssueList"}},"summary":"List a repository's issues","tags":["issue"]},"post":{"operationId":"issueCreateIssue","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueOption"}}}},"responses":{"201":{"$ref":"#/components/responses/Issue"}},"summary":"Create an issue. If using deadline only the date will be taken into account, and time of day ignored.","tags":["issue"]}},"/repos/{owner}/{repo}/issues/comments":{"get":{"operationId":"issueGetRepoComments","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"if provided, only comments updated since the provided time are returned.","in":"query","name":"since","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/CommentList"}},"summary":"List all comments in a repository","tags":["issue"]}},"/repos/{owner}/{repo}/issues/comments/{id}":{"delete":{"operationId":"issueDeleteComment","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"id of comment to delete","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"$ref":"#/components/responses/empty"}},"summary":"Delete a comment","tags":["issue"]},"patch":{"operationId":"issueEditComment","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"id of the comment to edit","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"$ref":"#/components/requestBodies/EditIssueCommentOption"},"responses":{"200":{"$ref":"#/components/responses/Comment"}},"summary":"Edit a comment","tags":["issue"]}},"/repos/{owner}/{repo}/issues/{id}/times":{"get":{"operationId":"issueTrackedTimes","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"index of the issue","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"$ref":"#/components/responses/TrackedTimeList"}},"summary":"List an issue's tracked times","tags":["issue"]},"post":{"operationId":"issueAddTime","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"index of the issue to add tracked time to","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTimeOption"}}}},"responses":{"200":{"$ref":"#/components/responses/TrackedTime"},"400":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"}},"summary":"Add a tracked time to a issue","tags":["issue"]}},"/repos/{owner}/{repo}/issues/{index}":{"get":{"operationId":"issueGetIssue","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"index of the issue to get","in":"path","name":"index","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"$ref":"#/components/responses/Issue"}},"summary":"Get an issue","tags":["issue"]},"patch":{"operationId":"issueEditIssue","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"index of the issue to edit","in":"path","name":"index","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditIssueOption"}}}},"responses":{"201":{"$ref":"#/components/responses/Issue"}},"summary":"Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.","tags":["issue"]}},"/repos/{owner}/{repo}/issues/{index}/comments":{"get":{"operationId":"issueGetComments","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"index of the issue","in":"path","name":"index","required":true,"schema":{"type":"integer","format":"int64"}},{"description":"if provided, only comments updated since the specified time are returned.","in":"query","name":"since","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/CommentList"}},"summary":"List all comments on an issue","tags":["issue"]},"post":{"operationId":"issueCreateComment","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"index of the issue","in":"path","name":"index","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIssueCommentOption"}}}},"responses":{"201":{"$ref":"#/components/responses/Comment"}},"summary":"Add a comment to an issue","tags":["issue"]}},"/repos/{owner}/{repo}/issues/{index}/comments/{id}":{"delete":{"deprecated":true,"operationId":"issueDeleteCommentDeprecated","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"this parameter is ignored","in":"path","name":"index","required":true,"schema":{"type":"integer"}},{"description":"id of comment to delete","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"$ref":"#/components/responses/empty"}},"summary":"Delete a comment","tags":["issue"]},"patch":{"deprecated":true,"operationId":"issueEditCommentDeprecated","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"this parameter is ignored","in":"path","name":"index","required":true,"schema":{"type":"integer"}},{"description":"id of the comment to edit","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"$ref":"#/components/requestBodies/EditIssueCommentOption"},"responses":{"200":{"$ref":"#/components/responses/Comment"}},"summary":"Edit a comment","tags":["issue"]}},"/repos/{owner}/{repo}/issues/{index}/deadline":{"post":{"operationId":"issueEditIssueDeadline","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"index of the issue to create or update a deadline on","in":"path","name":"index","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditDeadlineOption"}}}},"responses":{"201":{"$ref":"#/components/responses/IssueDeadline"},"403":{"description":"Not repo writer"},"404":{"description":"Issue not found"}},"summary":"Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.","tags":["issue"]}},"/repos/{owner}/{repo}/issues/{index}/labels":{"delete":{"operationId":"issueClearLabels","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"index of the issue","in":"path","name":"index","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"$ref":"#/components/responses/empty"}},"summary":"Remove all labels from an issue","tags":["issue"]},"get":{"operationId":"issueGetLabels","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"index of the issue","in":"path","name":"index","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"$ref":"#/components/responses/LabelList"},"404":{"$ref":"#/components/responses/notFound"}},"summary":"Get an issue's labels","tags":["issue"]},"post":{"operationId":"issueAddLabel","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"index of the issue","in":"path","name":"index","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"$ref":"#/components/requestBodies/IssueLabelsOption"},"responses":{"200":{"$ref":"#/components/responses/LabelList"}},"summary":"Add a label to an issue","tags":["issue"]},"put":{"operationId":"issueReplaceLabels","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"index of the issue","in":"path","name":"index","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"$ref":"#/components/requestBodies/IssueLabelsOption"},"responses":{"200":{"$ref":"#/components/responses/LabelList"}},"summary":"Replace an issue's labels","tags":["issue"]}},"/repos/{owner}/{repo}/issues/{index}/labels/{id}":{"delete":{"operationId":"issueRemoveLabel","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"index of the issue","in":"path","name":"index","required":true,"schema":{"type":"integer","format":"int64"}},{"description":"id of the label to remove","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"$ref":"#/components/responses/empty"}},"summary":"Remove a label from an issue","tags":["issue"]}},"/repos/{owner}/{repo}/issues/{index}/stopwatch/start":{"post":{"operationId":"issueStartStopWatch","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"index of the issue to create the stopwatch on","in":"path","name":"index","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"201":{"$ref":"#/components/responses/empty"},"403":{"description":"Not repo writer, user does not have rights to toggle stopwatch"},"404":{"description":"Issue not found"},"409":{"description":"Cannot start a stopwatch again if it already exists"}},"summary":"Start stopwatch on an issue.","tags":["issue"]}},"/repos/{owner}/{repo}/issues/{index}/stopwatch/stop":{"post":{"operationId":"issueStopWatch","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"index of the issue to stop the stopwatch on","in":"path","name":"index","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"201":{"$ref":"#/components/responses/empty"},"403":{"description":"Not repo writer, user does not have rights to toggle stopwatch"},"404":{"description":"Issue not found"},"409":{"description":"Cannot stop a non existent stopwatch"}},"summary":"Stop an issue's existing stopwatch.","tags":["issue"]}},"/repos/{owner}/{repo}/keys":{"get":{"operationId":"repoListKeys","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"the key_id to search for","in":"query","name":"key_id","schema":{"type":"integer"}},{"description":"fingerprint of the key","in":"query","name":"fingerprint","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/DeployKeyList"}},"summary":"List a repository's keys","tags":["repository"]},"post":{"operationId":"repoCreateKey","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/CreateKeyOption"},"responses":{"201":{"$ref":"#/components/responses/DeployKey"}},"summary":"Add a key to a repository","tags":["repository"]}},"/repos/{owner}/{repo}/keys/{id}":{"delete":{"operationId":"repoDeleteKey","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"id of the key to delete","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"$ref":"#/components/responses/empty"}},"summary":"Delete a key from a repository","tags":["repository"]},"get":{"operationId":"repoGetKey","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"id of the key to get","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"$ref":"#/components/responses/DeployKey"}},"summary":"Get a repository's key by id","tags":["repository"]}},"/repos/{owner}/{repo}/labels":{"get":{"operationId":"issueListLabels","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/LabelList"}},"summary":"Get all of a repository's labels","tags":["issue"]},"post":{"operationId":"issueCreateLabel","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLabelOption"}}}},"responses":{"201":{"$ref":"#/components/responses/Label"}},"summary":"Create a label","tags":["issue"]}},"/repos/{owner}/{repo}/labels/{id}":{"delete":{"operationId":"issueDeleteLabel","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"id of the label to delete","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"$ref":"#/components/responses/empty"}},"summary":"Delete a label","tags":["issue"]},"get":{"operationId":"issueGetLabel","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"id of the label to get","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"$ref":"#/components/responses/Label"}},"summary":"Get a single label","tags":["issue"]},"patch":{"operationId":"issueEditLabel","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"id of the label to edit","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditLabelOption"}}}},"responses":{"200":{"$ref":"#/components/responses/Label"}},"summary":"Update a label","tags":["issue"]}},"/repos/{owner}/{repo}/milestones":{"get":{"operationId":"issueGetMilestonesList","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/MilestoneList"}},"summary":"Get all of a repository's opened milestones","tags":["issue"]},"post":{"operationId":"issueCreateMilestone","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMilestoneOption"}}}},"responses":{"201":{"$ref":"#/components/responses/Milestone"}},"summary":"Create a milestone","tags":["issue"]}},"/repos/{owner}/{repo}/milestones/{id}":{"delete":{"operationId":"issueDeleteMilestone","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"id of the milestone to delete","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"204":{"$ref":"#/components/responses/empty"}},"summary":"Delete a milestone","tags":["issue"]},"get":{"operationId":"issueGetMilestone","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"id of the milestone","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"$ref":"#/components/responses/Milestone"}},"summary":"Get a milestone","tags":["issue"]},"patch":{"operationId":"issueEditMilestone","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"id of the milestone","in":"path","name":"id","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditMilestoneOption"}}}},"responses":{"200":{"$ref":"#/components/responses/Milestone"}},"summary":"Update a milestone","tags":["issue"]}},"/repos/{owner}/{repo}/mirror-sync":{"post":{"operationId":"repoMirrorSync","parameters":[{"description":"owner of the repo to sync","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo to sync","in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/empty"}},"summary":"Sync a mirrored repository","tags":["repository"]}},"/repos/{owner}/{repo}/pulls":{"get":{"operationId":"repoListPullRequests","parameters":[{"description":"owner of the repo","in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"description":"name of the repo","in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"Page number","in":"query","name":"page","schema":{"type":"integer"}},{"description":"State of pull request: open or closed (optional)","in":"query","name":"state","schema":{"type":"string","enum":["closed","open","all"]}},{"description":"Type of sort","in":"query","name":"sort","schema":{"type":"string","enum":["oldest","recentupdate","lea