diff options
author | 6543 <6543@obermui.de> | 2020-11-14 17:13:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-14 11:13:55 -0500 |
commit | 7d2700c8be5da8f2073a576dae209ae07ac6ed22 (patch) | |
tree | 072698eb27e6b8a1e1da3aa0313283d89127598a /templates/swagger | |
parent | 3f3447a1ea8ed0d89ed862b7da506c97030d670e (diff) | |
download | gitea-7d2700c8be5da8f2073a576dae209ae07ac6ed22.tar.gz gitea-7d2700c8be5da8f2073a576dae209ae07ac6ed22.zip |
[API] Only Return Json (#13511)
* Let Branch and Raw Endpoint return json error if not found
* Revert "RM RepoRefByTypeForAPI and move needed parts into GetRawFile directly"
This reverts commit d826d08577b23765cb3c257e7a861191d1aa9a04.
* more similar to RepoRefByType
* dedub-code
* API should just speak JSON
* nice name
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates/swagger')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index b8f81bb8f7..e759a1558c 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -2541,6 +2541,9 @@ "responses": { "200": { "$ref": "#/responses/Branch" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -2582,6 +2585,9 @@ }, "403": { "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/notFound" } } } |