summaryrefslogtreecommitdiffstats
path: root/templates/swagger
diff options
context:
space:
mode:
Diffstat (limited to 'templates/swagger')
-rw-r--r--templates/swagger/v1_json.tmpl70
1 files changed, 70 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index d57a3a580b..3e4813f22c 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -3129,6 +3129,52 @@
}
}
},
+ "/repos/{owner}/{repo}/collaborators/{collaborator}/permission": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "repository"
+ ],
+ "summary": "Get repository permissions for a user",
+ "operationId": "repoGetRepoPermissions",
+ "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": "username of the collaborator",
+ "name": "collaborator",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/RepoCollaboratorPermission"
+ },
+ "403": {
+ "$ref": "#/responses/forbidden"
+ },
+ "404": {
+ "$ref": "#/responses/notFound"
+ }
+ }
+ }
+ },
"/repos/{owner}/{repo}/commits": {
"get": {
"produces": [
@@ -17451,6 +17497,24 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "RepoCollaboratorPermission": {
+ "description": "RepoCollaboratorPermission to get repository permission for a collaborator",
+ "type": "object",
+ "properties": {
+ "permission": {
+ "type": "string",
+ "x-go-name": "Permission"
+ },
+ "role_name": {
+ "type": "string",
+ "x-go-name": "RoleName"
+ },
+ "user": {
+ "$ref": "#/definitions/User"
+ }
+ },
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"RepoCommit": {
"type": "object",
"title": "RepoCommit contains information of a commit in the context of a repository.",
@@ -19126,6 +19190,12 @@
}
}
},
+ "RepoCollaboratorPermission": {
+ "description": "RepoCollaboratorPermission",
+ "schema": {
+ "$ref": "#/definitions/RepoCollaboratorPermission"
+ }
+ },
"Repository": {
"description": "Repository",
"schema": {