diff --git a/static/openapi3-latest.json b/static/openapi3-latest.json index 009a8639..e87aaf43 100644 --- a/static/openapi3-latest.json +++ b/static/openapi3-latest.json @@ -3973,6 +3973,26 @@ "type": "object", "x-go-package": "gitea.dev/modules/structs" }, + "CreateDeployKeyTokenOption": { + "properties": { + "read_only": { + "description": "Describe if the token has only read access or read/write", + "type": "boolean", + "x-go-name": "ReadOnly" + }, + "title": { + "description": "Title of the token to add", + "type": "string", + "uniqueItems": true, + "x-go-name": "Title" + } + }, + "required": [ + "title" + ], + "type": "object", + "x-go-package": "gitea.dev/modules/structs" + }, "CreateEmailOption": { "description": "CreateEmailOption options when creating email addresses", "properties": { @@ -4227,7 +4247,6 @@ "x-go-package": "gitea.dev/modules/structs" }, "CreateKeyOption": { - "description": "CreateKeyOption options when creating a key", "properties": { "key": { "description": "An armored SSH key to add", @@ -5195,10 +5214,9 @@ "x-go-package": "gitea.dev/modules/structs" }, "DeployKey": { - "description": "DeployKey a deploy key", "properties": { "created_at": { - "description": "Created is the time when the deploy key was added", + "description": "Created is the time when the deploy-key was added", "format": "date-time", "type": "string", "x-go-name": "Created" @@ -5209,7 +5227,7 @@ "x-go-name": "Fingerprint" }, "id": { - "description": "ID is the unique identifier for the deploy key", + "description": "ID is the unique identifier for the deploy-key", "format": "int64", "type": "integer", "x-go-name": "ID" @@ -5225,6 +5243,15 @@ "type": "integer", "x-go-name": "KeyID" }, + "key_type": { + "description": "Type tells whether the key authenticates over SSH or with a token over HTTPS", + "enum": [ + "ssh", + "token" + ], + "type": "string", + "x-go-name": "KeyType" + }, "read_only": { "description": "ReadOnly indicates if the key has read-only access", "type": "boolean", @@ -5238,8 +5265,13 @@ "type": "string", "x-go-name": "Title" }, + "token": { + "description": "Token is the plaintext token of an HTTPS key, only returned when it is created", + "type": "string", + "x-go-name": "Token" + }, "url": { - "description": "URL is the API URL for this deploy key", + "description": "URL is the API URL for this deploy-key", "format": "uri", "type": "string", "x-go-name": "URL" @@ -26543,6 +26575,56 @@ ] } }, + "/repos/{owner}/{repo}/keys/tokens": { + "post": { + "operationId": "repoCreateDeployToken", + "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/CreateDeployKeyTokenOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "201": { + "$ref": "#/components/responses/DeployKey" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Add a deploy token to a repository, it authenticates git over HTTPS", + "tags": [ + "repository" + ] + } + }, "/repos/{owner}/{repo}/keys/{id}": { "delete": { "operationId": "repoDeleteKey", diff --git a/static/swagger-latest.json b/static/swagger-latest.json index be5e3d7f..1f207409 100644 --- a/static/swagger-latest.json +++ b/static/swagger-latest.json @@ -14457,6 +14457,55 @@ } } }, + "/repos/{owner}/{repo}/keys/tokens": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a deploy token to a repository, it authenticates git over HTTPS", + "operationId": "repoCreateDeployToken", + "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/CreateDeployKeyTokenOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/DeployKey" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, "/repos/{owner}/{repo}/keys/{id}": { "get": { "produces": [ @@ -26937,6 +26986,26 @@ }, "x-go-package": "gitea.dev/modules/structs" }, + "CreateDeployKeyTokenOption": { + "type": "object", + "required": [ + "title" + ], + "properties": { + "read_only": { + "description": "Describe if the token has only read access or read/write", + "type": "boolean", + "x-go-name": "ReadOnly" + }, + "title": { + "description": "Title of the token to add", + "type": "string", + "uniqueItems": true, + "x-go-name": "Title" + } + }, + "x-go-package": "gitea.dev/modules/structs" + }, "CreateEmailOption": { "description": "CreateEmailOption options when creating email addresses", "type": "object", @@ -27190,7 +27259,6 @@ "x-go-package": "gitea.dev/modules/structs" }, "CreateKeyOption": { - "description": "CreateKeyOption options when creating a key", "type": "object", "required": [ "title", @@ -28186,11 +28254,10 @@ "x-go-package": "gitea.dev/modules/structs" }, "DeployKey": { - "description": "DeployKey a deploy key", "type": "object", "properties": { "created_at": { - "description": "Created is the time when the deploy key was added", + "description": "Created is the time when the deploy-key was added", "type": "string", "format": "date-time", "x-go-name": "Created" @@ -28201,7 +28268,7 @@ "x-go-name": "Fingerprint" }, "id": { - "description": "ID is the unique identifier for the deploy key", + "description": "ID is the unique identifier for the deploy-key", "type": "integer", "format": "int64", "x-go-name": "ID" @@ -28217,6 +28284,15 @@ "format": "int64", "x-go-name": "KeyID" }, + "key_type": { + "description": "Type tells whether the key authenticates over SSH or with a token over HTTPS", + "type": "string", + "enum": [ + "ssh", + "token" + ], + "x-go-name": "KeyType" + }, "read_only": { "description": "ReadOnly indicates if the key has read-only access", "type": "boolean", @@ -28230,8 +28306,13 @@ "type": "string", "x-go-name": "Title" }, + "token": { + "description": "Token is the plaintext token of an HTTPS key, only returned when it is created", + "type": "string", + "x-go-name": "Token" + }, "url": { - "description": "URL is the API URL for this deploy key", + "description": "URL is the API URL for this deploy-key", "type": "string", "x-go-name": "URL" }