@@ -, +, @@ $ kshell k$ prove t/db_dependent/api/v1/*.t --- Koha/REST/V1/Acquisitions/Vendors.pm | 2 +- Koha/REST/V1/Cities.pm | 5 ++++- Koha/REST/V1/Holds.pm | 5 ++++- Koha/REST/V1/Patrons.pm | 5 ++++- api/v1/swagger/paths/acquisitions_orders.json | 5 +---- api/v1/swagger/paths/acquisitions_vendors.json | 7 ++----- api/v1/swagger/paths/cities.json | 7 ++----- api/v1/swagger/paths/holds.json | 7 ++----- api/v1/swagger/paths/patrons.json | 7 ++----- 9 files changed, 22 insertions(+), 28 deletions(-) --- a/Koha/REST/V1/Acquisitions/Vendors.pm +++ a/Koha/REST/V1/Acquisitions/Vendors.pm @@ -159,7 +159,7 @@ sub delete { $vendor->delete; return $c->render( - status => 200, + status => 204, openapi => q{} ); } --- a/Koha/REST/V1/Cities.pm +++ a/Koha/REST/V1/Cities.pm @@ -126,7 +126,10 @@ sub delete { return try { $city->delete; - return $c->render( status => 200, openapi => "" ); + return $c->render( + status => 204, + openapi => q{} + ); } catch { $c->unhandled_exception($_); --- a/Koha/REST/V1/Holds.pm +++ a/Koha/REST/V1/Holds.pm @@ -262,7 +262,10 @@ sub delete { return try { $hold->cancel; - return $c->render( status => 200, openapi => {} ); + return $c->render( + status => 204, + openapi => q{} + ); } catch { $c->unhandled_exception($_); --- a/Koha/REST/V1/Patrons.pm +++ a/Koha/REST/V1/Patrons.pm @@ -279,7 +279,10 @@ sub delete { # check if loans, reservations, debarrment, etc. before deletion! $patron->delete; - return $c->render( status => 200, openapi => {} ); + return $c->render( + status => 204, + openapi => q{} + ); } catch { unless ($patron) { --- a/api/v1/swagger/paths/acquisitions_orders.json +++ a/api/v1/swagger/paths/acquisitions_orders.json @@ -332,10 +332,7 @@ ], "responses": { "204": { - "description": "Order deleted", - "schema": { - "type": "string" - } + "description": "Order deleted" }, "401": { "description": "Authentication required", --- a/api/v1/swagger/paths/acquisitions_vendors.json +++ a/api/v1/swagger/paths/acquisitions_vendors.json @@ -264,11 +264,8 @@ "application/json" ], "responses": { - "200": { - "description": "Vendor deleted", - "schema": { - "type": "string" - } + "204": { + "description": "Vendor deleted" }, "401": { "description": "Authentication required", --- a/api/v1/swagger/paths/cities.json +++ a/api/v1/swagger/paths/cities.json @@ -238,11 +238,8 @@ "application/json" ], "responses": { - "200": { - "description": "City deleted", - "schema": { - "type": "string" - } + "204": { + "description": "City deleted" }, "401": { "description": "Authentication required", --- a/api/v1/swagger/paths/holds.json +++ a/api/v1/swagger/paths/holds.json @@ -355,11 +355,8 @@ ], "produces": ["application/json"], "responses": { - "200": { - "description": "Successful deletion", - "schema": { - "type": "object" - } + "204": { + "description": "Hold deleted" }, "401": { "description": "Authentication required", --- a/api/v1/swagger/paths/patrons.json +++ a/api/v1/swagger/paths/patrons.json @@ -669,11 +669,8 @@ }], "produces": ["application/json"], "responses": { - "200": { - "description": "Patron deleted successfully", - "schema": { - "type": "object" - } + "204": { + "description": "Patron deleted" }, "400": { "description": "Patron deletion failed", --