summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-02-01 22:57:12 +0100
committerGitHub <noreply@github.com>2021-02-01 22:57:12 +0100
commit6d27703f143b5f295f0ceff96fe6d98f5c8c5514 (patch)
tree6f4916b7c62c78a66e4b3ef6b274e4f958285b95 /templates
parenta9188631b90da523d92866796341be8fdc77281c (diff)
downloadgitea-6d27703f143b5f295f0ceff96fe6d98f5c8c5514.tar.gz
gitea-6d27703f143b5f295f0ceff96fe6d98f5c8c5514.zip
[API] List, Check, Add & delete endpoints for repository teams (#13630)
* List, Check, Add & delete endpoints for repository teams * return units on single team responce too * Add Tests
Diffstat (limited to 'templates')
-rw-r--r--templates/swagger/v1_json.tmpl167
1 files changed, 167 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 8c2b5948ea..36c1c43a00 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -8803,6 +8803,173 @@
}
}
},
+ "/repos/{owner}/{repo}/teams": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "List a repository's teams",
+ "operationId": "repoListTeams",
+ "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": {
+ "200": {
+ "$ref": "#/responses/TeamList"
+ }
+ }
+ }
+ },
+ "/repos/{owner}/{repo}/teams/{team}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Check if a team is assigned to a repository",
+ "operationId": "repoCheckTeam",
+ "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
+ },
+ {
+ "type": "string",
+ "description": "team name",
+ "name": "team",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/Team"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ },
+ "405": {
+ "$ref": "#/responses/error"
+ }
+ }
+ },
+ "put": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Add a team to a repository",
+ "operationId": "repoAddTeam",
+ "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
+ },
+ {
+ "type": "string",
+ "description": "team name",
+ "name": "team",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "405": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ },
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Delete a team from a repository",
+ "operationId": "repoDeleteTeam",
+ "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
+ },
+ {
+ "type": "string",
+ "description": "team name",
+ "name": "team",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ },
+ "405": {
+ "$ref": "#/responses/error"
+ },
+ "422": {
+ "$ref": "#/responses/validationError"
+ }
+ }
+ }
+ },
"/repos/{owner}/{repo}/times": {
"get": {
"produces": [