Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs: missing Gitea API versions #35964

@milahu

Description

@milahu

Description

at docs.gitea.com/api
some API versions are format strings

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.yaml

Gitea 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions