diff options
author | Ethan Koenig <ethantkoenig@gmail.com> | 2017-11-12 23:02:25 -0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-11-13 09:02:25 +0200 |
commit | f26f4a7e01f9c380c261fa5bc21bd7e48f2f2f9f (patch) | |
tree | 39c2fc0abc5a10f80f8fa31b3bd57ec3604bf7fd /public | |
parent | 4287d100b39ff89e297ba8945e54fb5911226974 (diff) | |
download | gitea-f26f4a7e01f9c380c261fa5bc21bd7e48f2f2f9f.tar.gz gitea-f26f4a7e01f9c380c261fa5bc21bd7e48f2f2f9f.zip |
Update swagger documentation (#2899)
* Update swagger documentation
Add docs for missing endpoints
Add documentation for request parameters
Make parameter naming consistent
Fix response documentation
* Restore delete comments
Diffstat (limited to 'public')
-rw-r--r-- | public/swagger.v1.json | 6481 |
1 files changed, 5297 insertions, 1184 deletions
diff --git a/public/swagger.v1.json b/public/swagger.v1.json index c269fcb864..4f4505b4a1 100644 --- a/public/swagger.v1.json +++ b/public/swagger.v1.json @@ -13,9 +13,8 @@ ], "swagger": "2.0", "info": { - "description": "This provide API interface to communicate with this Gitea instance.", + "description": "This documentation describes the Gitea API.", "title": "Gitea API.", - "termsOfService": "there are no TOS at this moment, use at your own risk we take no responsibility", "license": { "name": "MIT", "url": "http://opensource.org/licenses/MIT" @@ -35,63 +34,14 @@ "tags": [ "admin" ], + "summary": "Create a user", "operationId": "adminCreateUser", "parameters": [ { - "x-go-name": "SourceID", - "name": "source_id", + "name": "body", "in": "body", "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "x-go-name": "LoginName", - "name": "login_name", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Username", - "name": "username", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "FullName", - "name": "full_name", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Email", - "name": "email", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Password", - "name": "password", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "SendNotify", - "name": "send_notify", - "in": "body", - "schema": { - "type": "boolean" + "$ref": "#/definitions/CreateUserOption" } } ], @@ -104,9 +54,6 @@ }, "422": { "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -119,7 +66,17 @@ "tags": [ "admin" ], + "summary": "Delete a user", "operationId": "adminDeleteUser", + "parameters": [ + { + "type": "string", + "description": "username of user to delete", + "name": "username", + "in": "path", + "required": true + } + ], "responses": { "204": { "$ref": "#/responses/empty" @@ -129,9 +86,6 @@ }, "422": { "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" } } }, @@ -145,104 +99,21 @@ "tags": [ "admin" ], + "summary": "Edit an existing user", "operationId": "adminEditUser", "parameters": [ { - "x-go-name": "SourceID", - "name": "source_id", - "in": "body", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "x-go-name": "LoginName", - "name": "login_name", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "FullName", - "name": "full_name", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Email", - "name": "email", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Password", - "name": "password", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Website", - "name": "website", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Location", - "name": "location", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Active", - "name": "active", - "in": "body", - "schema": { - "type": "boolean" - } - }, - { - "x-go-name": "Admin", - "name": "admin", - "in": "body", - "schema": { - "type": "boolean" - } - }, - { - "x-go-name": "AllowGitHook", - "name": "allow_git_hook", - "in": "body", - "schema": { - "type": "boolean" - } - }, - { - "x-go-name": "AllowImportLocal", - "name": "allow_import_local", - "in": "body", - "schema": { - "type": "boolean" - } + "type": "string", + "description": "username of user to edit", + "name": "username", + "in": "path", + "required": true }, { - "x-go-name": "MaxRepoCreation", - "name": "max_repo_creation", + "name": "body", "in": "body", "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/definitions/EditUserOption" } } ], @@ -255,9 +126,6 @@ }, "422": { "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -273,29 +141,15 @@ "tags": [ "admin" ], + "summary": "Add a public key on behalf of a user", "operationId": "adminCreatePublicKey", "parameters": [ { - "uniqueItems": true, - "x-go-name": "Title", - "description": "Title of the key to add", - "name": "title", - "in": "body", - "required": true, - "schema": { - "type": "string" - } - }, - { - "uniqueItems": true, - "x-go-name": "Key", - "description": "An armored SSH key to add", - "name": "key", - "in": "body", - "required": true, - "schema": { - "type": "string" - } + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true } ], "responses": { @@ -307,9 +161,6 @@ }, "422": { "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -325,47 +176,15 @@ "tags": [ "admin" ], + "summary": "Create an organization", "operationId": "adminCreateOrg", "parameters": [ { - "x-go-name": "UserName", + "type": "string", + "description": "username of the user that will own the created organization", "name": "username", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "FullName", - "name": "full_name", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Description", - "name": "description", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Website", - "name": "website", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Location", - "name": "location", - "in": "body", - "schema": { - "type": "string" - } + "in": "path", + "required": true } ], "responses": { @@ -377,9 +196,6 @@ }, "422": { "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -395,71 +211,15 @@ "tags": [ "admin" ], + "summary": "Create a repository on behalf a user", "operationId": "adminCreateRepo", "parameters": [ { - "uniqueItems": true, - "x-go-name": "Name", - "description": "Name of the repository to create", - "name": "name", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Description", - "description": "Description of the repository to create", - "name": "description", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Private", - "description": "Is the repository to create private ?", - "name": "private", - "in": "body", - "schema": { - "type": "boolean" - } - }, - { - "x-go-name": "AutoInit", - "description": "Init the repository to create ?", - "name": "auto_init", - "in": "body", - "schema": { - "type": "boolean" - } - }, - { - "x-go-name": "Gitignores", - "description": "Gitignores to use", - "name": "gitignores", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "License", - "description": "License to use", - "name": "license", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Readme", - "description": "Readme of the repository to create", - "name": "readme", - "in": "body", - "schema": { - "type": "string" - } + "type": "string", + "description": "username of the user. This user will own the created repository", + "name": "username", + "in": "path", + "required": true } ], "responses": { @@ -471,9 +231,6 @@ }, "422": { "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -489,38 +246,14 @@ "tags": [ "miscellaneous" ], + "summary": "Render a markdown document as HTML", "operationId": "renderMarkdown", "parameters": [ { - "description": "Text markdown to render", - "name": "Text", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "Mode to render", - "name": "Mode", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "description": "Context to render", - "name": "Context", + "name": "body", "in": "body", "schema": { - "type": "string" - } - }, - { - "description": "Is it a wiki page ?", - "name": "Wiki", - "in": "body", - "schema": { - "type": "boolean" + "$ref": "#/definitions/MarkdownOption" } } ], @@ -545,7 +278,15 @@ "tags": [ "miscellaneous" ], + "summary": "Render raw markdown as HTML", "operationId": "renderMarkdownRaw", + "parameters": [ + { + "type": "string", + "name": "body", + "in": "body" + } + ], "responses": { "200": { "$ref": "#/responses/MarkdownRender" @@ -567,70 +308,21 @@ "tags": [ "organization" ], + "summary": "Create a repository in an organization", "operationId": "createOrgRepo", "parameters": [ { - "uniqueItems": true, - "x-go-name": "Name", - "description": "Name of the repository to create", - "name": "name", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Description", - "description": "Description of the repository to create", - "name": "description", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Private", - "description": "Is the repository to create private ?", - "name": "private", - "in": "body", - "schema": { - "type": "boolean" - } - }, - { - "x-go-name": "AutoInit", - "description": "Init the repository to create ?", - "name": "auto_init", - "in": "body", - "schema": { - "type": "boolean" - } - }, - { - "x-go-name": "Gitignores", - "description": "Gitignores to use", - "name": "gitignores", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "License", - "description": "License to use", - "name": "license", - "in": "body", - "schema": { - "type": "string" - } + "type": "string", + "description": "name of organization", + "name": "org", + "in": "path", + "required": true }, { - "x-go-name": "Readme", - "description": "Readme of the repository to create", - "name": "readme", + "name": "body", "in": "body", "schema": { - "type": "string" + "$ref": "#/definitions/CreateRepoOption" } } ], @@ -643,14 +335,11 @@ }, "422": { "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" } } } }, - "/orgs/{orgname}/hooks": { + "/orgs/{org}": { "get": { "produces": [ "application/json" @@ -658,19 +347,24 @@ "tags": [ "organization" ], - "operationId": "orgListHooks", + "summary": "Get an organization", + "operationId": "orgGet", + "parameters": [ + { + "type": "string", + "description": "name of the organization to get", + "name": "org", + "in": "path", + "required": true + } + ], "responses": { "200": { - "$ref": "#/responses/HookList" - }, - "500": { - "$ref": "#/responses/error" + "$ref": "#/responses/Organization" } } - } - }, - "/orgs/{orgname}/hooks/": { - "post": { + }, + "patch": { "consumes": [ "application/json" ], @@ -680,61 +374,69 @@ "tags": [ "organization" ], - "operationId": "orgCreateHook", + "summary": "Edit an organization", + "operationId": "orgEdit", "parameters": [ { - "x-go-name": "Type", - "name": "type", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Config", - "name": "config", - "in": "body", - "schema": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - { - "x-go-name": "Events", - "name": "events", - "in": "body", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } + "type": "string", + "description": "name of the organization to edit", + "name": "org", + "in": "path", + "required": true }, { - "x-go-name": "Active", - "name": "active", + "name": "body", "in": "body", "schema": { - "type": "boolean" + "$ref": "#/definitions/EditOrgOption" } } ], "responses": { + "200": { + "$ref": "#/responses/Organization" + } + } + } + }, + "/orgs/{org}/hooks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's webhooks", + "operationId": "orgListHooks", + "responses": { + "200": { + "$ref": "#/responses/HookList" + } + } + } + }, + "/orgs/{org}/hooks/": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create a hook", + "operationId": "orgCreateHook", + "responses": { "201": { "$ref": "#/responses/Hook" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" } } } }, - "/orgs/{orgname}/hooks/{id}": { + "/orgs/{org}/hooks/{id}": { "get": { "produces": [ "application/json" @@ -742,16 +444,11 @@ "tags": [ "organization" ], + "summary": "Get a hook", "operationId": "orgGetHook", "responses": { "200": { "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "500": { - "$ref": "#/responses/error" } } }, @@ -762,16 +459,11 @@ "tags": [ "organization" ], + "summary": "Delete a hook", "operationId": "orgDeleteHook", "responses": { "204": { "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "500": { - "$ref": "#/responses/error" } } }, @@ -785,56 +477,16 @@ "tags": [ "organization" ], + "summary": "Update a hook", "operationId": "orgEditHook", - "parameters": [ - { - "x-go-name": "Config", - "name": "config", - "in": "body", - "schema": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - { - "x-go-name": "Events", - "name": "events", - "in": "body", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "x-go-name": "Active", - "name": "active", - "in": "body", - "schema": { - "type": "boolean" - } - } - ], "responses": { "200": { "$ref": "#/responses/Hook" - }, - "404": { - "$ref": "#/responses/notFound" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" } } } }, - "/orgs/{orgname}/members": { + "/orgs/{org}/members": { "get": { "produces": [ "application/json" @@ -842,35 +494,59 @@ "tags": [ "organization" ], + "summary": "List an organization's members", "operationId": "orgListMembers", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], "responses": { "200": { "$ref": "#/responses/UserList" - }, - "500": { - "$ref": "#/responses/error" } } } }, - "/orgs/{orgname}/members/{username}": { + "/orgs/{org}/members/{username}": { "get": { - "produces": [ - "application/json" - ], "tags": [ "organization" ], + "summary": "Check if a user is a member of an organization", "operationId": "orgIsMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], "responses": { "204": { - "$ref": "#/responses/empty" - }, - "302": { - "$ref": "#/responses/redirect" + "description": "user is a member", + "schema": { + "$ref": "#/responses/empty" + } }, "404": { - "$ref": "#/responses/notFound" + "description": "user is not a member", + "schema": { + "$ref": "#/responses/empty" + } } } }, @@ -881,18 +557,35 @@ "tags": [ "organization" ], + "summary": "Remove a member from an organization", "operationId": "orgDeleteMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], "responses": { "204": { - "$ref": "#/responses/empty" - }, - "500": { - "$ref": "#/responses/error" + "description": "member removed", + "schema": { + "$ref": "#/responses/empty" + } } } } }, - "/orgs/{orgname}/public_members": { + "/orgs/{org}/public_members": { "get": { "produces": [ "application/json" @@ -900,32 +593,59 @@ "tags": [ "organization" ], + "summary": "List an organization's public members", "operationId": "orgListPublicMembers", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], "responses": { "200": { "$ref": "#/responses/UserList" - }, - "500": { - "$ref": "#/responses/error" } } } }, - "/orgs/{orgname}/public_members/{username}": { + "/orgs/{org}/public_members/{username}": { "get": { - "produces": [ - "application/json" - ], "tags": [ "organization" ], + "summary": "Check if a user is a public member of an organization", "operationId": "orgIsPublicMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], "responses": { "204": { - "$ref": "#/responses/empty" + "description": "user is a public member", + "schema": { + "$ref": "#/responses/empty" + } }, "404": { - "$ref": "#/responses/notFound" + "description": "user is not a public member", + "schema": { + "$ref": "#/responses/empty" + } } } }, @@ -936,16 +656,30 @@ "tags": [ "organization" ], + "summary": "Publicize a user's membership", "operationId": "orgPublicizeMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], "responses": { "204": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "500": { - "$ref": "#/responses/error" + "description": "membership publicized", + "schema": { + "$ref": "#/responses/empty" + } } } }, @@ -956,21 +690,32 @@ "tags": [ "organization" ], + "summary": "Conceal a user's membership", "operationId": "orgConcealMember", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path", + "required": true + } + ], "responses": { "204": { "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "500": { - "$ref": "#/responses/error" } } } }, - "/orgs/{orgname}/repos": { + "/orgs/{org}/repos": { "get": { "produces": [ "application/json" @@ -978,13 +723,80 @@ "tags": [ "organization" ], + "summary": "List an organization's repos", "operationId": "orgListRepos", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], "responses": { "200": { "$ref": "#/responses/RepositoryList" + } + } + } + }, + "/orgs/{org}/teams": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's teams", + "operationId": "orgListTeams", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TeamList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create a team", + "operationId": "orgCreateTeam", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true }, - "500": { - "$ref": "#/responses/error" + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateTeamOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Team" } } } @@ -1000,240 +812,1429 @@ "tags": [ "repository" ], + "summary": "Migrate a remote git repository", "operationId": "repoMigrate", "parameters": [ { - "x-go-name": "CloneAddr", - "name": "clone_addr", + "name": "body", "in": "body", "schema": { - "type": "string" + "$ref": "#/definitions/MigrateRepoForm" } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Repository" + } + } + } + }, + "/repos/search": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Search for repositories", + "operationId": "repoSearch", + "parameters": [ + { + "type": "string", + "description": "keyword", + "name": "q", + "in": "query" + }, + { + "type": "integer", + "description": "if provided, will return only repos owned by the user with the given id", + "name": "uid", + "in": "query" + }, + { + "type": "integer", + "description": "maximum number of repos to return", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "description": "type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\"", + "name": "mode", + "in": "query" + }, + { + "type": "boolean", + "description": "only search for repositories owned by the authenticated user", + "name": "exclusive", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/SearchResults" }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository", + "operationId": "repoGet", + "parameters": [ { - "x-go-name": "AuthUsername", - "name": "auth_username", + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a repository", + "operationId": "repoDelete", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to delete", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to delete", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, + "/repos/{owner}/{repo}/archive/{filepath}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get an archive of a repository", + "operationId": "repoGetArchive", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "archive to download, consisting of a git reference and archive", + "name": "archive", + "in": "path", + "required": true + } + ], + "responses": { + "200": {} + } + } + }, + "/repos/{owner}/{repo}/branches": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's branches", + "operationId": "repoListBranches", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/BranchList" + } + } + } + }, + "/repos/{owner}/{repo}/branches/{branch}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's branches", + "operationId": "repoGetBranch", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "branch to get", + "name": "branch", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Branch" + } + } + } + }, + "/repos/{owner}/{repo}/collaborators": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's collaborators", + "operationId": "repoListCollaborators", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + } + } + } + }, + "/repos/{owner}/{repo}/collaborators/{collaborator}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Check if a user is a collaborator of a repository", + "operationId": "repoCheckCollaborator", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the collaborator", + "name": "collaborator", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/empty" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a collaborator to a repository", + "operationId": "repoAddCollaborator", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the collaborator to add", + "name": "collaborator", + "in": "path", + "required": true + }, + { + "name": "body", "in": "body", "schema": { - "type": "string" + "$ref": "#/definitions/AddCollaboratorOption" } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a collaborator from a repository", + "operationId": "repoDeleteCollaborator", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the collaborator to delete", + "name": "collaborator", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/comments/{id}": { + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a comment", + "operationId": "issueDeleteComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of comment to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Edit a comment", + "operationId": "issueEditComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { - "x-go-name": "AuthPassword", - "name": "auth_password", + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of the comment to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", "in": "body", "schema": { - "type": "string" + "$ref": "#/definitions/EditIssueCommentOption" } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Comment" + } + } + } + }, + "/repos/{owner}/{repo}/commits/{ref}/statuses": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's combined status, by branch/tag/commit reference", + "operationId": "repoGetCombinedStatusByRef", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { - "x-go-name": "UID", - "name": "uid", + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of branch/tag/commit", + "name": "ref", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Status" + } + } + } + }, + "/repos/{owner}/{repo}/editorconfig/{filepath}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get the EditorConfig definitions of a file in a repository", + "operationId": "repoGetEditorConfig", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "filepath of file to get", + "name": "filepath", + "in": "path", + "required": true + } + ], + "responses": { + "200": {} + } + } + }, + "/repos/{owner}/{repo}/forks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's forks", + "operationId": "listForks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Fork a repository", + "operationId": "createFork", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to fork", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to fork", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", "in": "body", "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/definitions/CreateForkOption" } + } + ], + "responses": { + "202": { + "$ref": "#/responses/Repository" + } + } + } + }, + "/repos/{owner}/{repo}/hooks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List the hooks in a repository", + "operationId": "repoListHooks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a hook", + "operationId": "repoCreateHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { - "x-go-name": "RepoName", - "name": "repo_name", + "name": "body", "in": "body", "schema": { - "type": "string" + "$ref": "#/definitions/CreateHookOption" } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + } + } + } + }, + "/repos/{owner}/{repo}/hooks/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a hook", + "operationId": "repoGetHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { - "x-go-name": "Mirror", - "name": "mirror", + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + } + } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a hook in a repository", + "operationId": "repoEditHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", "in": "body", "schema": { - "type": "boolean" + "$ref": "#/definitions/EditHookOption" } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Hook" + } + } + } + }, + "/repos/{owner}/{repo}/issue/{index}/comments": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List all comments on an issue", + "operationId": "issueGetComments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "index of the issue", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "if provided, only comments updated since the specified time are returned.", + "name": "string", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/CommentList" + } + } + } + }, + "/repos/{owner}/{repo}/issue/{index}/labels": { + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Replace an issue's labels", + "operationId": "issueReplaceLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true }, { - "x-go-name": "Private", - "name": "private", + "name": "body", "in": "body", "schema": { - "type": "boolean" + "$ref": "#/definitions/IssueLabelsOption" } + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a label to an issue", + "operationId": "issueAddLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { - "x-go-name": "Description", - "name": "description", + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", "in": "body", "schema": { - "type": "string" + "$ref": "#/definitions/IssueLabelsOption" } } ], "responses": { - "201": { - "$ref": "#/responses/Repository" + "200": { + "$ref": "#/responses/LabelList" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove all labels from an issue", + "operationId": "issueClearLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, - "422": { - "$ref": "#/responses/validationError" + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, - "500": { - "$ref": "#/responses/error" + { + "type": "integer", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" } } } }, - "/repos/search": { - "get": { + "/repos/{owner}/{repo}/issue/{index}/labels/{id}": { + "delete": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "operationId": "repoSearch", + "summary": "Remove a label from an issue", + "operationId": "issueRemoveLabel", "parameters": [ { "type": "string", - "x-go-name": "Keyword", - "description": "Keyword to search", - "name": "q", - "in": "query" + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { "type": "integer", - "format": "int64", - "x-go-name": "OwnerID", - "description": "Repository owner to search", - "name": "uid", - "in": "query" + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true }, { "type": "integer", - "format": "int64", - "x-go-name": "PageSize", - "description": "Limit of result\n\nmaximum: setting.ExplorePagingNum", - "name": "limit", - "in": "query" + "description": "id of the label to remove", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/issues": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List a repository's issues", + "operationId": "issueListIssues", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { "type": "string", - "x-go-name": "SearchMode", - "description": "Type of repository to search, related to owner", - "name": "mode", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "whether issue is open or closed", + "name": "state", "in": "query" }, { - "type": "boolean", - "x-go-name": "OwnerExclusive", - "description": "Search only owners repositories\nHas effect only if owner is provided and mode is not \"collaborative\"", - "name": "exclusive", + "type": "integer", + "description": "page number of requested issues", + "name": "page", "in": "query" } ], "responses": { "200": { - "$ref": "#/responses/SearchResults" + "$ref": "#/responses/IssueList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create an issue", + "operationId": "issueCreateIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, - "422": { - "$ref": "#/responses/validationError" + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, - "500": { - "$ref": "#/responses/SearchError" + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateIssueOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Issue" } } } }, - "/repos/{owner}/{repo}/forks": { + "/repos/{owner}/{repo}/issues/comments": { "get": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" + ], + "summary": "List all comments in a repository", + "operationId": "issueGetRepoComments", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "if provided, only comments updated since the provided time are returned.", + "name": "string", + "in": "query" + } ], - "operationId": "listForks", "responses": { "200": { - "$ref": "#/responses/RepositoryList" + "$ref": "#/responses/CommentList" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get an issue by id", + "operationId": "issueGetIssue", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, - "500": { - "$ref": "#/responses/error" + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of the issue to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Issue" } } }, - "post": { + "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" ], - "operationId": "createFork", + "summary": "Edit an issue", + "operationId": "issueEditIssue", "parameters": [ { - "x-go-name": "Organization", - "name": "organization", + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of the issue to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", "in": "body", "schema": { - "type": "string" + "$ref": "#/definitions/EditIssueOption" } } ], "responses": { - "202": { - "$ref": "#/responses/Repository" + "201": { + "$ref": "#/responses/Issue" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/comments": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add a comment to an issue", + "operationId": "issueCreateComment", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, - "403": { - "$ref": "#/responses/forbidden" + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, - "422": { - "$ref": "#/responses/validationError" + { + "type": "integer", + "description": "index of the issue", + "name": "id", + "in": "path", + "required": true }, - "500": { - "$ref": "#/responses/error" + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateIssueOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Comment" } } } }, - "/repos/{username}/{reponame}": { + "/repos/{owner}/{repo}/issues/{index}/labels": { "get": { "produces": [ "application/json" ], "tags": [ - "repository" + "issue" + ], + "summary": "Get an issue's labels", + "operationId": "issueGetLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + } ], - "operationId": "repoGet", "responses": { "200": { - "$ref": "#/responses/Repository" + "$ref": "#/responses/LabelList" }, - "500": { - "$ref": "#/responses/error" + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/times": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "List an issue's tracked times", + "operationId": "issueTrackedTimes", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "index of the issue", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" } } }, - "delete": { + "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ - "repository" + "issue" + ], + "summary": "Add a tracked time to a issue", + "operationId": "issueAddTime", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "index of the issue to add tracked time to", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/AddTimeOption" + } + } ], - "operationId": "repoDelete", "responses": { - "204": { - "$ref": "#/responses/empty" + "200": { + "$ref": "#/responses/TrackedTime" }, - "403": { - "$ref": "#/responses/forbidden" + "400": { + "$ref": "#/responses/error" }, - "500": { + "403": { "$ref": "#/responses/error" } } } }, - "/repos/{username}/{reponame}/hooks": { + "/repos/{owner}/{repo}/keys": { "get": { "produces": [ "application/json" @@ -1241,13 +2242,27 @@ "tags": [ "repository" ], - "operationId": "repoListHooks", + "summary": "List a repository's keys", + "operationId": "repoListKeys", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], "responses": { "200": { - "$ref": "#/responses/HookList" - }, - "500": { - "$ref": "#/responses/error" + "$ref": "#/responses/DeployKeyList" } } }, @@ -1261,224 +2276,1112 @@ "tags": [ "repository" ], - "operationId": "repoCreateHook", + "summary": "Add a key to a repository", + "operationId": "repoCreateKey", "parameters": [ { - "x-go-name": "Type", - "name": "type", + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", "in": "body", "schema": { - "type": "string" + "$ref": "#/definitions/CreateKeyOption" } + } + ], + "responses": { + "201": { + "$ref": "#/responses/DeployKey" + } + } + } + }, + "/repos/{owner}/{repo}/keys/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a repository's key by id", + "operationId": "repoGetKey", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { - "x-go-name": "Config", - "name": "config", + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of the key to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/DeployKey" + } + } + }, + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a key from a repository", + "operationId": "repoDeleteKey", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of the key to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/labels": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get all of a repository's labels", + "operationId": "issueListLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/LabelList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create a label", + "operationId": "issueCreateLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", "in": "body", "schema": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "$ref": "#/definitions/CreateLabelOption" } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Label" + } + } + } + }, + "/repos/{owner}/{repo}/labels/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a single label", + "operationId": "issueGetLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { - "x-go-name": "Events", - "name": "events", + "type": "integer", + "description": "id of the label to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + } + } + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a label", + "operationId": "issueDeleteLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of the label to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Update a label", + "operationId": "issueEditLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of the label to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", "in": "body", "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/definitions/EditLabelOption" } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Label" + } + } + } + }, + "/repos/{owner}/{repo}/milestones": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get all of a repository's milestones", + "operationId": "issueGetMilestones", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of the milestone to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/MilestoneList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Create a milestone", + "operationId": "issueCreateMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { - "x-go-name": "Active", - "name": "active", + "name": "body", "in": "body", "schema": { - "type": "boolean" + "$ref": "#/definitions/CreateMilestoneOption" } } ], "responses": { + "201": { + "$ref": "#/responses/Milestone" + } + } + } + }, + "/repos/{owner}/{repo}/milestones/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Get a milestone", + "operationId": "issueGetMilestone", + "responses": { "200": { - "$ref": "#/responses/Hook" + "$ref": "#/responses/Milestone" + } + } + }, + "delete": { + "tags": [ + "issue" + ], + "summary": "Delete a milestone", + "operationId": "issueDeleteMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, - "422": { - "$ref": "#/responses/validationError" + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, - "500": { - "$ref": "#/responses/error" + { + "type": "integer", + "description": "id of the milestone to delete", + "name": "body", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Update a milestone", + "operationId": "issueEditMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditMilestoneOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Milestone" } } } }, - "/repos/{username}/{reponame}/hooks/{id}": { - "delete": { + "/repos/{owner}/{repo}/mirror-sync": { + "post": { "produces": [ "application/json" ], "tags": [ "repository" ], - "operationId": "repoDeleteHook", + "summary": "Sync a mirrored repository", + "operationId": "repoMirrorSync", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to sync", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to sync", + "name": "repo", + "in": "path", + "required": true + } + ], "responses": { - "204": { + "200": { "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/pulls": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's pull requests", + "operationId": "repoListPullRequests", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, - "404": { - "$ref": "#/responses/notFound" - }, - "500": { - "$ref": "#/responses/error" + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequestList" } } }, - "patch": { + "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "repository" ], - "operationId": "repoEditHook", + "summary": "Create a pull request", + "operationId": "repoCreatePullRequest", "parameters": [ { - "x-go-name": "Config", - "name": "config", + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", "in": "body", "schema": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "$ref": "#/definitions/CreatePullRequestOption" } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PullRequest" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a pull request", + "operationId": "repoGetPullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, { - "x-go-name": "Events", - "name": "events", + "type": "integer", + "description": "index of the pull request to get", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/PullRequest" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a pull request", + "operationId": "repoEditPullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "index of the pull request to edit", + "name": "index", + "in": "path", + "required": true + }, + { + "name": "body", "in": "body", "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/definitions/EditPullRequestOption" } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PullRequest" + } + } + } + }, + "/repos/{owner}/{repo}/pulls/{index}/merge": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Check if a pull request has been merged", + "operationId": "repoPullRequestIsMerged", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, { - "x-go-name": "Active", - "name": "active", - "in": "body", + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "pull request has been merged", "schema": { - "type": "boolean" + "$ref": "#/responses/empty" } + }, + "404": { + "description": "pull request has not been merged", + "schema": { + "$ref": "#/responses/empty" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Merge a pull request", + "operationId": "repoMergePullRequest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "index of the pull request to merge", + "name": "index", + "in": "path", + "required": true } ], "responses": { "200": { - "$ref": "#/responses/Hook" + "$ref": "#/responses/empty" }, - "422": { - "$ref": "#/responses/validationError" + "405": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/raw/{filepath}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a file from a repository", + "operationId": "repoGetRawFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, - "500": { - "$ref": "#/responses/error" + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "filepath of the file to get", + "name": "filepath", + "in": "path", + "required": true } + ], + "responses": { + "200": {} } } }, - "/repos/{username}/{reponame}/issues/{issue}/times": { + "/repos/{owner}/{repo}/releases": { "get": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "repository" ], - "operationId": "issueTrackedTimes", + "summary": "Create a release", + "operationId": "repoCreateRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateReleaseOption" + } + } + ], "responses": { - "200": { - "$ref": "#/responses/TrackedTimes" + "201": { + "$ref": "#/responses/Release" + } + } + } + }, + "/repos/{owner}/{repo}/releases/{id}": { + "delete": { + "tags": [ + "repository" + ], + "summary": "Delete a release", + "operationId": "repoDeleteRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, - "404": { - "$ref": "#/responses/error" + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, - "500": { - "$ref": "#/responses/error" + { + "type": "integer", + "description": "id of the release to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" } } }, - "post": { + "patch": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "repository" ], - "operationId": "addTime", + "summary": "Update a release", + "operationId": "repoEditRelease", "parameters": [ { - "x-go-name": "Time", - "name": "time", + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of the release to edit", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", "in": "body", "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/definitions/EditReleaseOption" } } ], "responses": { "200": { - "$ref": "#/responses/TrackedTime" + "$ref": "#/responses/Release" + } + } + } + }, + "/repos/{owner}/{repo}/stargazers": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repo's stargazers", + "operationId": "repoListStargazers", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, - "400": { - "$ref": "#/responses/error" + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + } + } + } + }, + "/repos/{owner}/{repo}/statuses/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a commit's statuses", + "operationId": "repoListStatuses", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, - "403": { - "$ref": "#/responses/error" + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, - "404": { - "$ref": "#/responses/error" + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/StatusList" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a commit status", + "operationId": "repoCreateStatus", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, - "500": { - "$ref": "#/responses/error" + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateStatusOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/StatusList" } } } }, - "/repos/{username}/{reponame}/mirror-sync": { - "post": { + "/repos/{owner}/{repo}/subscribers": { + "get": { "produces": [ "application/json" ], "tags": [ "repository" ], - "operationId": "repoMirrorSync", + "summary": "List a repo's watchers", + "operationId": "repoListSubscribers", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], "responses": { "200": { - "$ref": "#/responses/empty" - }, - "403": { - "$ref": "#/responses/forbidden" + "$ref": "#/responses/UserList" } } } }, - "/repos/{username}/{reponame}/subscription": { + "/repos/{owner}/{repo}/subscription": { "get": { "tags": [ "repository" ], + "summary": "Check if the current user is watching a repo", "operationId": "userCurrentCheckSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], "responses": { "200": { "$ref": "#/responses/WatchInfo" - }, - "404": { - "$ref": "#/responses/notFound" } } }, @@ -1486,13 +3389,27 @@ "tags": [ "repository" ], + "summary": "Watch a repo", "operationId": "userCurrentPutSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], "responses": { "200": { "$ref": "#/responses/WatchInfo" - }, - "500": { - "$ref": "#/responses/error" } } }, @@ -1500,18 +3417,32 @@ "tags": [ "repository" ], + "summary": "Unwatch a repo", "operationId": "userCurrentDeleteSubscription", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], "responses": { "204": { "$ref": "#/responses/empty" - }, - "500": { - "$ref": "#/responses/error" } } } }, - "/repos/{username}/{reponame}/times": { + "/repos/{owner}/{repo}/times": { "get": { "produces": [ "application/json" @@ -1519,21 +3450,32 @@ "tags": [ "repository" ], + "summary": "List a repo's tracked times", "operationId": "repoTrackedTimes", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], "responses": { "200": { - "$ref": "#/responses/TrackedTimes" - }, - "400": { - "$ref": "#/responses/error" - }, - "500": { - "$ref": "#/responses/error" + "$ref": "#/responses/TrackedTimeList" } } } }, - "/repos/{username}/{reponame}/times/{timetrackingusername}": { + "/repos/{owner}/{repo}/times/{tracker}": { "get": { "produces": [ "application/json" @@ -1541,19 +3483,77 @@ "tags": [ "user" ], + "summary": "List a user's tracked times in a repo", "operationId": "userTrackedTimes", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of user", + "name": "user", + "in": "path", + "required": true + } + ], "responses": { "200": { - "$ref": "#/responses/TrackedTimes" + "$ref": "#/responses/TrackedTimeList" + } + } + } + }, + "/repos/{user}/{repo}/hooks/{id}": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a hook in a repository", + "operationId": "repoDeleteHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true }, - "400": { - "$ref": "#/responses/error" + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true }, - "404": { - "$ref": "#/responses/error" + { + "type": "integer", + "description": "id of the hook to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" }, - "500": { - "$ref": "#/responses/error" + "404": { + "$ref": "#/responses/notFound" } } } @@ -1566,13 +3566,299 @@ "tags": [ "repository" ], + "summary": "Get a repository by id", "operationId": "repoGetByID", + "parameters": [ + { + "type": "integer", + "description": "id of the repo to get", + "name": "id", + "in": "path", + "required": true + } + ], "responses": { "200": { "$ref": "#/responses/Repository" + } + } + } + }, + "/teams/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get a team", + "operationId": "orgGetTeam", + "parameters": [ + { + "type": "integer", + "description": "id of the team to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Team" + } + } + }, + "delete": { + "tags": [ + "organization" + ], + "summary": "Delete a team", + "operationId": "orgDeleteTeam", + "parameters": [ + { + "type": "integer", + "description": "id of the team to delete", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "team deleted", + "schema": { + "$ref": "#/responses/empty" + } + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Edit a team", + "operationId": "orgEditTeam", + "parameters": [ + { + "type": "integer", + "description": "id of the team to edit", + "name": "id", + "in": "path", + "required": true }, - "500": { - "$ref": "#/responses/error" + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditTeamOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Team" + } + } + } + }, + "/teams/{id}/members": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List a team's members", + "operationId": "orgListTeamMembers", + "parameters": [ + { + "type": "integer", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/UserList" + } + } + } + }, + "/teams/{id}/members/{username}": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Add a team member", + "operationId": "orgAddTeamMember", + "parameters": [ + { + "type": "integer", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user to add", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Remove a team member", + "operationId": "orgAddTeamMember", + "parameters": [ + { + "type": "integer", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the user to remove", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/teams/{id}/repos": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List a team's repos", + "operationId": "orgListTeamRepos", + "parameters": [ + { + "type": "integer", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + } + } + } + }, + "/teams/{id}/repos/{org}/{repo}": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Add a repository to a team", + "operationId": "orgAddTeamMember", + "parameters": [ + { + "type": "integer", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "organization that owns the repo to add", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to add", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "delete": { + "description": "This does not delete the repository, it only removes the repository from the team.", + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Remove a repository from a team", + "operationId": "orgAddTeamMember", + "parameters": [ + { + "type": "integer", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "organization that owns the repo to remove", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to remove", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" } } } @@ -1585,6 +3871,7 @@ "tags": [ "user" ], + "summary": "Get the authenticated user", "operationId": "userGetCurrent", "responses": { "200": { @@ -1593,6 +3880,71 @@ } } }, + "/user/emails": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "List the authenticated user's email addresses", + "operationId": "userListEmails", + "responses": { + "200": { + "$ref": "#/responses/EmailList" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Add email addresses", + "operationId": "userAddEmail", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateEmailOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/EmailList" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Delete email addresses", + "operationId": "userDeleteEmail", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/DeleteEmailOption" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, "/user/followers": { "get": { "produces": [ @@ -1601,13 +3953,11 @@ "tags": [ "user" ], + "summary": "List the authenticated user's followers", "operationId": "userCurrentListFollowers", "responses": { "200": { "$ref": "#/responses/UserList" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -1620,23 +3970,31 @@ "tags": [ "user" ], + "summary": "List the users that the authenticated user is following", "operationId": "userCurrentListFollowing", "responses": { "200": { "$ref": "#/responses/UserList" - }, - "500": { - "$ref": "#/responses/error" } } } }, - "/user/following/{username}": { + "/user/following/{followee}": { "get": { "tags": [ "user" ], + "summary": "Check whether a user is followed by the authenticated user", "operationId": "userCurrentCheckFollowing", + "parameters": [ + { + "type": "string", + "description": "username of followed user", + "name": "followee", + "in": "path", + "required": true + } + ], "responses": { "204": { "$ref": "#/responses/empty" @@ -1645,18 +4003,27 @@ "$ref": "#/responses/notFound" } } - }, + } + }, + "/user/following/{username}": { "put": { "tags": [ "user" ], + "summary": "Follow a user", "operationId": "userCurrentPutFollow", + "parameters": [ + { + "type": "string", + "description": "username of user to follow", + "name": "username", + "in": "path", + "required": true + } + ], "responses": { "204": { "$ref": "#/responses/empty" - }, - "500": { - "$ref": "#/responses/error" } } }, @@ -1664,13 +4031,20 @@ "tags": [ "user" ], + "summary": "Unfollow a user", "operationId": "userCurrentDeleteFollow", + "parameters": [ + { + "type": "string", + "description": "username of user to unfollow", + "name": "username", + "in": "path", + "required": true + } + ], "responses": { "204": { "$ref": "#/responses/empty" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -1683,13 +4057,11 @@ "tags": [ "user" ], + "summary": "List the authenticated user's GPG keys", "operationId": "userCurrentListGPGKeys", "responses": { "200": { "$ref": "#/responses/GPGKeyList" - }, - "500": { - "$ref": "#/responses/error" } } }, @@ -1703,17 +4075,14 @@ "tags": [ "user" ], + "summary": "Create a GPG key", "operationId": "userCurrentPostGPGKey", "parameters": [ { - "uniqueItems": true, - "x-go-name": "ArmoredKey", - "description": "An armored GPG key to add", - "name": "armored_public_key", + "name": "Form", "in": "body", - "required": true, "schema": { - "type": "string" + "$ref": "#/definitions/CreateGPGKeyOption" } } ], @@ -1723,9 +4092,6 @@ }, "422": { "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -1738,16 +4104,23 @@ "tags": [ "user" ], + "summary": "Get a GPG key", "operationId": "userCurrentGetGPGKey", + "parameters": [ + { + "type": "integer", + "description": "id of key to get", + "name": "id", + "in": "path", + "required": true + } + ], "responses": { "200": { "$ref": "#/responses/GPGKey" }, "404": { "$ref": "#/responses/notFound" - }, - "500": { - "$ref": "#/responses/error" } } }, @@ -1758,16 +4131,23 @@ "tags": [ "user" ], + "summary": "Remove a GPG key", "operationId": "userCurrentDeleteGPGKey", + "parameters": [ + { + "type": "integer", + "description": "id of key to delete", + "name": "id", + "in": "path", + "required": true + } + ], "responses": { "204": { "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -1780,13 +4160,11 @@ "tags": [ "user" ], + "summary": "List the authenticated user's public keys", "operationId": "userCurrentListKeys", "responses": { "200": { "$ref": "#/responses/PublicKeyList" - }, - "500": { - "$ref": "#/responses/error" } } }, @@ -1800,28 +4178,14 @@ "tags": [ "user" ], + "summary": "Create a public key", "operationId": "userCurrentPostKey", "parameters": [ { - "uniqueItems": true, - "x-go-name": "Title", - "description": "Title of the key to add", - "name": "title", - "in": "body", - "required": true, - "schema": { - "type": "string" - } - }, - { - "uniqueItems": true, - "x-go-name": "Key", - "description": "An armored SSH key to add", - "name": "key", + "name": "body", "in": "body", - "required": true, "schema": { - "type": "string" + "$ref": "#/definitions/CreateKeyOption" } } ], @@ -1831,9 +4195,6 @@ }, "422": { "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -1846,16 +4207,23 @@ "tags": [ "user" ], + "summary": "Get a public key", "operationId": "userCurrentGetKey", + "parameters": [ + { + "type": "integer", + "description": "id of key to get", + "name": "id", + "in": "path", + "required": true + } + ], "responses": { "200": { "$ref": "#/responses/PublicKey" }, "404": { "$ref": "#/responses/notFound" - }, - "500": { - "$ref": "#/responses/error" } } }, @@ -1866,16 +4234,40 @@ "tags": [ "user" ], + "summary": "Delete a public key", "operationId": "userCurrentDeleteKey", + "parameters": [ + { + "type": "integer", + "description": "id of key to delete", + "name": "id", + "in": "path", + "required": true + } + ], "responses": { "204": { "$ref": "#/responses/empty" }, "403": { "$ref": "#/responses/forbidden" - }, - "500": { - "$ref": "#/responses/error" + } + } + } + }, + "/user/orgs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List the current user's organizations", + "operationId": "orgListCurrentUserOrgs", + "responses": { + "200": { + "$ref": "#/responses/OrganizationList" } } } @@ -1888,13 +4280,11 @@ "tags": [ "user" ], + "summary": "List the repos that the authenticated user owns or has access to", "operationId": "userCurrentListRepos", "responses": { "200": { "$ref": "#/responses/RepositoryList" - }, - "500": { - "$ref": "#/responses/error" } } }, @@ -1909,85 +4299,20 @@ "repository", "user" ], + "summary": "Create a repository", "operationId": "createCurrentUserRepo", "parameters": [ { - "uniqueItems": true, - "x-go-name": "Name", - "description": "Name of the repository to create", - "name": "name", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Description", - "description": "Description of the repository to create", - "name": "description", + "name": "body", "in": "body", "schema": { - "type": "string" - } - }, - { - "x-go-name": "Private", - "description": "Is the repository to create private ?", - "name": "private", - "in": "body", - "schema": { - "type": "boolean" - } - }, - { - "x-go-name": "AutoInit", - "description": "Init the repository to create ?", - "name": "auto_init", - "in": "body", - "schema": { - "type": "boolean" - } - }, - { - "x-go-name": "Gitignores", - "description": "Gitignores to use", - "name": "gitignores", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "License", - "description": "License to use", - "name": "license", - "in": "body", - "schema": { - "type": "string" - } - }, - { - "x-go-name": "Readme", - "description": "Readme of the repository to create", - "name": "readme", - "in": "body", - "schema": { - "type": "string" + "$ref": "#/definitions/CreateRepoOption" } } ], "responses": { "201": { "$ref": "#/responses/Repository" - }, - "403": { - "$ref": "#/responses/forbidden" - }, - "422": { - "$ref": "#/responses/validationError" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -2000,23 +4325,38 @@ "tags": [ "user" ], + "summary": "The repos that the authenticated user has starred", "operationId": "userCurrentListStarred", "responses": { "200": { "$ref": "#/responses/RepositoryList" - }, - "500": { - "$ref": "#/responses/error" } } } }, - "/user/starred/{username}/{reponame}": { + "/user/starred/{owner}/{repo}": { "get": { "tags": [ "user" ], + "summary": "Whether the authenticated is starring the repo", "operationId": "userCurrentCheckStarring", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], "responses": { "204": { "$ref": "#/responses/empty" @@ -2030,13 +4370,27 @@ "tags": [ "user" ], + "summary": "Star the given repo", "operationId": "userCurrentPutStar", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to star", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to star", + "name": "repo", + "in": "path", + "required": true + } + ], "responses": { "204": { "$ref": "#/responses/empty" - }, - "500": { - "$ref": "#/responses/error" } } }, @@ -2044,13 +4398,27 @@ "tags": [ "user" ], + "summary": "Unstar the given repo", "operationId": "userCurrentDeleteStar", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to unstar", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to unstar", + "name": "repo", + "in": "path", + "required": true + } + ], "responses": { "204": { "$ref": "#/responses/empty" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -2063,13 +4431,11 @@ "tags": [ "user" ], + "summary": "List repositories watched by the authenticated user", "operationId": "userCurrentListSubscriptions", "responses": { "200": { "$ref": "#/responses/RepositoryList" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -2082,32 +4448,36 @@ "tags": [ "user" ], - "operationId": "userTrackedTimes", + "summary": "List the current user's tracked times", + "operationId": "userCurrentTrackedTimes", "responses": { "200": { - "$ref": "#/responses/TrackedTimes" - }, - "500": { - "$ref": "#/responses/error" + "$ref": "#/responses/TrackedTimeList" } } } }, - "/users/:username/followers": { + "/user/{username}/orgs": { "get": { "produces": [ "application/json" ], "tags": [ - "user" + "organization" + ], + "summary": "List a user's organizations", + "operationId": "orgListUserOrgs", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path" + } ], - "operationId": "userListFollowers", "responses": { "200": { - "$ref": "#/responses/UserList" - }, - "500": { - "$ref": "#/responses/error" + "$ref": "#/responses/OrganizationList" } } } @@ -2120,13 +4490,58 @@ "tags": [ "user" ], + "summary": "Search for users", "operationId": "userSearch", + "parameters": [ + { + "type": "string", + "description": "keyword", + "name": "q", + "in": "query" + }, + { + "type": "integer", + "description": "maximum number of users to return", + "name": "limit", + "in": "query" + } + ], "responses": { "200": { "$ref": "#/responses/UserList" + } + } + } + }, + "/users/{follower}/following/{followee}": { + "get": { + "tags": [ + "user" + ], + "summary": "Check if one user is following another user", + "operationId": "userCheckFollowing", + "parameters": [ + { + "type": "string", + "description": "username of following user", + "name": "follower", + "in": "path", + "required": true }, - "500": { - "$ref": "#/responses/error" + { + "type": "string", + "description": "username of followed user", + "name": "followee", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -2139,21 +4554,28 @@ "tags": [ "user" ], + "summary": "Get a user", "operationId": "userGet", + "parameters": [ + { + "type": "string", + "description": "username of user to get", + "name": "username", + "in": "path", + "required": true + } + ], "responses": { "200": { "$ref": "#/responses/User" }, "404": { "$ref": "#/responses/notFound" - }, - "500": { - "$ref": "#/responses/error" } } } }, - "/users/{username}/following": { + "/users/{username}/followers": { "get": { "produces": [ "application/json" @@ -2161,29 +4583,46 @@ "tags": [ "user" ], - "operationId": "userListFollowing", + "summary": "List the given user's followers", + "operationId": "userListFollowers", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + } + ], "responses": { "200": { "$ref": "#/responses/UserList" - }, - "500": { - "$ref": "#/responses/error" } } } }, - "/users/{username}/following/:target": { + "/users/{username}/following": { "get": { + "produces": [ + "application/json" + ], "tags": [ "user" ], - "operationId": "userCheckFollowing", + "summary": "List the users that the given user is following", + "operationId": "userListFollowing", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + } + ], "responses": { - "204": { - "$ref": "#/responses/empty" - }, - "404": { - "$ref": "#/responses/notFound" + "200": { + "$ref": "#/responses/UserList" } } } @@ -2196,13 +4635,20 @@ "tags": [ "user" ], + "summary": "List the given user's GPG keys", "operationId": "userListGPGKeys", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + } + ], "responses": { "200": { "$ref": "#/responses/GPGKeyList" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -2215,13 +4661,20 @@ "tags": [ "user" ], + "summary": "List the given user's public keys", "operationId": "userListKeys", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + } + ], "responses": { "200": { "$ref": "#/responses/PublicKeyList" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -2234,13 +4687,20 @@ "tags": [ "user" ], + "summary": "List the repos owned by the given user", "operationId": "userListRepos", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + } + ], "responses": { "200": { "$ref": "#/responses/RepositoryList" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -2253,13 +4713,20 @@ "tags": [ "user" ], + "summary": "The repos that the given user has starred", "operationId": "userListStarred", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + } + ], "responses": { "200": { "$ref": "#/responses/RepositoryList" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -2272,13 +4739,19 @@ "tags": [ "user" ], + "summary": "List the repositories watched by a user", "operationId": "userListSubscriptions", + "parameters": [ + { + "type": "string", + "description": "username of the user", + "name": "username", + "in": "path" + } + ], "responses": { "200": { "$ref": "#/responses/RepositoryList" - }, - "500": { - "$ref": "#/responses/error" } } } @@ -2291,27 +4764,50 @@ "tags": [ "user" ], + "summary": "List the authenticated user's access tokens", "operationId": "userGetTokens", "responses": { "200": { "$ref": "#/responses/AccessTokenList" - }, - "500": { - "$ref": "#/responses/error" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Create an access token", + "operationId": "userCreateToken", + "parameters": [ + { + "type": "string", + "x-go-name": "Name", + "name": "name", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/AccessToken" } } } }, "/version": { "get": { - "description": "This show current running Gitea application version.", "produces": [ "application/json" ], "tags": [ "miscellaneous" ], - "summary": "Return Gitea running version.", + "summary": "Returns the version of the Gitea application", "operationId": "getVersion", "responses": { "200": { @@ -2322,557 +4818,2136 @@ } }, "definitions": { - "GPGKey": { - "description": "GPGKey a user GPG key to sign commit and tag in repository", + "AddCollaboratorOption": { + "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository", "type": "object", "properties": { - "can_certify": { - "type": "boolean", - "x-go-name": "CanCertify" - }, - "can_encrypt_comms": { - "type": "boolean", - "x-go-name": "CanEncryptComms" - }, - "can_encrypt_storage": { - "type": "boolean", - "x-go-name": "CanEncryptStorage" + "permission": { + "type": "string", + "x-go-name": "Permission" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "AddTimeOption": { + "description": "AddTimeOption options for adding time to an issue", + "type": "object", + "required": [ + "time" + ], + "properties": { + "time": { + "description": "time in seconds", + "type": "integer", + "format": "int64", + "x-go-name": "Time" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "Branch": { + "description": "Branch represents a repository branch", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/PayloadCommit" }, - "can_sign": { - "type": "boolean", - "x-go-name": "CanSign" + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "Comment": { + "description": "Comment represents a comment on a commit or issue", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" }, "created_at": { + "type": "string", + "format": "date-time", "x-go-name": "Created" }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "issue_url": { + "type": "string", + "x-go-name": "IssueURL" + }, + "pull_request_url": { + "type": "string", + "x-go-name": "PRURL" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "CreateEmailOption": { + "description": "CreateEmailOption options when creating email addresses", + "type": "object", + "properties": { "emails": { + "description": "email addresses to add", "type": "array", "items": { - "$ref": "#/definitions/GPGKeyEmail" + "type": "string" }, "x-go-name": "Emails" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "CreateForkOption": { + "description": "CreateForkOption options for creating a fork", + "type": "object", + "properties": { + "organization": { + "description": "organization name, if forking into an organization", + "type": "string", + "x-go-name": "Organization" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "CreateGPGKeyOption": { + "description": "CreateGPGKeyOption options create user GPG key", + "type": "object", + "required": [ + "armored_public_key" + ], + "properties": { + "armored_public_key": { + "description": "An armored GPG key to add", + "type": "string", + "uniqueItems": true, + "x-go-name": "ArmoredKey" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "CreateHookOption": { + "description": "CreateHookOption options when create a hook", + "type": "object", + "required": [ + "type", + "config" + ], + "properties": { + "active": { + "type": "boolean", + "default": false, + "x-go-name": "Active" }, - "expires_at": { - "x-go-name": "Expires" + "config": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "Config" }, - "id": { + "events": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Events" + }, + "type": { + "type": "string", + "enum": [ + "gitea", + "gogs", + "slack", + "discord" + ], + "x-go-name": "Type" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "CreateIssueCommentOption": { + "description": "CreateIssueCommentOption options for creating a comment on an issue", + "type": "object", + "required": [ + "body" + ], + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "CreateIssueOption": { + "description": "CreateIssueOption options to create one issue", + "type": "object", + "required": [ + "title" + ], + "properties": { + "assignee": { + "description": "username of assignee", + "type": "string", + "x-go-name": "Assignee" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "closed": { + "type": "boolean", + "x-go-name": "Closed" + }, + "labels": { + "description": "list of label ids", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Labels" + }, + "milestone": { + "description": "milestone id", "type": "integer", "format": "int64", - "x-go-name": "ID" + "x-go-name": "Milestone" }, - "key_id": { + "title": { "type": "string", - "x-go-name": "KeyID" + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "CreateKeyOption": { + "description": "CreateKeyOption options when creating a key", + "type": "object", + "required": [ + "title", + "key" + ], + "properties": { + "key": { + "description": "An armored SSH key to add", + "type": "string", + "uniqueItems": true, + "x-go-name": "Key" }, - "primary_key_id": { + "title": { + "description": "Title of the key to add", "type": "string", - "x-go-name": "PrimaryKeyID" + "uniqueItems": true, + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "CreateLabelOption": { + "description": "CreateLabelOption options for creating a label", + "type": "object", + "required": [ + "name", + "color" + ], + "properties": { + "color": { + "type": "string", + "x-go-name": "Color", + "example": "#00aabb" }, - "public_key": { + "name": { "type": "string", - "x-go-name": "PublicKey" + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "CreateMilestoneOption": { + "description": "CreateMilestoneOption options for creating a milestone", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" }, - "subkeys": { + "due_on": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "CreateOrgOption": { + "description": "CreateOrgOption options for creating an organization", + "type": "object", + "required": [ + "username" + ], + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "location": { + "type": "string", + "x-go-name": "Location" + }, + "username": { + "type": "string", + "x-go-name": "UserName" + }, + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "CreatePullRequestOption": { + "description": "CreatePullRequestOption options when creating a pull request", + "type": "object", + "properties": { + "assignee": { + "type": "string", + "x-go-name": "Assignee" + }, + "base": { + "type": "string", + "x-go-name": "Base" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "head": { + "type": "string", + "x-go-name": "Head" + }, + "labels": { "type": "array", "items": { - "type": "object" + "type": "integer", + "format": "int64" }, - "x-go-name": "SubsKey" + "x-go-name": "Labels" + }, + "milestone": { + "type": "integer", + "format": "int64", + "x-go-name": "Milestone" + }, + "title": { + "type": "string", + "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, - "GPGKeyEmail": { - "description": "GPGKeyEmail an email attached to a GPGKey", + "CreateReleaseOption": { + "description": "CreateReleaseOption options when creating a release", "type": "object", + "required": [ + "tag_name" + ], "properties": { - "email": { + "body": { "type": "string", - "x-go-name": "Email" + "x-go-name": "Note" }, - "verified": { + "draft": { "type": "boolean", - "x-go-name": "Verified" + "x-go-name": "IsDraft" + }, + "name": { + "type": "string", + "x-go-name": "Title" + }, + "prerelease": { + "type": "boolean", + "x-go-name": "IsPrerelease" + }, + "tag_name": { + "type": "string", + "x-go-name": "TagName" + }, + "target_commitish": { + "type": "string", + "x-go-name": "Target" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, - "Permission": { + "CreateRepoOption": { + "description": "CreateRepoOption options when creating repository", "type": "object", - "title": "Permission represents a API permission.", + "required": [ + "name" + ], "properties": { - "admin": { + "auto_init": { + "description": "Whether the repository should be auto-intialized?", "type": "boolean", - "x-go-name": "Admin" + "x-go-name": "AutoInit" }, - "pull": { - "type": "boolean", - "x-go-name": "Pull" + "description": { + "description": "Description of the repository to create", + "type": "string", + "x-go-name": "Description" }, - "push": { + "gitignores": { + "description": "Gitignores to use", + "type": "string", + "x-go-name": "Gitignores" + }, + "license": { + "description": "License to use", + "type": "string", + "x-go-name": "License" + }, + "name": { + "description": "Name of the repository to create", + "type": "string", + "uniqueItems": true, + "x-go-name": "Name" + }, + "private": { + "description": "Whether the repository is private", "type": "boolean", - "x-go-name": "Push" + "x-go-name": "Private" + }, + "readme": { + "description": "Readme of the repository to create", + "type": "string", + "x-go-name": "Readme" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, - "Repository": { + "CreateStatusOption": { + "description": "CreateStatusOption holds the information needed to create a new Status for a Commit", "type": "object", - "title": "Repository represents a API repository.", "properties": { - "clone_url": { + "context": { "type": "string", - "x-go-name": "CloneURL" + "x-go-name": "Context" }, - "created_at": { - "x-go-name": "Created" - }, - "default_branch": { + "description": { "type": "string", - "x-go-name": "DefaultBranch" + "x-go-name": "Description" + }, + "state": { + "$ref": "#/definitions/StatusState" }, + "target_url": { + "type": "string", + "x-go-name": "TargetURL" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "CreateTeamOption": { + "description": "CreateTeamOption options for creating a team", + "type": "object", + "required": [ + "name" + ], + "properties": { "description": { "type": "string", "x-go-name": "Description" }, - "empty": { - "type": "boolean", - "x-go-name": "Empty" + "name": { + "type": "string", + "x-go-name": "Name" }, - "fork": { + "permission": { + "type": "string", + "enum": [ + "read", + "write", + "admin" + ], + "x-go-name": "Permission" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "CreateUserOption": { + "description": "CreateUserOption create user options", + "type": "object", + "required": [ + "username", + "email", + "password" + ], + "properties": { + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "full_name": { + "type": "string", + "x-go-name": "FullName" + }, + "login_name": { + "type": "string", + "x-go-name": "LoginName" + }, + "password": { + "type": "string", + "x-go-name": "Password" + }, + "send_notify": { "type": "boolean", - "x-go-name": "Fork" + "x-go-name": "SendNotify" }, - "forks_count": { + "source_id": { "type": "integer", "format": "int64", - "x-go-name": "Forks" + "x-go-name": "SourceID" }, - "full_name": { + "username": { "type": "string", - "x-go-name": "FullName" - }, - "html_url": { + "x-go-name": "Username" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "DeleteEmailOption": { + "description": "DeleteEmailOption options when deleting email addresses", + "type": "object", + "properties": { + "emails": { + "description": "email addresses to delete", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Emails" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "DeployKey": { + "description": "DeployKey a deploy key", + "type": "object", + "properties": { + "created_at": { "type": "string", - "x-go-name": "HTMLURL" + "format": "date-time", + "x-go-name": "Created" }, "id": { "type": "integer", "format": "int64", "x-go-name": "ID" }, - "mirror": { + "key": { + "type": "string", + "x-go-name": "Key" + }, + "read_only": { "type": "boolean", - "x-go-name": "Mirror" + "x-go-name": "ReadOnly" }, - "name": { + "title": { "type": "string", - "x-go-name": "Name" + "x-go-name": "Title" }, - "open_issues_count": { + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "EditHookOption": { + "description": "EditHookOption options when modify one hook", + "type": "object", + "properties": { + "active": { + "type": "boolean", + "x-go-name": "Active" + }, + "config": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "Config" + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Events" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "EditIssueCommentOption": { + "description": "EditIssueCommentOption options for editing a comment", + "type": "object", + "required": [ + "body" + ], + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "EditIssueOption": { + "description": "EditIssueOption options for editing an issue", + "type": "object", + "properties": { + "assignee": { + "type": "string", + "x-go-name": "Assignee" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "milestone": { "type": "integer", "format": "int64", - "x-go-name": "OpenIssues" + "x-go-name": "Milestone" }, - "owner": { - "$ref": "#/definitions/User" + "state": { + "type": "string", + "x-go-name": "State" }, - "parent": { - "type": "object" + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "EditLabelOption": { + "description": "EditLabelOption options for editing a label", + "type": "object", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color" }, - "permissions": { - "$ref": "#/definitions/Permission" + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "EditMilestoneOption": { + "description": "EditMilestoneOption options for editing a milestone", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" }, - "private": { - "type": "boolean", - "x-go-name": "Private" + "due_on": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" }, - "size": { - "type": "integer", - "format": "int64", - "x-go-name": "Size" + "state": { + "type": "string", + "x-go-name": "State" }, - "ssh_url": { + "title": { "type": "string", - "x-go-name": "SSHURL" + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "EditOrgOption": { + "description": "EditOrgOption options for editing an organization", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" }, - "stars_count": { - "type": "integer", - "format": "int64", - "x-go-name": "Stars" + "full_name": { + "type": "string", + "x-go-name": "FullName" }, - "updated_at": { - "x-go-name": "Updated" + "location": { + "type": "string", + "x-go-name": "Location" }, - "watchers_count": { + "website": { + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "EditPullRequestOption": { + "description": "EditPullRequestOption options when modify pull request", + "type": "object", + "properties": { + "assignee": { + "type": "string", + "x-go-name": "Assignee" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "labels": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Labels" + }, + "milestone": { "type": "integer", "format": "int64", - "x-go-name": "Watchers" + "x-go-name": "Milestone" }, - "website": { + "state": { "type": "string", - "x-go-name": "Website" + "x-go-name": "State" + }, + "title": { + "type": "string", + "x-go-name": "Title" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, - "User": { + "EditReleaseOption": { + "description": "EditReleaseOption options when editing a release", "type": "object", - "title": "User represents a API user.", "properties": { - "avatar_url": { + "body": { "type": "string", - "x-go-name": "AvatarURL" + "x-go-name": "Note" + }, + "draft": { + "type": "boolean", + "x-go-name": "IsDraft" + }, + "name": { + "type": "string", + "x-go-name": "Title" + }, + "prerelease": { + "type": "boolean", + "x-go-name": "IsPrerelease" + }, + "tag_name": { + "type": "string", + "x-go-name": "TagName" + }, + "target_commitish": { + "type": "string", + "x-go-name": "Target" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "EditTeamOption": { + "description": "EditTeamOption options for editing a team", + "type": "object", + "required": [ + "name" + ], + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "permission": { + "type": "string", + "enum": [ + "read", + "write", + "admin" + ], + "x-go-name": "Permission" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "EditUserOption": { + "description": "EditUserOption edit user options", + "type": "object", + "required": [ + "email" + ], + "properties": { + "active": { + "type": "boolean", + "x-go-name": "Active" + }, + "admin": { + "type": "boolean", + "x-go-name": "Admin" + }, + "allow_git_hook": { + "type": "boolean", + "x-go-name": "AllowGitHook" + }, + "allow_import_local": { + "type": "boolean", + "x-go-name": "AllowImportLocal" }, "email": { "type": "string", + "format": "email", "x-go-name": "Email" }, "full_name": { "type": "string", "x-go-name": "FullName" }, - "id": { + "location": { + "type": "string", + "x-go-name": "Location" + }, + "login_name": { + "type": "string", + "x-go-name": "LoginName" + }, + "max_repo_creation": { "type": "integer", "format": "int64", - "x-go-name": "ID" + "x-go-name": "MaxRepoCreation" }, - "login": { + "password": { "type": "string", - "x-go-name": "UserName" + "x-go-name": "Password" + }, + "source_id": { + "type": "integer", + "format": "int64", + "x-go-name": "SourceID" + }, + "website": { + "type": "string", + "x-go-name": "Website" } }, "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" - } - }, - "responses": { - "AccessToken": { - "description": "AccessToken represents a API access token.", - "headers": { - "name": { - "type": "string" + }, + "Email": { + "description": "Email an email address belonging to a user", + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" }, - "sha1": { - "type": "string" + "primary": { + "type": "boolean", + "x-go-name": "Primary" + }, + "verified": { + "type": "boolean", + "x-go-name": "Verified" } - } - }, - "AccessTokenList": { - "description": "AccessTokenList represents a list of API access token." + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "GPGKey": { "description": "GPGKey a user GPG key to sign commit and tag in repository", - "headers": { + "type": "object", + "properties": { "can_certify": { - "type": "boolean" + "type": "boolean", + "x-go-name": "CanCertify" }, "can_encrypt_comms": { - "type": "boolean" + "type": "boolean", + "x-go-name": "CanEncryptComms" }, "can_encrypt_storage": { - "type": "boolean" + "type": "boolean", + "x-go-name": "CanEncryptStorage" }, "can_sign": { - "type": "boolean" + "type": "boolean", + "x-go-name": "CanSign" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" }, - "created_at": {}, "emails": { "type": "array", "items": { "$ref": "#/definitions/GPGKeyEmail" - } + }, + "x-go-name": "Emails" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Expires" }, - "expires_at": {}, "id": { "type": "integer", - "format": "int64" + "format": "int64", + "x-go-name": "ID" }, "key_id": { - "type": "string" + "type": "string", + "x-go-name": "KeyID" }, "primary_key_id": { - "type": "string" + "type": "string", + "x-go-name": "PrimaryKeyID" }, "public_key": { - "type": "string" + "type": "string", + "x-go-name": "PublicKey" }, "subkeys": { "type": "array", "items": { - "type": "object" - } + "$ref": "#/definitions/GPGKey" + }, + "x-go-name": "SubsKey" } - } - }, - "GPGKeyList": { - "description": "GPGKeyList represents a list of GPGKey" + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, - "Hook": { - "description": "Hook a hook is a web hook when one repository changed", - "schema": { - "type": "object", - "additionalProperties": { - "type": "string" + "GPGKeyEmail": { + "description": "GPGKeyEmail an email attached to a GPGKey", + "type": "object", + "properties": { + "email": { + "type": "string", + "x-go-name": "Email" + }, + "verified": { + "type": "boolean", + "x-go-name": "Verified" } }, - "headers": { - "active": { - "type": "boolean" + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "Issue": { + "description": "Issue represents an issue in a repository", + "type": "object", + "properties": { + "assignee": { + "$ref": "#/definitions/User" }, - "config": {}, - "created_at": {}, - "events": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "comments": { + "type": "integer", + "format": "int64", + "x-go-name": "Comments" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "labels": { "type": "array", "items": { - "type": "string" - } + "$ref": "#/definitions/Label" + }, + "x-go-name": "Labels" + }, + "milestone": { + "$ref": "#/definitions/Milestone" + }, + "number": { + "type": "integer", + "format": "int64", + "x-go-name": "Index" + }, + "pull_request": { + "$ref": "#/definitions/PullRequestMeta" + }, + "state": { + "$ref": "#/definitions/StateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "IssueLabelsOption": { + "description": "IssueLabelsOption a collection of labels", + "type": "object", + "properties": { + "labels": { + "description": "list of label IDs", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Labels" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "Label": { + "description": "Label a label to an issue or a pr", + "type": "object", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color", + "example": "00aabb" }, "id": { "type": "integer", - "format": "int64" + "format": "int64", + "x-go-name": "ID" }, - "type": { + "name": { + "type": "string", + "x-go-name": "Name" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "MarkdownOption": { + "description": "MarkdownOption markdown options", + "type": "object", + "properties": { + "Context": { + "description": "Context to render\n\nin: body", "type": "string" }, - "updated_at": {} - } + "Mode": { + "description": "Mode to render\n\nin: body", + "type": "string" + }, + "Text": { + "description": "Text markdown to render\n\nin: body", + "type": "string" + }, + "Wiki": { + "description": "Is it a wiki page ?\n\nin: body", + "type": "boolean" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, - "HookList": { - "description": "HookList represents a list of API hook." + "MigrateRepoForm": { + "description": "MigrateRepoForm form for migrating repository", + "type": "object", + "required": [ + "clone_addr", + "uid", + "repo_name" + ], + "properties": { + "auth_password": { + "type": "string", + "x-go-name": "AuthPassword" + }, + "auth_username": { + "type": "string", + "x-go-name": "AuthUsername" + }, + "clone_addr": { + "type": "string", + "x-go-name": "CloneAddr" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "mirror": { + "type": "boolean", + "x-go-name": "Mirror" + }, + "private": { + "type": "boolean", + "x-go-name": "Private" + }, + "repo_name": { + "type": "string", + "x-go-name": "RepoName" + }, + "uid": { + "type": "integer", + "format": "int64", + "x-go-name": "UID" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/auth" }, - "MarkdownRender": { - "description": "MarkdownRender is a rendered markdown document" + "Milestone": { + "description": "Milestone milestone is a collection of issues on one repository", + "type": "object", + "properties": { + "closed_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Closed" + }, + "closed_issues": { + "type": "integer", + "format": "int64", + "x-go-name": "ClosedIssues" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "due_on": { + "type": "string", + "format": "date-time", + "x-go-name": "Deadline" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "open_issues": { + "type": "integer", + "format": "int64", + "x-go-name": "OpenIssues" + }, + "state": { + "$ref": "#/definitions/StateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "Organization": { - "description": "Organization a group of some repositories, users and teams", - "headers": { + "description": "Organization represents an organization", + "type": "object", + "properties": { "avatar_url": { - "type": "string" + "type": "string", + "x-go-name": "AvatarURL" }, "description": { - "type": "string" + "type": "string", + "x-go-name": "Description" }, "full_name": { - "type": "string" + "type": "string", + "x-go-name": "FullName" }, "id": { "type": "integer", - "format": "int64" + "format": "int64", + "x-go-name": "ID" }, "location": { - "type": "string" + "type": "string", + "x-go-name": "Location" }, "username": { - "type": "string" + "type": "string", + "x-go-name": "UserName" }, "website": { - "type": "string" + "type": "string", + "x-go-name": "Website" } - } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "PRBranchInfo": { + "description": "PRBranchInfo information about a branch", + "type": "object", + "properties": { + "label": { + "type": "string", + "x-go-name": "Name" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "repo": { + "$ref": "#/definitions/Repository" + }, + "repo_id": { + "type": "integer", + "format": "int64", + "x-go-name": "RepoID" + }, + "sha": { + "type": "string", + "x-go-name": "Sha" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "PayloadCommit": { + "description": "PayloadCommit represents a commit", + "type": "object", + "properties": { + "author": { + "$ref": "#/definitions/PayloadUser" + }, + "committer": { + "$ref": "#/definitions/PayloadUser" + }, + "id": { + "description": "sha1 hash of the commit", + "type": "string", + "x-go-name": "ID" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "x-go-name": "Timestamp" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "PayloadCommitVerification": { + "description": "PayloadCommitVerification represents the GPG verification of a commit", + "type": "object", + "properties": { + "payload": { + "type": "string", + "x-go-name": "Payload" + }, + "reason": { + "type": "string", + "x-go-name": "Reason" + }, + "signature": { + "type": "string", + "x-go-name": "Signature" + }, + "verified": { + "type": "boolean", + "x-go-name": "Verified" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "PayloadUser": { + "description": "PayloadUser represents the author or committer of a commit", + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "name": { + "description": "Full name of the commit author", + "type": "string", + "x-go-name": "Name" + }, + "username": { + "type": "string", + "x-go-name": "UserName" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "Permission": { + "description": "Permission represents a set of permissions", + "type": "object", + "properties": { + "admin": { + "type": "boolean", + "x-go-name": "Admin" + }, + "pull": { + "type": "boolean", + "x-go-name": "Pull" + }, + "push": { + "type": "boolean", + "x-go-name": "Push" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "PublicKey": { "description": "PublicKey publickey is a user key to push code to repository", - "headers": { - "created_at": {}, + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, "id": { "type": "integer", - "format": "int64" + "format": "int64", + "x-go-name": "ID" }, "key": { - "type": "string" + "type": "string", + "x-go-name": "Key" }, "title": { - "type": "string" + "type": "string", + "x-go-name": "Title" }, "url": { - "type": "string" + "type": "string", + "x-go-name": "URL" } - } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, - "PublicKeyList": { - "description": "PublicKeyList represents a list of PublicKey" + "PullRequest": { + "description": "PullRequest represents a pull request", + "type": "object", + "properties": { + "assignee": { + "$ref": "#/definitions/User" + }, + "base": { + "$ref": "#/definitions/PRBranchInfo" + }, + "body": { + "type": "string", + "x-go-name": "Body" + }, + "comments": { + "type": "integer", + "format": "int64", + "x-go-name": "Comments" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "diff_url": { + "type": "string", + "x-go-name": "DiffURL" + }, + "head": { + "$ref": "#/definitions/PRBranchInfo" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/definitions/Label" + }, + "x-go-name": "Labels" + }, + "merge_base": { + "type": "string", + "x-go-name": "MergeBase" + }, + "merge_commit_sha": { + "type": "string", + "x-go-name": "MergedCommitID" + }, + "mergeable": { + "type": "boolean", + "x-go-name": "Mergeable" + }, + "merged": { + "type": "boolean", + "x-go-name": "HasMerged" + }, + "merged_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Merged" + }, + "merged_by": { + "$ref": "#/definitions/User" + }, + "milestone": { + "$ref": "#/definitions/Milestone" + }, + "number": { + "type": "integer", + "format": "int64", + "x-go-name": "Index" + }, + "patch_url": { + "type": "string", + "x-go-name": "PatchURL" + }, + "state": { + "$ref": "#/definitions/StateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, - "Repository": { - "description": "Repository represents a API repository.", - "schema": { - "$ref": "#/definitions/Permission" + "PullRequestMeta": { + "description": "PullRequestMeta PR info if an issue is a PR", + "type": "object", + "properties": { + "merged": { + "type": "boolean", + "x-go-name": "HasMerged" + }, + "merged_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Merged" + } }, - "headers": { + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "Release": { + "description": "Release represents a repository release", + "type": "object", + "properties": { + "author": { + "$ref": "#/definitions/User" + }, + "body": { + "type": "string", + "x-go-name": "Note" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "CreatedAt" + }, + "draft": { + "type": "boolean", + "x-go-name": "IsDraft" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Title" + }, + "prerelease": { + "type": "boolean", + "x-go-name": "IsPrerelease" + }, + "published_at": { + "type": "string", + "format": "date-time", + "x-go-name": "PublishedAt" + }, + "tag_name": { + "type": "string", + "x-go-name": "TagName" + }, + "tarball_url": { + "type": "string", + "x-go-name": "TarURL" + }, + "target_commitish": { + "type": "string", + "x-go-name": "Target" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "zipball_url": { + "type": "string", + "x-go-name": "ZipURL" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "Repository": { + "description": "Repository represents a repository", + "type": "object", + "properties": { "clone_url": { - "type": "string" + "type": "string", + "x-go-name": "CloneURL" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" }, - "created_at": {}, "default_branch": { - "type": "string" + "type": "string", + "x-go-name": "DefaultBranch" }, "description": { - "type": "string" + "type": "string", + "x-go-name": "Description" }, "empty": { - "type": "boolean" + "type": "boolean", + "x-go-name": "Empty" }, "fork": { - "type": "boolean" + "type": "boolean", + "x-go-name": "Fork" }, "forks_count": { "type": "integer", - "format": "int64" + "format": "int64", + "x-go-name": "Forks" }, "full_name": { - "type": "string" + "type": "string", + "x-go-name": "FullName" }, "html_url": { - "type": "string" + "type": "string", + "x-go-name": "HTMLURL" }, "id": { "type": "integer", - "format": "int64" + "format": "int64", + "x-go-name": "ID" }, "mirror": { - "type": "boolean" + "type": "boolean", + "x-go-name": "Mirror" }, "name": { - "type": "string" + "type": "string", + "x-go-name": "Name" }, "open_issues_count": { "type": "integer", - "format": "int64" + "format": "int64", + "x-go-name": "OpenIssues" + }, + "owner": { + "$ref": "#/definitions/User" + }, + "parent": { + "$ref": "#/definitions/Repository" + }, + "permissions": { + "$ref": "#/definitions/Permission" }, - "owner": {}, - "parent": {}, - "permissions": {}, "private": { - "type": "boolean" + "type": "boolean", + "x-go-name": "Private" }, "size": { "type": "integer", - "format": "int64" + "format": "int64", + "x-go-name": "Size" }, "ssh_url": { - "type": "string" + "type": "string", + "x-go-name": "SSHURL" }, "stars_count": { "type": "integer", - "format": "int64" + "format": "int64", + "x-go-name": "Stars" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" }, - "updated_at": {}, "watchers_count": { "type": "integer", - "format": "int64" + "format": "int64", + "x-go-name": "Watchers" }, "website": { - "type": "string" - } - } - }, - "RepositoryList": { - "description": "RepositoryList represents a list of API repository." - }, - "SearchError": { - "description": "SearchError error of failing search", - "headers": { - "error": { - "type": "string" - }, - "ok": { - "type": "boolean" + "type": "string", + "x-go-name": "Website" } - } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "SearchResults": { - "description": "SearchResults results of search", - "headers": { + "description": "SearchResults results of a successful search", + "type": "object", + "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/Repository" - } + }, + "x-go-name": "Data" }, "ok": { - "type": "boolean" + "type": "boolean", + "x-go-name": "OK" } - } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "ServerVersion": { "description": "ServerVersion wraps the version of the server", - "headers": { - "Version": { - "type": "string" + "type": "object", + "properties": { + "version": { + "type": "string", + "x-go-name": "Version" } - } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "StateType": { + "description": "StateType issue state type", + "type": "string", + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "Status": { + "description": "Status holds a single Status of a single Commit", + "type": "object", + "properties": { + "context": { + "type": "string", + "x-go-name": "Context" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "creator": { + "$ref": "#/definitions/User" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "status": { + "$ref": "#/definitions/StatusState" + }, + "target_url": { + "type": "string", + "x-go-name": "TargetURL" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "StatusState": { + "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"", + "type": "string", + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + }, + "Team": { + "description": "Team represents a team in an organization", + "type": "object", + "properties": { + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "permission": { + "type": "string", + "enum": [ + "none", + "read", + "write", + "admin", + "owner" + ], + "x-go-name": "Permission" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "TrackedTime": { "description": "TrackedTime worked time for an issue / pr", - "headers": { - "created": {}, + "type": "object", + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, "id": { "type": "integer", - "format": "int64" + "format": "int64", + "x-go-name": "ID" }, "issue_id": { "type": "integer", - "format": "int64" + "format": "int64", + "x-go-name": "IssueID" }, "time": { + "description": "Time in seconds", "type": "integer", "format": "int64", - "description": "Time in seconds" + "x-go-name": "Time" }, "user_id": { "type": "integer", - "format": "int64" + "format": "int64", + "x-go-name": "UserID" } - } - }, - "TrackedTimes": { - "description": "TrackedTimes represent a list of tracked times" + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "User": { - "description": "User represents a API user.", - "headers": { + "description": "User represents a user", + "type": "object", + "properties": { "avatar_url": { - "type": "string" + "description": "URL to the user's avatar", + "type": "string", + "x-go-name": "AvatarURL" }, "email": { - "type": "string" + "type": "string", + "format": "email", + "x-go-name": "Email" }, "full_name": { - "type": "string" + "description": "the user's full name", + "type": "string", + "x-go-name": "FullName" }, "id": { + "description": "the user's id", "type": "integer", - "format": "int64" + "format": "int64", + "x-go-name": "ID" }, "login": { - "type": "string" + "description": "the user's username", + "type": "string", + "x-go-name": "UserName" } - } - }, - "UserList": { - "description": "UserList represents a list of API user." + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" }, "WatchInfo": { - "description": "WatchInfo represents a API watch status of one repository", - "schema": { - "type": "object" - }, - "headers": { - "created_at": {}, + "description": "WatchInfo represents an API watch status of one repository", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "CreatedAt" + }, "ignored": { - "type": "boolean" + "type": "boolean", + "x-go-name": "Ignored" + }, + "reason": { + "type": "object", + "x-go-name": "Reason" }, - "reason": {}, "repository_url": { - "type": "string" + "type": "string", + "x-go-name": "RepositoryURL" }, "subscribed": { - "type": "boolean" + "type": "boolean", + "x-go-name": "Subscribed" }, "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + } + }, + "responses": { + "AccessToken": { + "description": "AccessToken represents a API access token.", + "headers": { + "name": { + "type": "string" + }, + "sha1": { "type": "string" } } }, + "AccessTokenList": { + "description": "AccessTokenList represents a list of API access token." + }, + "Branch": { + "schema": { + "$ref": "#/definitions/Branch" + } + }, + "BranchList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Branch" + } + } + }, + "Comment": { + "schema": { + "$ref": "#/definitions/Comment" + } + }, + "CommentList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Comment" + } + } + }, + "DeployKey": { + "schema": { + "$ref": "#/definitions/DeployKey" + } + }, + "DeployKeyList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeployKey" + } + } + }, + "EmailList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Email" + } + } + }, + "GPGKey": { + "schema": { + "$ref": "#/definitions/GPGKey" + } + }, + "GPGKeyList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/GPGKey" + } + } + }, + "Hook": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Branch" + } + } + }, + "HookList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Branch" + } + } + }, + "Issue": { + "schema": { + "$ref": "#/definitions/Issue" + } + }, + "IssueList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Issue" + } + } + }, + "Label": { + "schema": { + "$ref": "#/definitions/Label" + } + }, + "LabelList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Label" + } + } + }, + "MarkdownRender": { + "description": "MarkdownRender is a rendered markdown document" + }, + "Milestone": { + "schema": { + "$ref": "#/definitions/Milestone" + } + }, + "MilestoneList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Milestone" + } + } + }, + "Organization": { + "schema": { + "$ref": "#/definitions/Organization" + } + }, + "OrganizationList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Organization" + } + } + }, + "PublicKey": { + "schema": { + "$ref": "#/definitions/PublicKey" + } + }, + "PublicKeyList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PublicKey" + } + } + }, + "PullRequest": { + "schema": { + "$ref": "#/definitions/PullRequest" + } + }, + "PullRequestList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PullRequest" + } + } + }, + "Release": { + "schema": { + "$ref": "#/definitions/Release" + } + }, + "ReleaseList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Release" + } + } + }, + "Repository": { + "schema": { + "$ref": "#/definitions/Repository" + } + }, + "RepositoryList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Repository" + } + } + }, + "SearchResults": { + "schema": { + "$ref": "#/definitions/SearchResults" + }, + "headers": { + "body": {} + } + }, + "ServerVersion": { + "schema": { + "$ref": "#/definitions/ServerVersion" + } + }, + "Status": { + "schema": { + "$ref": "#/definitions/Status" + } + }, + "StatusList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Status" + } + } + }, + "Team": { + "schema": { + "$ref": "#/definitions/Team" + } + }, + "TeamList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Team" + } + } + }, + "TrackedTime": { + "schema": { + "$ref": "#/definitions/TrackedTime" + } + }, + "TrackedTimeList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/TrackedTime" + } + } + }, + "User": { + "schema": { + "$ref": "#/definitions/User" + } + }, + "UserList": { + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + } + } + }, + "WatchInfo": { + "schema": { + "$ref": "#/definitions/WatchInfo" + } + }, "empty": { "description": "APIEmpty is an empty response" }, @@ -2901,6 +6976,44 @@ "notFound": { "description": "APINotFound is a not found empty response" }, + "parameterBodies": { + "schema": { + "$ref": "#/definitions/MigrateRepoForm" + }, + "headers": { + "AddCollaboratorOption": {}, + "AddTimeOption": {}, + "CreateEmailOption": {}, + "CreateForkOption": {}, + "CreateHookOption": {}, + "CreateIssueCommentOption": {}, + "CreateIssueOption": {}, + "CreateKeyOption": {}, + "CreateLabelOption": {}, + "CreateMilestoneOption": {}, + "CreateOrgOption": {}, + "CreatePullRequestOption": {}, + "CreateReleaseOption": {}, + "CreateRepoOption": {}, + "CreateStatusOption": {}, + "CreateTeamOption": {}, + "CreateUserOption": {}, + "DeleteEmailOption": {}, + "EditHookOption": {}, + "EditIssueCommentOption": {}, + "EditIssueOption": {}, + "EditLabelOption": {}, + "EditMilestoneOption": {}, + "EditOrgOption": {}, + "EditPullRequestOption": {}, + "EditReleaseOption": {}, + "EditTeamOption": {}, + "EditUserOption": {}, + "IssueLabelsOption": {}, + "MarkdownOption": {}, + "MigrateRepoForm": {} + } + }, "redirect": { "description": "APIRedirect is a redirect response" }, |