aboutsummaryrefslogtreecommitdiffstats
path: root/templates/swagger
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2023-08-15 20:32:43 +0800
committerGitHub <noreply@github.com>2023-08-15 14:32:43 +0200
commit79d74d208fe5cf9a5cdcb701cc48f115569a96d0 (patch)
treeab709779eb68ad389bde6bc8b61827e274835479 /templates/swagger
parentd317c983bc877d3286f9dc3decb53d534a56a6d0 (diff)
downloadgitea-79d74d208fe5cf9a5cdcb701cc48f115569a96d0.tar.gz
gitea-79d74d208fe5cf9a5cdcb701cc48f115569a96d0.zip
Add API route to list org secrets (#26485)
- Add a new function `CountOrgSecrets` in the file `models/secret/secret.go` - Add a new file `modules/structs/secret.go` - Add a new function `ListActionsSecrets` in the file `routers/api/v1/api.go` - Add a new file `routers/api/v1/org/action.go` - Add a new function `listActionsSecrets` in the file `routers/api/v1/org/action.go` go-sdk: https://gitea.com/gitea/go-sdk/pulls/629 --------- Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'templates/swagger')
-rw-r--r--templates/swagger/v1_json.tmpl64
1 files changed, 64 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index a5bea8a4cb..da43c530af 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -1550,6 +1550,44 @@
}
}
},
+ "/orgs/{org}/actions/secrets": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "organization"
+ ],
+ "summary": "List an organization's actions secrets",
+ "operationId": "orgListActionsSecrets",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "name of the organization",
+ "name": "org",
+ "in": "path",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results",
+ "name": "limit",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/SecretList"
+ }
+ }
+ }
+ },
"/orgs/{org}/activities/feeds": {
"get": {
"produces": [
@@ -21291,6 +21329,23 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "Secret": {
+ "description": "User represents a secret",
+ "type": "object",
+ "properties": {
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "x-go-name": "Created"
+ },
+ "name": {
+ "description": "the secret's name",
+ "type": "string",
+ "x-go-name": "Name"
+ }
+ },
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"ServerVersion": {
"description": "ServerVersion wraps the version of the server",
"type": "object",
@@ -22862,6 +22917,15 @@
"$ref": "#/definitions/SearchResults"
}
},
+ "SecretList": {
+ "description": "SecretList",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Secret"
+ }
+ }
+ },
"ServerVersion": {
"description": "ServerVersion",
"schema": {