-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Open
Labels
Description
Description
at docs.gitea.com/api
some API versions are format strings
{{.SwaggerAppVer}}@ https://docs.gitea.com/api/next/{{.SwaggerAppVer}}@ https://docs.gitea.com/api/1.25/{{AppVer | JSEscape}}@ https://docs.gitea.com/api/1.24/{{AppVer | JSEscape}}@ https://docs.gitea.com/api/1.23/{{AppVer | JSEscape}}@ https://docs.gitea.com/api/1.22/1.21.11@ https://docs.gitea.com/api/1.21/1.20.6@ https://docs.gitea.com/api/1.20/1.19.4@ https://docs.gitea.com/api/1.19/
this also affects the OpenAPI specification files
$ # https://docs.gitea.com/api/1.25/
$ curl -s https://docs.gitea.com/redocusaurus/plugin-redoc-2.yaml | grep -e '^ version:' -e '^basePath:'
version: '{{.SwaggerAppVer}}'
basePath: '{{.SwaggerAppSubUrl}}/api/v1'
$ # https://docs.gitea.com/api/1.24/
$ curl -s https://docs.gitea.com/redocusaurus/plugin-redoc-3.yaml | grep -e '^ version:' -e '^basePath:'
version: '{{AppVer | JSEscape}}'
basePath: '{{AppSubUrl | JSEscape}}/api/v1'
$ # https://docs.gitea.com/api/1.23/
$ curl -s https://docs.gitea.com/redocusaurus/plugin-redoc-4.yaml | grep -e '^ version:' -e '^basePath:'
version: '{{AppVer | JSEscape}}'
basePath: '{{AppSubUrl | JSEscape}}/api/v1'
$ # https://docs.gitea.com/api/1.22/
$ curl -s https://docs.gitea.com/redocusaurus/plugin-redoc-5.yaml | grep -e '^ version:' -e '^basePath:'
version: '{{AppVer | JSEscape}}'
basePath: '{{AppSubUrl | JSEscape}}/api/v1'
$ # https://docs.gitea.com/api/1.21/
$ curl -s https://docs.gitea.com/redocusaurus/plugin-redoc-6.yaml | grep -e '^ version:' -e '^basePath:'
version: 1.21.11
basePath: https://gitea.com/api/v1
related:
the OpenAPI specification files
should be named after the gitea version
so we get canonical filenames (and canonical URLs)
-https://docs.gitea.com/redocusaurus/plugin-redoc-5.yaml
+https://docs.gitea.com/redocusaurus/gitea-api-1.22.yam
-https://docs.gitea.com/redocusaurus/plugin-redoc-6.yaml
+https://docs.gitea.com/redocusaurus/gitea-api-1.21.yamlGitea Version
1.25
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
.
Database
None
milahu