summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-07-24 09:34:11 +0100
committerGitHub <noreply@github.com>2019-07-24 09:34:11 +0100
commit635e7b38bd6a43aac442178f04141c1030ecc1cc (patch)
tree1536126fea6e4b5bb7a71fb3cef393d1b6e38c2f
parent2c5c458dd70a0651b137d1af62fb50de5af4e9af (diff)
downloadgitea-635e7b38bd6a43aac442178f04141c1030ecc1cc.tar.gz
gitea-635e7b38bd6a43aac442178f04141c1030ecc1cc.zip
Swagger: Add information to API Token header (#7585)
* Add a description to the API Token header for swagger
-rw-r--r--routers/api/v1/api.go1
-rw-r--r--templates/swagger/v1_json.tmpl1
2 files changed, 2 insertions, 0 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 8170b79dd2..cd308fce51 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -43,6 +43,7 @@
// type: apiKey
// name: Authorization
// in: header
+// description: API tokens must be prepended with "token" followed by a space.
// SudoParam:
// type: apiKey
// name: sudo
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 11f4161172..e56fa61eed 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -10390,6 +10390,7 @@
"in": "query"
},
"AuthorizationHeaderToken": {
+ "description": "API tokens must be prepended with \"token\" followed by a space.",
"type": "apiKey",
"name": "Authorization",
"in": "header"