summaryrefslogtreecommitdiffstats
path: root/templates/swagger
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-06-10 14:05:46 +0200
committerGitHub <noreply@github.com>2020-06-10 15:05:46 +0300
commit68a2af6d68bb54a704bf98a3ba0ceada4d7808b9 (patch)
treeffefd5ef7d48876dd90e4118efe38eb7fa1ff0ec /templates/swagger
parent1ac46186ff004861a786a81fe045beddaf790407 (diff)
downloadgitea-68a2af6d68bb54a704bf98a3ba0ceada4d7808b9.tar.gz
gitea-68a2af6d68bb54a704bf98a3ba0ceada4d7808b9.zip
API expose usefull General Repo settings settings (#11758)
* GeneralRepoSettings expose MirrorsDisabled, HTTPGitDisabled, MaxCreationLimit * Apply suggestions from code review Co-authored-by: proton <25139420+proton-ab@users.noreply.github.com> * lint Co-authored-by: proton <25139420+proton-ab@users.noreply.github.com>
Diffstat (limited to 'templates/swagger')
-rw-r--r--templates/swagger/v1_json.tmpl38
1 files changed, 38 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index bf011285f8..34a4b42f2f 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -8487,6 +8487,23 @@
}
}
},
+ "/settings/repository": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "miscellaneous"
+ ],
+ "summary": "Get instance's global settings for repositories",
+ "operationId": "getGeneralRepositorySettings",
+ "responses": {
+ "200": {
+ "$ref": "#/responses/GeneralRepoSettings"
+ }
+ }
+ }
+ },
"/signing-key.gpg": {
"get": {
"produces": [
@@ -12721,6 +12738,21 @@
},
"x-go-package": "code.gitea.io/gitea/modules/structs"
},
+ "GeneralRepoSettings": {
+ "description": "GeneralRepoSettings contains global repository settings exposed by API",
+ "type": "object",
+ "properties": {
+ "http_git_disabled": {
+ "type": "boolean",
+ "x-go-name": "HTTPGitDisabled"
+ },
+ "mirrors_disabled": {
+ "type": "boolean",
+ "x-go-name": "MirrorsDisabled"
+ }
+ },
+ "x-go-package": "code.gitea.io/gitea/modules/structs"
+ },
"GitBlobResponse": {
"description": "GitBlobResponse represents a git blob",
"type": "object",
@@ -14890,6 +14922,12 @@
}
}
},
+ "GeneralRepoSettings": {
+ "description": "GeneralRepoSettings",
+ "schema": {
+ "$ref": "#/definitions/GeneralRepoSettings"
+ }
+ },
"GitBlobResponse": {
"description": "GitBlobResponse",
"schema": {