diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index bec1272649..86d201a984 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -1,11 +1,9 @@ { "consumes": [ - "application/json", - "text/plain" + "application/json" ], "produces": [ - "application/json", - "text/html" + "application/json" ], "schemes": [ "https", @@ -76,9 +74,17 @@ ], "summary": "Get all runners", "operationId": "getAdminRunners", + "parameters": [ + { + "type": "boolean", + "description": "filter by disabled status (true or false)", + "name": "disabled", + "in": "query" + } + ], "responses": { "200": { - "$ref": "#/definitions/ActionRunnersResponse" + "$ref": "#/responses/RunnerList" }, "400": { "$ref": "#/responses/error" @@ -127,7 +133,7 @@ ], "responses": { "200": { - "$ref": "#/definitions/ActionRunner" + "$ref": "#/responses/Runner" }, "400": { "$ref": "#/responses/error" @@ -166,6 +172,49 @@ "$ref": "#/responses/notFound" } } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "Update a global runner", + "operationId": "updateAdminRunner", + "parameters": [ + { + "type": "string", + "description": "id of the runner", + "name": "runner_id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditActionRunnerOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Runner" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } } }, "/admin/actions/runs": { @@ -1947,11 +1996,17 @@ "name": "org", "in": "path", "required": true + }, + { + "type": "boolean", + "description": "filter by disabled status (true or false)", + "name": "disabled", + "in": "query" } ], "responses": { "200": { - "$ref": "#/definitions/ActionRunnersResponse" + "$ref": "#/responses/RunnerList" }, "400": { "$ref": "#/responses/error" @@ -2016,7 +2071,7 @@ ], "responses": { "200": { - "$ref": "#/definitions/ActionRunner" + "$ref": "#/responses/Runner" }, "400": { "$ref": "#/responses/error" @@ -2062,6 +2117,56 @@ "$ref": "#/responses/notFound" } } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Update an org-level runner", + "operationId": "updateOrgRunner", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "id of the runner", + "name": "runner_id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditActionRunnerOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Runner" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } } }, "/orgs/{org}/actions/runs": { @@ -3528,6 +3633,39 @@ "$ref": "#/responses/notFound" } } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Delete all repositories in an organization", + "operationId": "orgDeleteRepos", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "202": { + "$ref": "#/responses/empty" + }, + "204": { + "$ref": "#/responses/empty" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } } }, "/orgs/{org}/teams": { @@ -3730,6 +3868,7 @@ "rpm", "rubygems", "swift", + "terraform", "vagrant" ], "type": "string", @@ -3807,6 +3946,44 @@ "$ref": "#/responses/notFound" } } + }, + "delete": { + "tags": [ + "package" + ], + "summary": "Delete a package", + "operationId": "deletePackage", + "parameters": [ + { + "type": "string", + "description": "owner of the package", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "type of the package", + "name": "type", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the package", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } } }, "/packages/{owner}/{type}/{name}/-/latest": { @@ -3992,8 +4169,8 @@ "tags": [ "package" ], - "summary": "Delete a package", - "operationId": "deletePackage", + "summary": "Delete a package version", + "operationId": "deletePackageVersion", "parameters": [ { "type": "string", @@ -4872,11 +5049,17 @@ "name": "repo", "in": "path", "required": true + }, + { + "type": "boolean", + "description": "filter by disabled status (true or false)", + "name": "disabled", + "in": "query" } ], "responses": { "200": { - "$ref": "#/definitions/ActionRunnersResponse" + "$ref": "#/responses/RunnerList" }, "400": { "$ref": "#/responses/error" @@ -4928,7 +5111,7 @@ "tags": [ "repository" ], - "summary": "Get an repo-level runner", + "summary": "Get a repo-level runner", "operationId": "getRepoRunner", "parameters": [ { @@ -4955,7 +5138,7 @@ ], "responses": { "200": { - "$ref": "#/definitions/ActionRunner" + "$ref": "#/responses/Runner" }, "400": { "$ref": "#/responses/error" @@ -4972,7 +5155,7 @@ "tags": [ "repository" ], - "summary": "Delete an repo-level runner", + "summary": "Delete a repo-level runner", "operationId": "deleteRepoRunner", "parameters": [ { @@ -5008,6 +5191,63 @@ "$ref": "#/responses/notFound" } } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a repo-level runner", + "operationId": "updateRepoRunner", + "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": "id of the runner", + "name": "runner_id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditActionRunnerOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Runner" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } } }, "/repos/{owner}/{repo}/actions/runs": { @@ -5117,7 +5357,7 @@ "required": true }, { - "type": "string", + "type": "integer", "description": "id of the run", "name": "run", "in": "path", @@ -5233,6 +5473,130 @@ } } }, + "/repos/{owner}/{repo}/actions/runs/{run}/attempts/{attempt}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets a specific workflow run attempt", + "operationId": "getWorkflowRunAttempt", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of the run", + "name": "run", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "logical attempt number of the run", + "name": "attempt", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/WorkflowRun" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/actions/runs/{run}/attempts/{attempt}/jobs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Lists all jobs for a workflow run attempt", + "operationId": "listWorkflowRunAttemptJobs", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of the workflow run", + "name": "run", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "logical attempt number of the run", + "name": "attempt", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/WorkflowJobsList" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, "/repos/{owner}/{repo}/actions/runs/{run}/jobs": { "get": { "produces": [ @@ -5350,6 +5714,9 @@ "404": { "$ref": "#/responses/notFound" }, + "409": { + "$ref": "#/responses/error" + }, "422": { "$ref": "#/responses/validationError" } @@ -5402,6 +5769,61 @@ "404": { "$ref": "#/responses/notFound" }, + "409": { + "$ref": "#/responses/error" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/actions/runs/{run}/rerun-failed-jobs": { + "post": { + "tags": [ + "repository" + ], + "summary": "Reruns all failed jobs in a workflow run", + "operationId": "rerunFailedWorkflowRun", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "id of the run", + "name": "run", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "$ref": "#/responses/empty" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/error" + }, "422": { "$ref": "#/responses/validationError" } @@ -10011,7 +10433,7 @@ } ], "responses": { - "200": { + "204": { "$ref": "#/responses/empty" }, "403": { @@ -10145,6 +10567,7 @@ } }, "patch": { + "description": "Pass `content_version` to enable optimistic locking on body edits.\nIf the version doesn't match the current value, the request fails with 409 Conflict.\n", "consumes": [ "application/json" ], @@ -11750,7 +12173,7 @@ } ], "responses": { - "200": { + "204": { "$ref": "#/responses/empty" }, "403": { @@ -14797,6 +15220,75 @@ } } }, + "/repos/{owner}/{repo}/pulls/{index}/comments/{id}/replies": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Reply to a pull request review comment", + "operationId": "repoCreatePullReviewCommentReply", + "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", + "format": "int64", + "description": "index of the pull request", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the review comment to reply to", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreatePullReviewCommentReplyOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/PullReviewComment" + }, + "400": { + "$ref": "#/responses/validationError" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, "/repos/{owner}/{repo}/pulls/{index}/commits": { "get": { "produces": [ @@ -15026,6 +15518,9 @@ "200": { "$ref": "#/responses/empty" }, + "403": { + "$ref": "#/responses/forbidden" + }, "404": { "$ref": "#/responses/notFound" }, @@ -15262,7 +15757,7 @@ "tags": [ "repository" ], - "summary": "Create a review to an pull request", + "summary": "Create a review to a pull request", "operationId": "repoCreatePullReview", "parameters": [ { @@ -15367,7 +15862,7 @@ "tags": [ "repository" ], - "summary": "Submit a pending review to an pull request", + "summary": "Submit a pending review to a pull request", "operationId": "repoSubmitPullReview", "parameters": [ { @@ -16032,7 +16527,7 @@ }, { "type": "boolean", - "description": "filter (exclude / include) drafts, if you dont have repo write access none will show", + "description": "filter (exclude / include) drafts, if you don't have repo write access none will show", "name": "draft", "in": "query" }, @@ -19191,9 +19686,17 @@ ], "summary": "Get user-level runners", "operationId": "getUserRunners", + "parameters": [ + { + "type": "boolean", + "description": "filter by disabled status (true or false)", + "name": "disabled", + "in": "query" + } + ], "responses": { "200": { - "$ref": "#/definitions/ActionRunnersResponse" + "$ref": "#/responses/RunnerList" }, "400": { "$ref": "#/responses/error" @@ -19212,7 +19715,7 @@ "tags": [ "user" ], - "summary": "Get an user's actions runner registration token", + "summary": "Get a user's actions runner registration token", "operationId": "userCreateRunnerRegistrationToken", "responses": { "200": { @@ -19229,7 +19732,7 @@ "tags": [ "user" ], - "summary": "Get an user-level runner", + "summary": "Get a user-level runner", "operationId": "getUserRunner", "parameters": [ { @@ -19242,7 +19745,7 @@ ], "responses": { "200": { - "$ref": "#/definitions/ActionRunner" + "$ref": "#/responses/Runner" }, "400": { "$ref": "#/responses/error" @@ -19259,7 +19762,7 @@ "tags": [ "user" ], - "summary": "Delete an user-level runner", + "summary": "Delete a user-level runner", "operationId": "deleteUserRunner", "parameters": [ { @@ -19281,6 +19784,49 @@ "$ref": "#/responses/notFound" } } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Update a user-level runner", + "operationId": "updateUserRunner", + "parameters": [ + { + "type": "string", + "description": "id of the runner", + "name": "runner_id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditActionRunnerOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Runner" + }, + "400": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } } }, "/user/actions/runs": { @@ -19760,6 +20306,9 @@ "200": { "$ref": "#/responses/OAuth2Application" }, + "400": { + "$ref": "#/responses/error" + }, "404": { "$ref": "#/responses/notFound" } @@ -21865,6 +22414,10 @@ "type": "boolean", "x-go-name": "Busy" }, + "disabled": { + "type": "boolean", + "x-go-name": "Disabled" + }, "ephemeral": { "type": "boolean", "x-go-name": "Ephemeral" @@ -22295,6 +22848,11 @@ "type": "string", "x-go-name": "Path" }, + "previous_attempt_url": { + "description": "PreviousAttemptURL is the API URL of the previous attempt of this run, e.g. \".../actions/runs/{run_id}/attempts/{attempt-1}\".\nIt is set only when the current attempt is \u003e 1 (i.e. a rerun). For the first attempt, or for legacy runs that pre-date ActionRunAttempt, it is null.", + "type": "string", + "x-go-name": "PreviousAttemptURL" + }, "repository": { "$ref": "#/definitions/Repository" }, @@ -22304,6 +22862,7 @@ "x-go-name": "RepositoryID" }, "run_attempt": { + "description": "RunAttempt is 1-based for runs created after ActionRunAttempt was introduced.\nA value of 0 is a legacy-only sentinel for runs created before attempts existed\nand indicates no corresponding /attempts/{n} resource is available.", "type": "integer", "format": "int64", "x-go-name": "RunAttempt" @@ -22490,12 +23049,14 @@ "type": "object", "properties": { "permission": { + "description": "Permission level to grant the collaborator\nread RepoWritePermissionRead\nwrite RepoWritePermissionWrite\nadmin RepoWritePermissionAdmin", "type": "string", "enum": [ "read", "write", "admin" ], + "x-go-enum-desc": "read RepoWritePermissionRead\nwrite RepoWritePermissionWrite\nadmin RepoWritePermissionAdmin", "x-go-name": "Permission" } }, @@ -23937,6 +24498,11 @@ }, "x-go-name": "Events" }, + "name": { + "description": "Optional human-readable name for the webhook", + "type": "string", + "x-go-name": "Name" + }, "type": { "type": "string", "enum": [ @@ -24025,6 +24591,15 @@ "format": "int64", "x-go-name": "Milestone" }, + "projects": { + "description": "list of project ids", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Projects" + }, "ref": { "type": "string", "x-go-name": "Ref" @@ -24217,13 +24792,14 @@ "x-go-name": "UserName" }, "visibility": { - "description": "possible values are `public` (default), `limited` or `private`", + "description": "possible values are `public` (default), `limited` or `private`\npublic UserVisibilityPublic\nlimited UserVisibilityLimited\nprivate UserVisibilityPrivate", "type": "string", "enum": [ "public", "limited", "private" ], + "x-go-enum-desc": "public UserVisibilityPublic\nlimited UserVisibilityLimited\nprivate UserVisibilityPrivate", "x-go-name": "Visibility" }, "website": { @@ -24390,6 +24966,17 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "CreatePullReviewCommentReplyOptions": { + "description": "CreatePullReviewCommentReplyOptions are options to reply to a pull request review comment", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "CreatePullReviewOptions": { "description": "CreatePullReviewOptions are options to create a pull request review", "type": "object", @@ -24410,7 +24997,16 @@ "x-go-name": "CommitID" }, "event": { - "$ref": "#/definitions/ReviewStateType" + "type": "string", + "enum": [ + "APPROVED", + "PENDING", + "COMMENT", + "REQUEST_CHANGES", + "REQUEST_REVIEW" + ], + "x-go-enum-desc": "APPROVED ReviewStateApproved ReviewStateApproved pr is approved\nPENDING ReviewStatePending ReviewStatePending pr state is pending\nCOMMENT ReviewStateComment ReviewStateComment is a comment review\nREQUEST_CHANGES ReviewStateRequestChanges ReviewStateRequestChanges changes for pr are requested\nREQUEST_REVIEW ReviewStateRequestReview ReviewStateRequestReview review is requested from user", + "x-go-name": "Event" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" @@ -24535,12 +25131,13 @@ "x-go-name": "Name" }, "object_format_name": { - "description": "ObjectFormatName of the underlying git repository, empty string for default (sha1)", + "description": "ObjectFormatName of the underlying git repository, empty string for default (sha1)\nsha1 ObjectFormatSHA1\nsha256 ObjectFormatSHA256", "type": "string", "enum": [ "sha1", "sha256" ], + "x-go-enum-desc": "sha1 ObjectFormatSHA1\nsha256 ObjectFormatSHA256", "x-go-name": "ObjectFormatName" }, "private": { @@ -24693,6 +25290,7 @@ "write", "admin" ], + "x-go-enum-desc": "read RepoWritePermissionRead\nwrite RepoWritePermissionWrite\nadmin RepoWritePermissionAdmin", "x-go-name": "Permission" }, "units": { @@ -24787,8 +25385,14 @@ "x-go-name": "Username" }, "visibility": { - "description": "User visibility level: public, limited, or private", + "description": "User visibility level: public, limited, or private\npublic UserVisibilityPublic\nlimited UserVisibilityLimited\nprivate UserVisibilityPrivate", "type": "string", + "enum": [ + "public", + "limited", + "private" + ], + "x-go-enum-desc": "public UserVisibilityPublic\nlimited UserVisibilityLimited\nprivate UserVisibilityPrivate", "x-go-name": "Visibility" } }, @@ -25002,6 +25606,20 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "EditActionRunnerOption": { + "type": "object", + "title": "EditActionRunnerOption represents the editable fields for a runner.", + "required": [ + "disabled" + ], + "properties": { + "disabled": { + "type": "boolean", + "x-go-name": "Disabled" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "EditAttachmentOptions": { "description": "EditAttachmentOptions options for editing attachments", "type": "object", @@ -25227,6 +25845,11 @@ "type": "string" }, "x-go-name": "Events" + }, + "name": { + "description": "Optional human-readable name", + "type": "string", + "x-go-name": "Name" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" @@ -25265,6 +25888,12 @@ "type": "string", "x-go-name": "Body" }, + "content_version": { + "description": "The current version of the issue content to detect conflicts during editing", + "type": "integer", + "format": "int64", + "x-go-name": "ContentVersion" + }, "due_date": { "type": "string", "format": "date-time", @@ -25275,6 +25904,15 @@ "format": "int64", "x-go-name": "Milestone" }, + "projects": { + "description": "list of project ids to set (replaces existing projects)", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Projects" + }, "ref": { "type": "string", "x-go-name": "Ref" @@ -25344,6 +25982,10 @@ "state": { "description": "State indicates the updated state of the milestone", "type": "string", + "enum": [ + "open", + "closed" + ], "x-go-name": "State" }, "title": { @@ -25364,7 +26006,7 @@ "x-go-name": "Description" }, "email": { - "description": "The email address of the organization", + "description": "The email address of the organization; use empty string to clear", "type": "string", "x-go-name": "Email" }, @@ -25384,13 +26026,14 @@ "x-go-name": "RepoAdminChangeTeamAccess" }, "visibility": { - "description": "possible values are `public`, `limited` or `private`", + "description": "possible values are `public`, `limited` or `private`\npublic UserVisibilityPublic\nlimited UserVisibilityLimited\nprivate UserVisibilityPrivate", "type": "string", "enum": [ "public", "limited", "private" ], + "x-go-enum-desc": "public UserVisibilityPublic\nlimited UserVisibilityLimited\nprivate UserVisibilityPrivate", "x-go-name": "Visibility" }, "website": { @@ -25483,6 +26126,12 @@ "type": "string", "x-go-name": "Body" }, + "content_version": { + "description": "The current version of the pull request content to detect conflicts during editing", + "type": "integer", + "format": "int64", + "x-go-name": "ContentVersion" + }, "due_date": { "type": "string", "format": "date-time", @@ -25813,6 +26462,7 @@ "write", "admin" ], + "x-go-enum-desc": "read RepoWritePermissionRead\nwrite RepoWritePermissionWrite\nadmin RepoWritePermissionAdmin", "x-go-name": "Permission" }, "units": { @@ -25943,8 +26593,14 @@ "x-go-name": "SourceID" }, "visibility": { - "description": "User visibility level: public, limited, or private", + "description": "User visibility level: public, limited, or private\npublic UserVisibilityPublic\nlimited UserVisibilityLimited\nprivate UserVisibilityPrivate", "type": "string", + "enum": [ + "public", + "limited", + "private" + ], + "x-go-enum-desc": "public UserVisibilityPublic\nlimited UserVisibilityLimited\nprivate UserVisibilityPrivate", "x-go-name": "Visibility" }, "website": { @@ -26696,6 +27352,11 @@ "format": "int64", "x-go-name": "ID" }, + "name": { + "description": "Optional human-readable name for the webhook", + "type": "string", + "x-go-name": "Name" + }, "type": { "description": "The type of the webhook (e.g., gitea, slack, discord)", "type": "string", @@ -26783,6 +27444,12 @@ "format": "int64", "x-go-name": "Comments" }, + "content_version": { + "description": "The version of the issue content for optimistic locking", + "type": "integer", + "format": "int64", + "x-go-name": "ContentVersion" + }, "created_at": { "type": "string", "format": "date-time", @@ -26835,6 +27502,13 @@ "format": "int64", "x-go-name": "PinOrder" }, + "projects": { + "type": "array", + "items": { + "$ref": "#/definitions/Project" + }, + "x-go-name": "Projects" + }, "pull_request": { "$ref": "#/definitions/PullRequestMeta" }, @@ -26846,7 +27520,13 @@ "$ref": "#/definitions/RepositoryMeta" }, "state": { - "$ref": "#/definitions/StateType" + "type": "string", + "enum": [ + "open", + "closed" + ], + "x-go-enum-desc": "open StateOpen StateOpen pr is opened\nclosed StateClosed StateClosed pr is closed", + "x-go-name": "State" }, "time_estimate": { "type": "integer", @@ -26947,7 +27627,16 @@ "x-go-name": "ID" }, "type": { - "$ref": "#/definitions/IssueFormFieldType" + "type": "string", + "enum": [ + "markdown", + "textarea", + "input", + "dropdown", + "checkboxes" + ], + "x-go-enum-desc": "markdown IssueFormFieldTypeMarkdown\ntextarea IssueFormFieldTypeTextarea\ninput IssueFormFieldTypeInput\ndropdown IssueFormFieldTypeDropdown\ncheckboxes IssueFormFieldTypeCheckboxes", + "x-go-name": "Type" }, "validations": { "type": "object", @@ -26957,23 +27646,18 @@ "visible": { "type": "array", "items": { - "$ref": "#/definitions/IssueFormFieldVisible" + "type": "string", + "enum": [ + "form", + "content" + ], + "x-go-enum-desc": "form IssueFormFieldVisibleForm\ncontent IssueFormFieldVisibleContent" }, "x-go-name": "Visible" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, - "IssueFormFieldType": { - "type": "string", - "title": "IssueFormFieldType defines issue form field type, can be \"markdown\", \"textarea\", \"input\", \"dropdown\" or \"checkboxes\"", - "x-go-package": "code.gitea.io/gitea/modules/structs" - }, - "IssueFormFieldVisible": { - "description": "IssueFormFieldVisible defines issue form field visible", - "type": "string", - "x-go-package": "code.gitea.io/gitea/modules/structs" - }, "IssueLabelsOption": { "description": "IssueLabelsOption a collection of labels", "type": "object", @@ -27248,10 +27932,14 @@ "description": "MergePullRequestForm form for merging Pull Request", "type": "object", "required": [ - "Do" + "do" ], "properties": { - "Do": { + "delete_branch_after_merge": { + "type": "boolean", + "x-go-name": "DeleteBranchAfterMerge" + }, + "do": { "type": "string", "enum": [ "merge", @@ -27260,20 +27948,8 @@ "squash", "fast-forward-only", "manually-merged" - ] - }, - "MergeCommitID": { - "type": "string" - }, - "MergeMessageField": { - "type": "string" - }, - "MergeTitleField": { - "type": "string" - }, - "delete_branch_after_merge": { - "type": "boolean", - "x-go-name": "DeleteBranchAfterMerge" + ], + "x-go-name": "Do" }, "force_merge": { "type": "boolean", @@ -27283,6 +27959,18 @@ "type": "string", "x-go-name": "HeadCommitID" }, + "merge_commit_id": { + "type": "string", + "x-go-name": "MergeCommitID" + }, + "merge_message_field": { + "type": "string", + "x-go-name": "MergeMessageField" + }, + "merge_title_field": { + "type": "string", + "x-go-name": "MergeTitleField" + }, "merge_when_checks_succeed": { "type": "boolean", "x-go-name": "MergeWhenChecksSucceed" @@ -27471,7 +28159,14 @@ "x-go-name": "OpenIssues" }, "state": { - "$ref": "#/definitions/StateType" + "description": "State indicates if the milestone is open or closed\nopen StateOpen StateOpen pr is opened\nclosed StateClosed StateClosed pr is closed", + "type": "string", + "enum": [ + "open", + "closed" + ], + "x-go-enum-desc": "open StateOpen StateOpen pr is opened\nclosed StateClosed StateClosed pr is closed", + "x-go-name": "State" }, "title": { "description": "Title is the title of the milestone", @@ -27707,7 +28402,15 @@ "x-go-name": "LatestCommentURL" }, "state": { - "$ref": "#/definitions/StateType" + "description": "State indicates the current state of the notification subject\nopen NotifySubjectStateOpen NotifySubjectStateOpen is an open subject\nclosed NotifySubjectStateClosed NotifySubjectStateClosed is a closed subject\nmerged NotifySubjectStateMerged NotifySubjectStateMerged is a merged pull request", + "type": "string", + "enum": [ + "open", + "closed", + "merged" + ], + "x-go-enum-desc": "open NotifySubjectStateOpen NotifySubjectStateOpen is an open subject\nclosed NotifySubjectStateClosed NotifySubjectStateClosed is a closed subject\nmerged NotifySubjectStateMerged NotifySubjectStateMerged is a merged pull request", + "x-go-name": "State" }, "title": { "description": "Title is the title of the notification subject", @@ -27715,7 +28418,16 @@ "x-go-name": "Title" }, "type": { - "$ref": "#/definitions/NotifySubjectType" + "description": "Type indicates the type of the notification subject\nIssue NotifySubjectIssue NotifySubjectIssue a issue is subject of an notification\nPull NotifySubjectPull NotifySubjectPull a pull is subject of an notification\nCommit NotifySubjectCommit NotifySubjectCommit a commit is subject of an notification\nRepository NotifySubjectRepository NotifySubjectRepository a repository is subject of an notification", + "type": "string", + "enum": [ + "Issue", + "Pull", + "Commit", + "Repository" + ], + "x-go-enum-desc": "Issue NotifySubjectIssue NotifySubjectIssue a issue is subject of an notification\nPull NotifySubjectPull NotifySubjectPull a pull is subject of an notification\nCommit NotifySubjectCommit NotifySubjectCommit a commit is subject of an notification\nRepository NotifySubjectRepository NotifySubjectRepository a repository is subject of an notification", + "x-go-name": "Type" }, "url": { "description": "URL is the API URL for the notification subject", @@ -27765,11 +28477,6 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, - "NotifySubjectType": { - "description": "NotifySubjectType represent type of notification subject", - "type": "string", - "x-go-package": "code.gitea.io/gitea/modules/structs" - }, "OAuth2Application": { "type": "object", "title": "OAuth2Application represents an OAuth2 application.", @@ -27873,8 +28580,14 @@ "x-go-name": "UserName" }, "visibility": { - "description": "The visibility level of the organization (public, limited, private)", + "description": "The visibility level of the organization (public, limited, private)\npublic UserVisibilityPublic\nlimited UserVisibilityLimited\nprivate UserVisibilityPrivate", "type": "string", + "enum": [ + "public", + "limited", + "private" + ], + "x-go-enum-desc": "public UserVisibilityPublic\nlimited UserVisibilityLimited\nprivate UserVisibilityPrivate", "x-go-name": "Visibility" }, "website": { @@ -28422,6 +29135,12 @@ "format": "int64", "x-go-name": "Comments" }, + "content_version": { + "description": "The version of the pull request content for optimistic locking", + "type": "integer", + "format": "int64", + "x-go-name": "ContentVersion" + }, "created_at": { "type": "string", "format": "date-time", @@ -28546,7 +29265,14 @@ "x-go-name": "ReviewComments" }, "state": { - "$ref": "#/definitions/StateType" + "description": "The current state of the pull request\nopen StateOpen StateOpen pr is opened\nclosed StateClosed StateClosed pr is closed", + "type": "string", + "enum": [ + "open", + "closed" + ], + "x-go-enum-desc": "open StateOpen StateOpen pr is opened\nclosed StateClosed StateClosed pr is closed", + "x-go-name": "State" }, "title": { "description": "The title of the pull request", @@ -28638,7 +29364,16 @@ "x-go-name": "Stale" }, "state": { - "$ref": "#/definitions/ReviewStateType" + "type": "string", + "enum": [ + "APPROVED", + "PENDING", + "COMMENT", + "REQUEST_CHANGES", + "REQUEST_REVIEW" + ], + "x-go-enum-desc": "APPROVED ReviewStateApproved ReviewStateApproved pr is approved\nPENDING ReviewStatePending ReviewStatePending pr state is pending\nCOMMENT ReviewStateComment ReviewStateComment is a comment review\nREQUEST_CHANGES ReviewStateRequestChanges ReviewStateRequestChanges changes for pr are requested\nREQUEST_REVIEW ReviewStateRequestReview ReviewStateRequestReview review is requested from user", + "x-go-name": "State" }, "submitted_at": { "type": "string", @@ -28980,8 +29715,16 @@ "type": "object", "properties": { "permission": { - "description": "Permission level of the collaborator", + "description": "Permission level of the collaborator\nnone AccessLevelNameNone\nread AccessLevelNameRead\nwrite AccessLevelNameWrite\nadmin AccessLevelNameAdmin\nowner AccessLevelNameOwner", "type": "string", + "enum": [ + "none", + "read", + "write", + "admin", + "owner" + ], + "x-go-enum-desc": "none AccessLevelNameNone\nread AccessLevelNameRead\nwrite AccessLevelNameWrite\nadmin AccessLevelNameAdmin\nowner AccessLevelNameOwner", "x-go-name": "Permission" }, "role_name": { @@ -29258,12 +30001,13 @@ "x-go-name": "Name" }, "object_format_name": { - "description": "ObjectFormatName of the underlying git repository", + "description": "ObjectFormatName of the underlying git repository\nsha1 ObjectFormatSHA1\nsha256 ObjectFormatSHA256", "type": "string", "enum": [ "sha1", "sha256" ], + "x-go-enum-desc": "sha1 ObjectFormatSHA1\nsha256 ObjectFormatSHA256", "x-go-name": "ObjectFormatName" }, "open_issues_count": { @@ -29375,11 +30119,6 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, - "ReviewStateType": { - "description": "ReviewStateType review state type", - "type": "string", - "x-go-package": "code.gitea.io/gitea/modules/structs" - }, "RunDetails": { "description": "RunDetails returns workflow_dispatch runid and url", "type": "object", @@ -29454,11 +30193,6 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, - "StateType": { - "description": "StateType issue state type", - "type": "string", - "x-go-package": "code.gitea.io/gitea/modules/structs" - }, "StopWatch": { "description": "StopWatch represent a running stopwatch", "type": "object", @@ -29512,7 +30246,16 @@ "x-go-name": "Body" }, "event": { - "$ref": "#/definitions/ReviewStateType" + "type": "string", + "enum": [ + "APPROVED", + "PENDING", + "COMMENT", + "REQUEST_CHANGES", + "REQUEST_REVIEW" + ], + "x-go-enum-desc": "APPROVED ReviewStateApproved ReviewStateApproved pr is approved\nPENDING ReviewStatePending ReviewStatePending pr state is pending\nCOMMENT ReviewStateComment ReviewStateComment is a comment review\nREQUEST_CHANGES ReviewStateRequestChanges ReviewStateRequestChanges changes for pr are requested\nREQUEST_REVIEW ReviewStateRequestReview ReviewStateRequestReview review is requested from user", + "x-go-name": "Event" } }, "x-go-package": "code.gitea.io/gitea/modules/structs" @@ -29638,6 +30381,7 @@ "admin", "owner" ], + "x-go-enum-desc": "none AccessLevelNameNone\nread AccessLevelNameRead\nwrite AccessLevelNameWrite\nadmin AccessLevelNameAdmin\nowner AccessLevelNameOwner", "x-go-name": "Permission" }, "units": { @@ -30184,8 +30928,14 @@ "x-go-name": "StarredRepos" }, "visibility": { - "description": "User visibility level option: public, limited, private", + "description": "User visibility level option: public, limited, private\npublic UserVisibilityPublic\nlimited UserVisibilityLimited\nprivate UserVisibilityPrivate", "type": "string", + "enum": [ + "public", + "limited", + "private" + ], + "x-go-enum-desc": "public UserVisibilityPublic\nlimited UserVisibilityLimited\nprivate UserVisibilityPrivate", "x-go-name": "Visibility" }, "website": { diff --git a/templates/swagger/v1_openapi3_json.tmpl b/templates/swagger/v1_openapi3_json.tmpl index 33adff75e0..687e08b832 100644 --- a/templates/swagger/v1_openapi3_json.tmpl +++ b/templates/swagger/v1_openapi3_json.tmpl @@ -980,6 +980,52 @@ }, "description": "PackageList" }, + "Project": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + }, + "description": "Project" + }, + "ProjectColumn": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectColumn" + } + } + }, + "description": "ProjectColumn" + }, + "ProjectColumnList": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ProjectColumn" + }, + "type": "array" + } + } + }, + "description": "ProjectColumnList" + }, + "ProjectList": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Project" + }, + "type": "array" + } + } + }, + "description": "ProjectList" + }, "PublicKey": { "content": { "application/json": { @@ -1690,7 +1736,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LockIssueOption" + "$ref": "#/components/schemas/MoveProjectIssueOption" } } }, @@ -4317,6 +4363,53 @@ "type": "object", "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "CreateProjectColumnOption": { + "description": "CreateProjectColumnOption represents options for creating a project column", + "properties": { + "color": { + "description": "Column color in 6-digit hex format, e.g. #FF0000", + "type": "string", + "x-go-name": "Color" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "required": [ + "title" + ], + "type": "object", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateProjectOption": { + "description": "CreateProjectOption represents options for creating a project", + "properties": { + "card_type": { + "description": "Card type: \"text_only\" or \"images_and_text\"", + "type": "string", + "x-go-name": "CardType" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "template_type": { + "description": "Template type: \"none\", \"basic_kanban\" or \"bug_triage\"", + "type": "string", + "x-go-name": "TemplateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "required": [ + "title" + ], + "type": "object", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "CreatePullRequestOption": { "description": "CreatePullRequestOption options when creating a pull request", "properties": { @@ -5476,6 +5569,50 @@ "type": "object", "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "EditProjectColumnOption": { + "description": "EditProjectColumnOption represents options for editing a project column", + "properties": { + "color": { + "description": "Column color in 6-digit hex format, e.g. #FF0000", + "type": "string", + "x-go-name": "Color" + }, + "sorting": { + "format": "int64", + "type": "integer", + "x-go-name": "Sorting" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "type": "object", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditProjectOption": { + "description": "EditProjectOption represents options for editing a project", + "properties": { + "card_type": { + "description": "Card type: \"text_only\" or \"images_and_text\"", + "type": "string", + "x-go-name": "CardType" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "state": { + "$ref": "#/components/schemas/StateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + } + }, + "type": "object", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "EditPullRequestOption": { "description": "EditPullRequestOption options when modify pull request", "properties": { @@ -7562,6 +7699,28 @@ "type": "object", "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "MoveProjectIssueOption": { + "description": "MoveProjectIssueOption represents options for moving an issue between columns", + "properties": { + "column_id": { + "description": "Target column to move the issue into", + "format": "int64", + "type": "integer", + "x-go-name": "ColumnID" + }, + "sorting": { + "description": "Optional sorting position within the target column", + "format": "int64", + "type": "integer", + "x-go-name": "Sorting" + } + }, + "required": [ + "column_id" + ], + "type": "object", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "NewIssuePinsAllowed": { "description": "NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed", "properties": { @@ -8256,61 +8415,139 @@ "x-go-package": "code.gitea.io/gitea/modules/structs" }, "Project": { - "description": "Project represents a project", + "description": "Gitea projects can only contain issues — note cards and pull requests are\nnot modeled as project items.", "properties": { + "card_type": { + "description": "Card type: \"text_only\" or \"images_and_text\"", + "type": "string", + "x-go-name": "CardType" + }, "closed_at": { "format": "date-time", "type": "string", - "x-go-name": "Closed" + "x-go-name": "ClosedAt" }, "created_at": { "format": "date-time", "type": "string", - "x-go-name": "Created" + "x-go-name": "CreatedAt" }, - "creator_id": { - "description": "CreatorID is the user who created the project", - "format": "int64", - "type": "integer", - "x-go-name": "CreatorID" + "creator": { + "$ref": "#/components/schemas/User" }, "description": { - "description": "Description provides details about the project", "type": "string", "x-go-name": "Description" }, + "html_url": { + "format": "uri", + "type": "string", + "x-go-name": "HTMLURL" + }, "id": { - "description": "ID is the unique identifier for the project", "format": "int64", "type": "integer", "x-go-name": "ID" }, - "is_closed": { - "description": "IsClosed indicates if the project is closed", - "type": "boolean", - "x-go-name": "IsClosed" + "num_closed_issues": { + "format": "int64", + "type": "integer", + "x-go-name": "NumClosedIssues" + }, + "num_issues": { + "format": "int64", + "type": "integer", + "x-go-name": "NumIssues" + }, + "num_open_issues": { + "format": "int64", + "type": "integer", + "x-go-name": "NumOpenIssues" }, "owner_id": { - "description": "OwnerID is the owner of the project (for org-level projects)", "format": "int64", "type": "integer", "x-go-name": "OwnerID" }, "repo_id": { - "description": "RepoID is the repository this project belongs to (for repo-level projects)", "format": "int64", "type": "integer", "x-go-name": "RepoID" }, + "state": { + "$ref": "#/components/schemas/StateType" + }, + "template_type": { + "description": "Template type: \"none\", \"basic_kanban\" or \"bug_triage\"", + "type": "string", + "x-go-name": "TemplateType" + }, + "title": { + "type": "string", + "x-go-name": "Title" + }, + "type": { + "description": "Project type: \"individual\", \"repository\" or \"organization\"", + "type": "string", + "x-go-name": "Type" + }, + "updated_at": { + "format": "date-time", + "type": "string", + "x-go-name": "UpdatedAt" + } + }, + "title": "Project represents a project.", + "type": "object", + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ProjectColumn": { + "description": "ProjectColumn represents a project column (board)", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color" + }, + "created_at": { + "format": "date-time", + "type": "string", + "x-go-name": "CreatedAt" + }, + "creator": { + "$ref": "#/components/schemas/User" + }, + "default": { + "type": "boolean", + "x-go-name": "Default" + }, + "id": { + "format": "int64", + "type": "integer", + "x-go-name": "ID" + }, + "num_issues": { + "format": "int64", + "type": "integer", + "x-go-name": "NumIssues" + }, + "project_id": { + "format": "int64", + "type": "integer", + "x-go-name": "ProjectID" + }, + "sorting": { + "format": "int64", + "type": "integer", + "x-go-name": "Sorting" + }, "title": { - "description": "Title is the title of the project", "type": "string", "x-go-name": "Title" }, "updated_at": { "format": "date-time", "type": "string", - "x-go-name": "Updated" + "x-go-name": "UpdatedAt" } }, "type": "object", @@ -25509,6 +25746,821 @@ ] } }, + "/repos/{owner}/{repo}/projects": { + "get": { + "description": "Gitea projects only contain issues — note cards and pull requests are not modeled as project items.", + "operationId": "repoListProjects", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "State of the project (open, closed, all)", + "in": "query", + "name": "state", + "schema": { + "default": "open", + "enum": [ + "open", + "closed", + "all" + ], + "type": "string" + } + }, + { + "description": "page number of results", + "in": "query", + "name": "page", + "schema": { + "type": "integer" + } + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ProjectList" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "List projects in a repository", + "tags": [ + "repository" + ] + }, + "post": { + "operationId": "repoCreateProject", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateProjectOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "201": { + "$ref": "#/components/responses/Project" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Create a new project", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/{repo}/projects/{id}": { + "delete": { + "operationId": "repoDeleteProject", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the project", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/empty" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Delete a project", + "tags": [ + "repository" + ] + }, + "get": { + "description": "Gitea projects only contain issues — note cards and pull requests are not modeled as project items.", + "operationId": "repoGetProject", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the project", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Project" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Get a single project", + "tags": [ + "repository" + ] + }, + "patch": { + "operationId": "repoEditProject", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the project", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditProjectOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "200": { + "$ref": "#/components/responses/Project" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Edit a project", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/{repo}/projects/{id}/columns": { + "get": { + "operationId": "repoListProjectColumns", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the project", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "schema": { + "type": "integer" + } + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/ProjectColumnList" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "List columns in a project", + "tags": [ + "repository" + ] + }, + "post": { + "operationId": "repoCreateProjectColumn", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the project", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateProjectColumnOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "201": { + "$ref": "#/components/responses/ProjectColumn" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Create a new column in a project", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/{repo}/projects/{id}/columns/{column_id}": { + "delete": { + "operationId": "repoDeleteProjectColumn", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the project", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "id of the column", + "in": "path", + "name": "column_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/empty" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Delete a project column", + "tags": [ + "repository" + ] + }, + "patch": { + "operationId": "repoEditProjectColumn", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the project", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "id of the column", + "in": "path", + "name": "column_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditProjectColumnOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "200": { + "$ref": "#/components/responses/ProjectColumn" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Edit a project column", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/{repo}/projects/{id}/columns/{column_id}/issues": { + "get": { + "description": "Gitea projects only contain issues — note cards and pull requests are not modeled as project items.", + "operationId": "repoListProjectColumnIssues", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the project", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "id of the column", + "in": "path", + "name": "column_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "schema": { + "type": "integer" + } + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/IssueList" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "List issues in a project column", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/{repo}/projects/{id}/columns/{column_id}/issues/{issue_id}": { + "delete": { + "operationId": "repoRemoveIssueFromProjectColumn", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the project", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "id of the column", + "in": "path", + "name": "column_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "id of the issue", + "in": "path", + "name": "issue_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/empty" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Remove an issue from a project column", + "tags": [ + "repository" + ] + }, + "post": { + "description": "Gitea projects only contain issues — note cards and pull requests cannot be added.", + "operationId": "repoAddIssueToProjectColumn", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the project", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "id of the column", + "in": "path", + "name": "column_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "id of the issue", + "in": "path", + "name": "issue_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], + "responses": { + "201": { + "$ref": "#/components/responses/empty" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Add an issue to a project column", + "tags": [ + "repository" + ] + } + }, + "/repos/{owner}/{repo}/projects/{id}/issues/{issue_id}/move": { + "post": { + "description": "Atomically moves an existing project issue into a different column, optionally setting its sorting position.", + "operationId": "repoMoveProjectIssue", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the project", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + }, + { + "description": "id of the issue", + "in": "path", + "name": "issue_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MoveProjectIssueOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "204": { + "$ref": "#/components/responses/empty" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Move an issue between columns of a project", + "tags": [ + "repository" + ] + } + }, "/repos/{owner}/{repo}/pulls": { "get": { "operationId": "repoListPullRequests",