mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-10 14:01:54 +02:00
update swagger definitions
This commit is contained in:
parent
17762c25ac
commit
3e45ab677b
236
templates/swagger/v1_json.tmpl
generated
236
templates/swagger/v1_json.tmpl
generated
@ -1655,6 +1655,201 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/groups/{group_id}/teams": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"repository-group"
|
||||
],
|
||||
"summary": "List a repository group's teams",
|
||||
"operationId": "repoGroupListTeams",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "id of the group",
|
||||
"name": "group_id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/TeamList"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/groups/{group_id}/teams/{team}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"repository-group"
|
||||
],
|
||||
"summary": "Check if a team is assigned to a repository group",
|
||||
"operationId": "repoGroupCheckTeam",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "id of the group",
|
||||
"name": "group_id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "team name",
|
||||
"name": "team",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/Team"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"repository-group"
|
||||
],
|
||||
"summary": "Add a team to a repository group",
|
||||
"operationId": "repoGroupAddTeam",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "id of the group",
|
||||
"name": "group_id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "team name",
|
||||
"name": "team",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/CreateOrUpdateRepoGroupTeamOption"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/responses/empty"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
},
|
||||
"422": {
|
||||
"$ref": "#/responses/validationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"repository-group"
|
||||
],
|
||||
"summary": "Add a team to a repository group",
|
||||
"operationId": "repoGroupDeleteTeam",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "id of the group",
|
||||
"name": "group_id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "team name",
|
||||
"name": "team",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/responses/empty"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
},
|
||||
"422": {
|
||||
"$ref": "#/responses/validationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"repository-group"
|
||||
],
|
||||
"summary": "Update a team assigned to a repository group",
|
||||
"operationId": "repoGroupEditTeam",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"description": "id of the group",
|
||||
"name": "group_id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "team name",
|
||||
"name": "team",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/CreateOrUpdateRepoGroupTeamOption"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/responses/empty"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
},
|
||||
"422": {
|
||||
"$ref": "#/responses/validationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/label/templates": {
|
||||
"get": {
|
||||
"produces": [
|
||||
@ -40104,6 +40299,45 @@
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"CreateOrUpdateRepoGroupTeamOption": {
|
||||
"description": "CreateOrUpdateRepoGroupTeamOption options for adding a team to a repo group",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"can_create_in": {
|
||||
"description": "Whether the team can create repositories and subgroups in the group",
|
||||
"type": "boolean",
|
||||
"x-go-name": "CanCreateIn"
|
||||
},
|
||||
"permission": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"read",
|
||||
"write",
|
||||
"admin"
|
||||
],
|
||||
"x-go-enum-desc": "read RepoWritePermissionRead\nwrite RepoWritePermissionWrite\nadmin RepoWritePermissionAdmin",
|
||||
"x-go-name": "Permission"
|
||||
},
|
||||
"units_map": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"x-go-name": "UnitsMap",
|
||||
"example": {
|
||||
"repo.code": "read",
|
||||
"repo.ext_issues": "none",
|
||||
"repo.ext_wiki": "none",
|
||||
"repo.issues": "write",
|
||||
"repo.projects": "none",
|
||||
"repo.pulls": "owner",
|
||||
"repo.releases": "none",
|
||||
"repo.wiki": "admin"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"CreateOrUpdateSecretOption": {
|
||||
"description": "CreateOrUpdateSecretOption options when creating or updating secret",
|
||||
"type": "object",
|
||||
@ -47649,7 +47883,7 @@
|
||||
"parameterBodies": {
|
||||
"description": "parameterBodies",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/MoveGroupOption"
|
||||
"$ref": "#/definitions/CreateOrUpdateRepoGroupTeamOption"
|
||||
}
|
||||
},
|
||||
"redirect": {
|
||||
|
||||
@ -1713,7 +1713,7 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/MoveGroupOption"
|
||||
"$ref": "#/components/schemas/CreateOrUpdateRepoGroupTeamOption"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -4267,6 +4267,38 @@
|
||||
"type": "object",
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"CreateOrUpdateRepoGroupTeamOption": {
|
||||
"description": "CreateOrUpdateRepoGroupTeamOption options for adding a team to a repo group",
|
||||
"properties": {
|
||||
"can_create_in": {
|
||||
"description": "Whether the team can create repositories and subgroups in the group",
|
||||
"type": "boolean",
|
||||
"x-go-name": "CanCreateIn"
|
||||
},
|
||||
"permission": {
|
||||
"$ref": "#/components/schemas/RepoWritePermission"
|
||||
},
|
||||
"units_map": {
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": {
|
||||
"repo.code": "read",
|
||||
"repo.ext_issues": "none",
|
||||
"repo.ext_wiki": "none",
|
||||
"repo.issues": "write",
|
||||
"repo.projects": "none",
|
||||
"repo.pulls": "owner",
|
||||
"repo.releases": "none",
|
||||
"repo.wiki": "admin"
|
||||
},
|
||||
"type": "object",
|
||||
"x-go-name": "UnitsMap"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"CreateOrUpdateSecretOption": {
|
||||
"description": "CreateOrUpdateSecretOption options when creating or updating secret",
|
||||
"properties": {
|
||||
@ -12424,6 +12456,210 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/groups/{group_id}/teams": {
|
||||
"get": {
|
||||
"operationId": "repoGroupListTeams",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "id of the group",
|
||||
"in": "path",
|
||||
"name": "group_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/components/responses/TeamList"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/components/responses/notFound"
|
||||
}
|
||||
},
|
||||
"summary": "List a repository group's teams",
|
||||
"tags": [
|
||||
"repository-group"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/groups/{group_id}/teams/{team}": {
|
||||
"delete": {
|
||||
"operationId": "repoGroupDeleteTeam",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "id of the group",
|
||||
"in": "path",
|
||||
"name": "group_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "team name",
|
||||
"in": "path",
|
||||
"name": "team",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/components/responses/empty"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/components/responses/notFound"
|
||||
},
|
||||
"422": {
|
||||
"$ref": "#/components/responses/validationError"
|
||||
}
|
||||
},
|
||||
"summary": "Add a team to a repository group",
|
||||
"tags": [
|
||||
"repository-group"
|
||||
]
|
||||
},
|
||||
"get": {
|
||||
"operationId": "repoGroupCheckTeam",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "id of the group",
|
||||
"in": "path",
|
||||
"name": "group_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "team name",
|
||||
"in": "path",
|
||||
"name": "team",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/components/responses/Team"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/components/responses/notFound"
|
||||
}
|
||||
},
|
||||
"summary": "Check if a team is assigned to a repository group",
|
||||
"tags": [
|
||||
"repository-group"
|
||||
]
|
||||
},
|
||||
"patch": {
|
||||
"operationId": "repoGroupEditTeam",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "id of the group",
|
||||
"in": "path",
|
||||
"name": "group_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "team name",
|
||||
"in": "path",
|
||||
"name": "team",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CreateOrUpdateRepoGroupTeamOption"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-originalParamName": "body"
|
||||
},
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/components/responses/empty"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/components/responses/notFound"
|
||||
},
|
||||
"422": {
|
||||
"$ref": "#/components/responses/validationError"
|
||||
}
|
||||
},
|
||||
"summary": "Update a team assigned to a repository group",
|
||||
"tags": [
|
||||
"repository-group"
|
||||
]
|
||||
},
|
||||
"put": {
|
||||
"operationId": "repoGroupAddTeam",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "id of the group",
|
||||
"in": "path",
|
||||
"name": "group_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "team name",
|
||||
"in": "path",
|
||||
"name": "team",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CreateOrUpdateRepoGroupTeamOption"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-originalParamName": "body"
|
||||
},
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/components/responses/empty"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/components/responses/notFound"
|
||||
},
|
||||
"422": {
|
||||
"$ref": "#/components/responses/validationError"
|
||||
}
|
||||
},
|
||||
"summary": "Add a team to a repository group",
|
||||
"tags": [
|
||||
"repository-group"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/label/templates": {
|
||||
"get": {
|
||||
"operationId": "listLabelTemplates",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user