diff options
author | zeripath <art27@cantab.net> | 2020-04-15 06:18:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 02:18:51 -0300 |
commit | 2e85ad665acad1cc96b45d6b1f9032fc4982c3e7 (patch) | |
tree | cbbfe18044271a59fd5d2e757ea3e3a86fd46ad2 /templates/swagger | |
parent | 7c8e116987895bf9c67dc133f8aa04a799170a2e (diff) | |
download | gitea-2e85ad665acad1cc96b45d6b1f9032fc4982c3e7.tar.gz gitea-2e85ad665acad1cc96b45d6b1f9032fc4982c3e7.zip |
Contents API should return 404 on not exist (#10323)
* Return 404 on not exist
* swagger update and use git.IsErrNotExist
* Handle delete too
* Handle delete too x2
* Fix pr 10323 (#3)
* fix TESTS
* leafe a note for fututre
* placate golangci-lint
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update integrations/api_repo_file_delete_test.go
Co-Authored-By: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Diffstat (limited to 'templates/swagger')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 8b10a75990..5de98a72ce 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -2638,6 +2638,9 @@ "responses": { "200": { "$ref": "#/responses/ContentsListResponse" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -2684,6 +2687,9 @@ "responses": { "200": { "$ref": "#/responses/ContentsResponse" + }, + "404": { + "$ref": "#/responses/notFound" } } }, @@ -2831,6 +2837,15 @@ "responses": { "200": { "$ref": "#/responses/FileDeleteResponse" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/error" + }, + "404": { + "$ref": "#/responses/error" } } } |