diff options
author | JakobDev <jakobdev@gmx.de> | 2023-01-26 17:33:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-26 10:33:47 -0600 |
commit | 4d072a4c4e47140550df18edf35d7243ae5edcbd (patch) | |
tree | c1bb19442518481494895f6b37cc6604bf8788e8 /templates | |
parent | e8ac6a9aeacf0adf21982abc51baa8938e5dd6bb (diff) | |
download | gitea-4d072a4c4e47140550df18edf35d7243ae5edcbd.tar.gz gitea-4d072a4c4e47140550df18edf35d7243ae5edcbd.zip |
Add API endpoint to get latest release (#21267)
This PR adds a new API endpoint to get the latest stable release of a
repo, similar to [GitHub
API](https://docs.github.com/en/rest/releases/releases#get-the-latest-release).
Diffstat (limited to 'templates')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 76d02d825f..cd64b7070f 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -9776,6 +9776,42 @@ } } }, + "/repos/{owner}/{repo}/releases/latest": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at", + "operationId": "repoGetLatestRelease", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Release" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, "/repos/{owner}/{repo}/releases/tags/{tag}": { "get": { "produces": [ |