[BRANDING] Replace branding in Swagger

- "Gitea" is automatically being determined in Swagger and cannot be
overridden, therefor we override it after `swagger generate spec` is run.
- Resolves https://codeberg.org/forgejo/forgejo/issues/226

(cherry picked from commit 0b45380765)

[BRANDING] Change Swagger title to Forgejo API

(cherry picked from commit 79f6a70b53)
(cherry picked from commit 6cd47afe33)
(cherry picked from commit a7ae2e4c09)
(cherry picked from commit 59f837e466)
(cherry picked from commit c1c3d1f0e6)
(cherry picked from commit 4b088713fb)
(cherry picked from commit 3df1d21371)
(cherry picked from commit a4a5fdbde4)
(cherry picked from commit 57aa9ed710)
This commit is contained in:
Gusted 2023-01-09 22:28:04 +01:00 committed by Loïc Dachary
parent 5784290bc4
commit 948b49bf94
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2
3 changed files with 5 additions and 3 deletions

View file

@ -159,6 +159,7 @@ SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl \| JSEs
SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl \| JSEscape \| Safe}}/api/v1"|"basePath": "/api/v1"|g
SWAGGER_EXCLUDE := code.gitea.io/sdk
TEST_MYSQL_HOST ?= mysql:3306
TEST_MYSQL_DBNAME ?= testgitea
@ -335,6 +336,7 @@ $(SWAGGER_SPEC): $(GO_SOURCES_NO_BINDATA)
$(GO) run $(SWAGGER_PACKAGE) generate spec -x "$(SWAGGER_EXCLUDE)" -o './$(SWAGGER_SPEC)'
.PHONY: swagger-check
swagger-check: generate-swagger

View file

@ -2,7 +2,7 @@
<html lang="en">
<meta charset="UTF-8">
<title>Gitea API</title>
<title>Forgejo API</title>
<link href="{{AssetUrlPrefix}}/css/swagger.css?v={{AssetVersion}}" rel="stylesheet">

View file

@ -13,8 +13,8 @@
"swagger": "2.0",
"info": {
"description": "This documentation describes the Gitea API.",
"title": "Gitea API.",
"description": "This documentation describes the Forgejo API.",
"title": "Forgejo API.",
"license": {
"name": "MIT",
"url": "http://opensource.org/licenses/MIT"