summaryrefslogtreecommitdiffstats
path: root/templates/swagger/v1_json.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/swagger/v1_json.tmpl')
-rw-r--r--templates/swagger/v1_json.tmpl154
1 files changed, 153 insertions, 1 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index bac1f05710..07d760212e 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -8071,6 +8071,89 @@
}
}
},
+ "/user/applications/oauth2": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "user"
+ ],
+ "summary": "List the authenticated user's oauth2 applications",
+ "operationId": "userGetOauth2Application",
+ "parameters": [
+ {
+ "type": "integer",
+ "description": "page number of results to return (1-based)",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "page size of results, maximum page size is 50",
+ "name": "limit",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "$ref": "#/responses/OAuth2ApplicationList"
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "user"
+ ],
+ "summary": "creates a new OAuth2 application",
+ "operationId": "userCreateOAuth2Application",
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
+ }
+ }
+ ],
+ "responses": {
+ "201": {
+ "$ref": "#/responses/OAuth2Application"
+ }
+ }
+ }
+ },
+ "/user/applications/oauth2/{id}": {
+ "delete": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "user"
+ ],
+ "summary": "delete an OAuth2 Application",
+ "operationId": "userDeleteOAuth2Application",
+ "parameters": [
+ {
+ "type": "integer",
+ "format": "int64",
+ "description": "token to be deleted",
+ "name": "id",
+ "in": "path",
+ "required": true
+ }
+ ],
+ "responses": {
+ "204": {
+ "$ref": "#/responses/empty"
+ }
+ }
+ }
+ },
"/user/emails": {
"get": {
"produces": [
@@ -10357,6 +10440,24 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "CreateOAuth2ApplicationOptions": {
+ "description": "CreateOAuth2ApplicationOptions holds options to create an oauth2 application",
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "x-go-name": "Name"
+ },
+ "redirect_uris": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "x-go-name": "RedirectURIs"
+ }
+ },
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"CreateOrgOption": {
"description": "CreateOrgOption options for creating an organization",
"type": "object",
@@ -12198,6 +12299,42 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "OAuth2Application": {
+ "type": "object",
+ "title": "OAuth2Application represents an OAuth2 application.",
+ "properties": {
+ "client_id": {
+ "type": "string",
+ "x-go-name": "ClientID"
+ },
+ "client_secret": {
+ "type": "string",
+ "x-go-name": "ClientSecret"
+ },
+ "created": {
+ "type": "string",
+ "format": "date-time",
+ "x-go-name": "Created"
+ },
+ "id": {
+ "type": "integer",
+ "format": "int64",
+ "x-go-name": "ID"
+ },
+ "name": {
+ "type": "string",
+ "x-go-name": "Name"
+ },
+ "redirect_uris": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "x-go-name": "RedirectURIs"
+ }
+ },
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"Organization": {
"description": "Organization represents an organization",
"type": "object",
@@ -13689,6 +13826,21 @@
}
}
},
+ "OAuth2Application": {
+ "description": "OAuth2Application",
+ "schema": {
+ "$ref": "#/definitions/OAuth2Application"
+ }
+ },
+ "OAuth2ApplicationList": {
+ "description": "OAuth2ApplicationList represents a list of OAuth2 applications.",
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/OAuth2Application"
+ }
+ }
+ },
"Organization": {
"description": "Organization",
"schema": {
@@ -13971,7 +14123,7 @@
"parameterBodies": {
"description": "parameterBodies",
"schema": {
- "$ref": "#/definitions/EditBranchProtectionOption"
+ "$ref": "#/definitions/CreateOAuth2ApplicationOptions"
}
},
"redirect": {