0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-07 07:05:07 +02:00

fix swagger comments in repo adoption routes

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-11-22 17:31:57 -05:00
parent 3c9dc0daf4
commit d2b13f7749
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C
3 changed files with 16 additions and 166 deletions

View File

@ -125,7 +125,7 @@ func AdoptRepository(ctx *context.APIContext) {
}
func AdoptGroupRepository(ctx *context.APIContext) {
// swagger:operation POST /admin/unadopted/{owner}/{group_id}/{repo} admin adminAdoptRepository
// swagger:operation POST /admin/unadopted/{owner}/group/{group_id}/{repo} admin adminAdoptRepositoryInGroup
// ---
// summary: Adopt unadopted files as a repository
// produces:
@ -141,6 +141,12 @@ func AdoptGroupRepository(ctx *context.APIContext) {
// description: name of the repo
// type: string
// required: true
// - name: group_id
// in: path
// description: group ID of the repo
// type: integer
// format: int64
// required: true
// responses:
// "204":
// "$ref": "#/responses/empty"
@ -217,7 +223,7 @@ func DeleteUnadoptedRepository(ctx *context.APIContext) {
}
func DeleteUnadoptedRepositoryInGroup(ctx *context.APIContext) {
// swagger:operation DELETE /admin/unadopted/{owner}/{group_id}/{repo} admin adminDeleteUnadoptedRepository
// swagger:operation DELETE /admin/unadopted/{owner}/group/{group_id}/{repo} admin adminDeleteUnadoptedRepositoryInGroup
// ---
// summary: Delete unadopted files
// produces:
@ -233,6 +239,12 @@ func DeleteUnadoptedRepositoryInGroup(ctx *context.APIContext) {
// description: name of the repo
// type: string
// required: true
// - name: group_id
// in: path
// description: group ID of the repo
// type: integer
// format: int64
// required: true
// responses:
// "204":
// "$ref": "#/responses/empty"

View File

@ -1,94 +1,5 @@
{
"paths": {
"/admin/unadopted/{owner}/group/{group_id}/{repo}": {
"delete": {
"operationId": "adminDeleteUnadoptedRepository",
"parameters": [
{
"description": "owner of the repo",
"in": "path",
"name": "owner",
"required": true,
"type": "string"
},
{
"description": "name of the repo",
"in": "path",
"name": "repo",
"required": true,
"type": "string"
},
{
"description": "group ID of the repo",
"format": "int64",
"in": "path",
"name": "group_id",
"required": true,
"type": "integer"
}
],
"produces": [
"application/json"
],
"responses": {
"204": {
"$ref": "#/responses/empty"
},
"403": {
"$ref": "#/responses/forbidden"
}
},
"summary": "Delete unadopted files",
"tags": [
"admin"
]
},
"post": {
"operationId": "adminAdoptRepository",
"parameters": [
{
"description": "owner of the repo",
"in": "path",
"name": "owner",
"required": true,
"type": "string"
},
{
"description": "name of the repo",
"in": "path",
"name": "repo",
"required": true,
"type": "string"
},
{
"description": "group ID of the repo",
"format": "int64",
"in": "path",
"name": "group_id",
"required": true,
"type": "integer"
}
],
"produces": [
"application/json"
],
"responses": {
"204": {
"$ref": "#/responses/empty"
},
"403": {
"$ref": "#/responses/forbidden"
},
"404": {
"$ref": "#/responses/notFound"
}
},
"summary": "Adopt unadopted files as a repository",
"tags": [
"admin"
]
}
},
"/repos/{owner}/group/{group_id}/{repo}": {
"delete": {
"operationId": "repoDelete",

View File

@ -662,7 +662,7 @@
"admin"
],
"summary": "Adopt unadopted files as a repository",
"operationId": "adminAdoptRepositoryMixin0",
"operationId": "adminAdoptRepositoryInGroup",
"parameters": [
{
"type": "string",
@ -707,7 +707,7 @@
"admin"
],
"summary": "Delete unadopted files",
"operationId": "adminDeleteUnadoptedRepositoryMixin0",
"operationId": "adminDeleteUnadoptedRepositoryInGroup",
"parameters": [
{
"type": "string",
@ -742,79 +742,6 @@
}
}
},
"/admin/unadopted/{owner}/{group_id}/{repo}": {
"post": {
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Adopt unadopted files as a repository",
"operationId": "adminAdoptRepository",
"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"
},
"403": {
"$ref": "#/responses/forbidden"
},
"404": {
"$ref": "#/responses/notFound"
}
}
},
"delete": {
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Delete unadopted files",
"operationId": "adminDeleteUnadoptedRepository",
"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"
},
"403": {
"$ref": "#/responses/forbidden"
}
}
}
},
"/admin/unadopted/{owner}/{repo}": {
"post": {
"produces": [