aboutsummaryrefslogtreecommitdiffstats
path: root/templates/swagger
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2025-02-16 19:18:00 -0800
committerGitHub <noreply@github.com>2025-02-16 19:18:00 -0800
commit5df9fd3e9c6ae7f848da65dbe9b9d321f29c003a (patch)
tree11179814c0b4554566d259d2d99b24d65e8945ea /templates/swagger
parent50a5d6bf5d57c0990896c8cc876fc96647608077 (diff)
downloadgitea-5df9fd3e9c6ae7f848da65dbe9b9d321f29c003a.tar.gz
gitea-5df9fd3e9c6ae7f848da65dbe9b9d321f29c003a.zip
Add API to support link package to repository and unlink it (#33481)
Fix #21062 --------- Co-authored-by: Zettat123 <zettat123@gmail.com>
Diffstat (limited to 'templates/swagger')
-rw-r--r--templates/swagger/v1_json.tmpl87
1 files changed, 87 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 091ede2ff9..d173f3161b 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -3339,6 +3339,93 @@
}
}
},
+ "/packages/{owner}/{type}/{name}/-/link/{repo_name}": {
+ "post": {
+ "tags": [
+ "package"
+ ],
+ "summary": "Link a package to a repository",
+ "operationId": "linkPackage",
+ "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
+ },
+ {
+ "type": "string",
+ "description": "name of the repository to link.",
+ "name": "repo_name",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
+ "/packages/{owner}/{type}/{name}/-/unlink": {
+ "post": {
+ "tags": [
+ "package"
+ ],
+ "summary": "Unlink a package from a repository",
+ "operationId": "unlinkPackage",
+ "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": {
+ "201": {
+ "$ref": "#/responses/empty"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
"/packages/{owner}/{type}/{name}/{version}": {
"get": {
"produces": [