aboutsummaryrefslogtreecommitdiffstats
path: root/templates/swagger
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-06-22 20:21:31 +0200
committerGitHub <noreply@github.com>2020-06-22 14:21:31 -0400
commitfc2f2c7602c0bea8de76172f6d3303eab374a01e (patch)
treea3cbccd543b846ff5410248caf5110022bfc38ca /templates/swagger
parentb948ecb2d29bfe373d966d10a33e7c195eb47da4 (diff)
downloadgitea-fc2f2c7602c0bea8de76172f6d3303eab374a01e.tar.gz
gitea-fc2f2c7602c0bea8de76172f6d3303eab374a01e.zip
API: Move AllowedReactions endpoint into GetGenneralUI endpoint + creat new swagger section settings (#11854)
* move Setting function into its own package * swagger add&use new section "settings" * move api AllowedReactions into general UI-Settings endpoint * prepare TEST * lint
Diffstat (limited to 'templates/swagger')
-rw-r--r--templates/swagger/v1_json.tmpl40
1 files changed, 30 insertions, 10 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 34a4b42f2f..1226822cc8 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -8470,36 +8470,36 @@
}
}
},
- "/settings/allowed_reactions": {
+ "/settings/repository": {
"get": {
"produces": [
"application/json"
],
"tags": [
- "miscellaneous"
+ "settings"
],
- "summary": "Returns string array of allowed reactions",
- "operationId": "getAllowedReactions",
+ "summary": "Get instance's global settings for repositories",
+ "operationId": "getGeneralRepositorySettings",
"responses": {
"200": {
- "$ref": "#/responses/StringSlice"
+ "$ref": "#/responses/GeneralRepoSettings"
}
}
}
},
- "/settings/repository": {
+ "/settings/ui": {
"get": {
"produces": [
"application/json"
],
"tags": [
- "miscellaneous"
+ "settings"
],
- "summary": "Get instance's global settings for repositories",
- "operationId": "getGeneralRepositorySettings",
+ "summary": "Get instance's global settings for ui",
+ "operationId": "getGeneralUISettings",
"responses": {
"200": {
- "$ref": "#/responses/GeneralRepoSettings"
+ "$ref": "#/responses/GeneralUISettings"
}
}
}
@@ -12753,6 +12753,20 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "GeneralUISettings": {
+ "description": "GeneralUISettings contains global ui settings exposed by API",
+ "type": "object",
+ "properties": {
+ "allowed_reactions": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "x-go-name": "AllowedReactions"
+ }
+ },
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"GitBlobResponse": {
"description": "GitBlobResponse represents a git blob",
"type": "object",
@@ -14928,6 +14942,12 @@
"$ref": "#/definitions/GeneralRepoSettings"
}
},
+ "GeneralUISettings": {
+ "description": "GeneralUISettings",
+ "schema": {
+ "$ref": "#/definitions/GeneralUISettings"
+ }
+ },
"GitBlobResponse": {
"description": "GitBlobResponse",
"schema": {