Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show Gitea version in swagger #14654

Merged
merged 4 commits into from
Feb 12, 2021

Conversation

techknowlogick
Copy link
Member

Fix #14645

@techknowlogick techknowlogick added this to the 1.14.0 milestone Feb 11, 2021
@jpraet
Copy link
Member

jpraet commented Feb 11, 2021

Won't the API version need to evolve separately from the Gitea version?
Maybe in Gitea 1.15 there are no changes to the API, then why update its version?
Maybe in Gitea 2.x there are no major changes to the API and we want to keep the endpoint as /api/v1?

For obtaining the Gitea version through the API there is https://try.gitea.io/api/v1/version.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 11, 2021
@6543
Copy link
Member

6543 commented Feb 11, 2021

well it's only to generate swagger docs ... at the moment it is useless and i think it's save to use gitea's version to version the swagger json with it ...

@6543 6543 added type/docs This PR mainly updates/creates documentation and removed type/bug labels Feb 11, 2021
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 11, 2021
@6543 6543 added the modifies/api This PR adds API routes or modifies them label Feb 11, 2021
@6543
Copy link
Member

6543 commented Feb 11, 2021

@techknowlogick now it looks good, we just have to replace + with - since it is displayed as +

@jpraet
Copy link
Member

jpraet commented Feb 11, 2021

If it's only for documentation purposes then I would suggest
"description": "This documentation describes the v1 API of Gitea {{AppVer}}." while still keeping the flexibility of being able to evolve the API version and Gitea version independently.

@6543
Copy link
Member

6543 commented Feb 11, 2021

we did not evolve API and Gitea independently (We do not backport api features)

@lafriks
Copy link
Member

lafriks commented Feb 12, 2021

From security perspective it should be show only if allowed by setting to show version number

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 12, 2021
@techknowlogick
Copy link
Member Author

@lafriks app version is visible many places elsewhere in app, such as the MD5 for cache busting of JS & CSS assets

@6543
Copy link
Member

6543 commented Feb 12, 2021

🚀

@6543 6543 merged commit a3cc842 into go-gitea:master Feb 12, 2021
@techknowlogick techknowlogick deleted the techknowlogick-patch-3 branch February 12, 2021 22:55
@jpraet
Copy link
Member

jpraet commented Feb 16, 2021

image

The + is displayed as +

@lunny
Copy link
Member

lunny commented Feb 17, 2021

image

The + is displayed as +

Could you fire a new issue?

@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reflected gitea version in API version
7 participants