[GITEA] Make HTTPS schema default for Swagger
- Switch the supported schemas for the Swagger API around, such that https is the first one listed. This ensures that when the Swagger API is used it will default to the https schema, which is likely the schema you want to use in the majority of the cases. - Resolves #1895 BREAKING CHANGE NOTICE: If you are using the Swagger API JSON directly to communicate with the Forgejo API, the library you are using may be using the first schema defined in the JSON file (e.g. https://code.forgejo.org/swagger.v1.json) to construct the request url, this used to be `http` but has now changed to `https`. This can cause failures if you want to send the swagger request over `http` (and there is no HTTPS redirection configured).
This commit is contained in:
parent
2770af7044
commit
81e5f43886
2 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@
|
||||||
//
|
//
|
||||||
// This documentation describes the Gitea API.
|
// This documentation describes the Gitea API.
|
||||||
//
|
//
|
||||||
// Schemes: http, https
|
// Schemes: https, http
|
||||||
// BasePath: /api/v1
|
// BasePath: /api/v1
|
||||||
// Version: {{AppVer | JSEscape | Safe}}
|
// Version: {{AppVer | JSEscape | Safe}}
|
||||||
// License: MIT http://opensource.org/licenses/MIT
|
// License: MIT http://opensource.org/licenses/MIT
|
||||||
|
|
4
templates/swagger/v1_json.tmpl
generated
4
templates/swagger/v1_json.tmpl
generated
|
@ -8,8 +8,8 @@
|
||||||
"text/html"
|
"text/html"
|
||||||
],
|
],
|
||||||
"schemes": [
|
"schemes": [
|
||||||
"http",
|
"https",
|
||||||
"https"
|
"http"
|
||||||
],
|
],
|
||||||
"swagger": "2.0",
|
"swagger": "2.0",
|
||||||
"info": {
|
"info": {
|
||||||
|
|
Loading…
Reference in a new issue