loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Clarify that `ENABLE_SWAGGER` only influences the API docs, not the routes (#21215)

Previously, the docs seemed to suggest that you can disable the API
completely by setting `ENABLE_SWAGGER=false`.
This is not the case.

authored by

delvh and committed by
GitHub
0c51595e d0e3c538

+10 -10
+2 -2
custom/conf/app.example.ini
··· 2153 2153 ;[api] 2154 2154 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2155 2155 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2156 - ;; Enables Swagger. True or false; default is true. 2156 + ;; Enables the API documentation endpoints (/api/swagger, /api/v1/swagger, …). True or false. 2157 2157 ;ENABLE_SWAGGER = true 2158 2158 ;; Max number of items in a page 2159 2159 ;MAX_RESPONSE_ITEMS = 50 ··· 2161 2161 ;DEFAULT_PAGING_NUM = 30 2162 2162 ;; Default and maximum number of items per page for git trees api 2163 2163 ;DEFAULT_GIT_TREES_PER_PAGE = 1000 2164 - ;; Default size of a blob returned by the blobs API (default is 10MiB) 2164 + ;; Default max size of a blob returned by the blobs API (default is 10MiB) 2165 2165 ;DEFAULT_MAX_BLOB_SIZE = 10485760 2166 2166 2167 2167 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+2 -2
docs/content/doc/advanced/config-cheat-sheet.en-us.md
··· 1015 1015 1016 1016 ## API (`api`) 1017 1017 1018 - - `ENABLE_SWAGGER`: **true**: Enables /api/swagger, /api/v1/swagger etc. endpoints. True or false; default is true. 1018 + - `ENABLE_SWAGGER`: **true**: Enables the API documentation endpoints (`/api/swagger`, `/api/v1/swagger`, …). True or false. 1019 1019 - `MAX_RESPONSE_ITEMS`: **50**: Max number of items in a page. 1020 1020 - `DEFAULT_PAGING_NUM`: **30**: Default paging number of API. 1021 1021 - `DEFAULT_GIT_TREES_PER_PAGE`: **1000**: Default and maximum number of items per page for Git trees API. 1022 - - `DEFAULT_MAX_BLOB_SIZE`: **10485760**: Default max size of a blob that can be return by the blobs API. 1022 + - `DEFAULT_MAX_BLOB_SIZE`: **10485760** (10MiB): Default max size of a blob that can be returned by the blobs API. 1023 1023 1024 1024 ## OAuth2 (`oauth2`) 1025 1025
+1 -1
docs/content/doc/advanced/config-cheat-sheet.zh-cn.md
··· 299 299 300 300 ## API (`api`) 301 301 302 - - `ENABLE_SWAGGER`: **true**: 是否启用swagger路由 /api/swagger, /api/v1/swagger etc. endpoints. True 或 false; 默认是 true. 302 + - `ENABLE_SWAGGER`: **true**: 是否启用swagger路由 /api/swagger, /api/v1/swagger etc. endpoints. True 或 false. 303 303 - `MAX_RESPONSE_ITEMS`: **50**: 一个页面最大的项目数。 304 304 - `DEFAULT_PAGING_NUM`: **30**: API中默认分页条数。 305 305 - `DEFAULT_GIT_TREES_PER_PAGE`: **1000**: GIT TREES API每页的默认最大项数.
+5 -5
docs/content/doc/help/faq.en-us.md
··· 126 126 127 127 ## What is Swagger? 128 128 129 - [Swagger](https://swagger.io/) is what Gitea uses for its API. 129 + [Swagger](https://swagger.io/) is what Gitea uses for its API documentation. 130 130 131 - All Gitea instances have the built-in API, though it can be disabled by setting `ENABLE_SWAGGER` to `false` in the `api` section of your `app.ini` 132 - 133 - For more information, refer to Gitea's [API docs]({{< relref "doc/developers/api-usage.en-us.md" >}}) 131 + All Gitea instances have the built-in API and there is no way to disable it completely. 132 + You can, however, disable showing its documentation by setting `ENABLE_SWAGGER` to `false` in the `api` section of your `app.ini`. 133 + For more information, refer to Gitea's [API docs]({{< relref "doc/developers/api-usage.en-us.md" >}}). 134 134 135 - [Swagger Example](https://try.gitea.io/api/swagger) 135 + You can see the latest API (for example) on <https://try.gitea.io/api/swagger>. 136 136 137 137 ## Adjusting your server for public/private use 138 138