summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorDan Molik <dan@danmolik.com>2020-04-09 20:37:31 -0400
committerGitHub <noreply@github.com>2020-04-09 19:37:31 -0500
commit743022116df236c0a77c020ad142a6e21b394320 (patch)
tree3cf43fe05f84d3e270ca38e28bba2af66c7eb502 /templates
parent4ec7a659cee94036d4632a7d3a09d37939ea1548 (diff)
downloadgitea-743022116df236c0a77c020ad142a6e21b394320.tar.gz
gitea-743022116df236c0a77c020ad142a6e21b394320.zip
Add Get/Update for api/v1/user/applications/oauth2 (#11008)
Add api methods for getting and updating user oauth2 applications. Signed-off-by: Dan Molik <dan@danmolik.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r--templates/swagger/v1_json.tmpl58
1 files changed, 58 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 55094e391d..8591381ef4 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -8360,6 +8360,31 @@
}
},
"/user/applications/oauth2/{id}": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "user"
+ ],
+ "summary": "get an OAuth2 Application",
+ "operationId": "userGetOAuth2Application",
+ "parameters": [
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "Application ID to be found",
+ "name": "id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/OAuth2Application"
+ }
+ }
+ },
"delete": {
"produces": [
"application/json"
@@ -8384,6 +8409,39 @@
"$ref": "#/responses/empty"
}
}
+ },
+ "patch": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "user"
+ ],
+ "summary": "update an OAuth2 Application, this includes regenerating the client secret",
+ "operationId": "userUpdateOAuth2Application",
+ "parameters": [
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "application to be updated",
+ "name": "id",
+ "in": "path",
+ "required": true
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/OAuth2Application"
+ }
+ }
}
},
"/user/emails": {