Bugzilla – Attachment 88229 Details for
Bug 15496
Delete bibliographic record after moving last item to another record(s)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15496: (QA follow-up) Change success status on api
Bug-15496-QA-follow-up-Change-success-status-on-ap.patch (text/plain), 1.99 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-04-17 18:34:34 UTC
(
hide
)
Description:
Bug 15496: (QA follow-up) Change success status on api
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-04-17 18:34:34 UTC
Size:
1.99 KB
patch
obsolete
>From d377af970c6a9301ff2e3837d3eb9e117209f595 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Wed, 17 Apr 2019 10:47:06 +0000 >Subject: [PATCH] Bug 15496: (QA follow-up) Change success status on api > >DELETE response code must be 204, not 200 according to our API coding >guidelines > >Test plan: > >prove t/db_dependent/api/v1/biblios.t > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/REST/V1/Biblios.pm | 2 +- > api/v1/swagger/paths/biblios.json | 2 +- > t/db_dependent/api/v1/biblios.t | 3 ++- > 3 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/Koha/REST/V1/Biblios.pm b/Koha/REST/V1/Biblios.pm >index d5e5564b0c..6e8da01f82 100644 >--- a/Koha/REST/V1/Biblios.pm >+++ b/Koha/REST/V1/Biblios.pm >@@ -54,7 +54,7 @@ sub delete { > ); > } > else { >- return $c->render( status => 200, openapi => "" ); >+ return $c->render( status => 204, openapi => "" ); > } > } > catch { >diff --git a/api/v1/swagger/paths/biblios.json b/api/v1/swagger/paths/biblios.json >index 73ace63c07..f91d41c663 100644 >--- a/api/v1/swagger/paths/biblios.json >+++ b/api/v1/swagger/paths/biblios.json >@@ -11,7 +11,7 @@ > "application/json" > ], > "responses": { >- "200": { >+ "204": { > "description": "Biblio deleted", > "schema": { > "type": "string" >diff --git a/t/db_dependent/api/v1/biblios.t b/t/db_dependent/api/v1/biblios.t >index 03ef7cd2ea..6a503b5188 100644 >--- a/t/db_dependent/api/v1/biblios.t >+++ b/t/db_dependent/api/v1/biblios.t >@@ -62,7 +62,8 @@ subtest 'delete() tests' => sub { > > # Bibs with no items can be deleted > $t->delete_ok("//$userid:$password@/api/v1/biblios/$biblio_id") >- ->status_is(200)->content_is(q{""}); >+ ->status_is(204, 'SWAGGER3.2.4') >+ ->content_is('', 'SWAGGER3.3.4'); > > $t->delete_ok("//$userid:$password@/api/v1/biblios/$biblio_id") > ->status_is(404); >-- >2.21.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15496
:
88004
|
88005
|
88006
|
88008
|
88015
|
88016
|
88017
|
88018
|
88019
|
88020
|
88026
|
88027
|
88028
|
88029
|
88030
|
88031
|
88032
|
88165
|
88166
|
88167
|
88168
|
88169
|
88170
|
88171
|
88172
|
88215
|
88225
|
88226
|
88227
|
88228
|
88229
|
88230
|
88892
|
88893
|
88894
|
88895
|
88896
|
88897
|
88903
|
88905
|
88920
|
88938
|
88950