mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 20:02:09 +00:00
Add API to support link package to repository and unlink it (#33481)
Fix #21062 --------- Co-authored-by: Zettat123 <zettat123@gmail.com> (cherry picked from commit 5df9fd3e9c6ae7f848da65dbe9b9d321f29c003a)
This commit is contained in:
parent
b74a967c92
commit
e09ea821bd
6 changed files with 334 additions and 14 deletions
87
templates/swagger/v1_json.tmpl
generated
87
templates/swagger/v1_json.tmpl
generated
|
@ -4159,6 +4159,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": [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue