diff options
author | Bo-Yi Wu <appleboy.tw@gmail.com> | 2023-09-01 21:02:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-01 13:02:49 +0000 |
commit | 9eb4a9e601c16174306d81ec4d73ffa5a0adc788 (patch) | |
tree | 52af9a6ec5c98540961e1451bdaa6369cdf7ae6e /templates | |
parent | f01bed2443c32b8017a8dc31ca0161bd76bf3251 (diff) | |
download | gitea-9eb4a9e601c16174306d81ec4d73ffa5a0adc788.tar.gz gitea-9eb4a9e601c16174306d81ec4d73ffa5a0adc788.zip |
feat(API): add secret deletion functionality for repository (#26808)
- Modify the `CreateOrUpdateSecret` function in `api.go` to include a
`Delete` operation for the secret
- Modify the `DeleteOrgSecret` function in `action.go` to include a
`DeleteSecret` operation for the organization
- Modify the `DeleteSecret` function in `action.go` to include a
`DeleteSecret` operation for the repository
- Modify the `v1_json.tmpl` template file to update the `operationId`
and `summary` for the `deleteSecret` operation in both the organization
and repository sections
---------
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 78491de2e1..699653d29c 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -3287,6 +3287,50 @@ "$ref": "#/responses/forbidden" } } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a secret in a repository", + "operationId": "deleteRepoSecret", + "parameters": [ + { + "type": "string", + "description": "owner of the repository", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repository", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the secret", + "name": "secretname", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "delete one secret of the organization" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } } }, "/repos/{owner}/{repo}/activities/feeds": { |