aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/structs/repo_collaborator.go1
-rw-r--r--templates/swagger/v1_json.tmpl5
2 files changed, 6 insertions, 0 deletions
diff --git a/modules/structs/repo_collaborator.go b/modules/structs/repo_collaborator.go
index 946a6ec7e7..7d39b5a798 100644
--- a/modules/structs/repo_collaborator.go
+++ b/modules/structs/repo_collaborator.go
@@ -5,6 +5,7 @@ package structs
// AddCollaboratorOption options when adding a user as a collaborator of a repository
type AddCollaboratorOption struct {
+ // enum: read,write,admin
Permission *string `json:"permission"`
}
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 18b9cdab3a..bfaa86428c 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -18484,6 +18484,11 @@
"properties": {
"permission": {
"type": "string",
+ "enum": [
+ "read",
+ "write",
+ "admin"
+ ],
"x-go-name": "Permission"
}
},