diff options
author | nitul1991 <nitul1991@users.noreply.github.com> | 2021-08-11 06:31:40 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-11 03:01:40 +0200 |
commit | 2d25b7d44bedf8f17cc2b49f39d1cee662b199a5 (patch) | |
tree | 0bdf04eaed29d773408eff5928ce6df238447001 /templates/swagger | |
parent | c4d70a032564f610b7215d3d3973943abbc7395f (diff) | |
download | gitea-2d25b7d44bedf8f17cc2b49f39d1cee662b199a5.tar.gz gitea-2d25b7d44bedf8f17cc2b49f39d1cee662b199a5.zip |
Add an api endpoint to fetch git notes (#15373) (#16649)
close #15373
Diffstat (limited to 'templates/swagger')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index a1d92abec7..d23d09bcfd 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -3569,6 +3569,52 @@ } } }, + "/repos/{owner}/{repo}/git/notes/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a note corresponding to a single commit from a repository", + "operationId": "repoGetNote", + "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 + }, + { + "type": "string", + "description": "a git ref or commit sha", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Note" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, "/repos/{owner}/{repo}/git/refs": { "get": { "produces": [ @@ -15453,6 +15499,20 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "Note": { + "description": "Note contains information related to a git note", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/Commit" + }, + "message": { + "type": "string", + "x-go-name": "Message" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "NotificationCount": { "description": "NotificationCount number of unread notifications", "type": "object", @@ -17412,6 +17472,12 @@ } } }, + "Note": { + "description": "Note", + "schema": { + "$ref": "#/definitions/Note" + } + }, "NotificationCount": { "description": "Number of unread notifications", "schema": { |