diff options
author | Lauris BH <lauris@nix.lv> | 2020-06-07 14:48:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-07 14:48:41 +0300 |
commit | 2874ab54bccd7a4ebd6b8a51367eb8c1d9b16720 (patch) | |
tree | 2fd5ff4f7351afeb60361c1aeec9ff437e5d6b2e /templates | |
parent | 94f60e199bc504c6cfb7b853889e3ceb2a837adc (diff) | |
download | gitea-2874ab54bccd7a4ebd6b8a51367eb8c1d9b16720.tar.gz gitea-2874ab54bccd7a4ebd6b8a51367eb8c1d9b16720.zip |
Add language statistics API endpoint (#11737)
* Add language statistics API
* Add tests
Diffstat (limited to 'templates')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 456d41b9d4..e91fad693d 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -6049,6 +6049,42 @@ } } }, + "/repos/{owner}/{repo}/languages": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get languages and number of bytes of code written", + "operationId": "repoGetLanguages", + "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/LanguageStatistics" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, "/repos/{owner}/{repo}/milestones": { "get": { "produces": [ @@ -14917,6 +14953,16 @@ } } }, + "LanguageStatistics": { + "description": "LanguageStatistics", + "schema": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + } + }, "MarkdownRender": { "description": "MarkdownRender is a rendered markdown document", "schema": { |