1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

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
This commit is contained in:
6543
2020-06-22 20:21:31 +02:00
committed by GitHub
parent b948ecb2d2
commit fc2f2c7602
7 changed files with 81 additions and 41 deletions

View File

@@ -8470,30 +8470,13 @@
}
}
},
"/settings/allowed_reactions": {
"get": {
"produces": [
"application/json"
],
"tags": [
"miscellaneous"
],
"summary": "Returns string array of allowed reactions",
"operationId": "getAllowedReactions",
"responses": {
"200": {
"$ref": "#/responses/StringSlice"
}
}
}
},
"/settings/repository": {
"get": {
"produces": [
"application/json"
],
"tags": [
"miscellaneous"
"settings"
],
"summary": "Get instance's global settings for repositories",
"operationId": "getGeneralRepositorySettings",
@@ -8504,6 +8487,23 @@
}
}
},
"/settings/ui": {
"get": {
"produces": [
"application/json"
],
"tags": [
"settings"
],
"summary": "Get instance's global settings for ui",
"operationId": "getGeneralUISettings",
"responses": {
"200": {
"$ref": "#/responses/GeneralUISettings"
}
}
}
},
"/signing-key.gpg": {
"get": {
"produces": [
@@ -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": {