Bug 37791: Fix 'Biblio not found' messages on the API
This patch fixes some API-related cases of 'Biblio' terminology
incorrectly used.
To test:
1. Run:
$ ktd --shell
k$ git grep 'Biblio not found'
=> FAIL: Several occurences
2. Run:
k$ git grep 'render_resource_not_found("Biblio")'
=> FAIL: Several occurences
3. Apply this patches
4. Repeat 1 and 2
=> SUCCESS: No more occurences!
5. Run:
k$ prove t/db_dependent/api/v1/
=> SUCCESS: Tests pass!
6. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
29c12515ed
commit
436ef4be6a
|
|
@ -97,7 +97,7 @@ sub add {
|
|||
return try {
|
||||
|
||||
my $biblio = Koha::Biblios->find( $c->param('biblio_id') );
|
||||
return $c->render_resource_not_found("Biblio")
|
||||
return $c->render_resource_not_found("Bibliographic record")
|
||||
unless $biblio;
|
||||
|
||||
my $item_group_data = $c->req->json;
|
||||
|
|
@ -121,7 +121,7 @@ sub add {
|
|||
if ( $_->isa('Koha::Exceptions::Object::FKConstraint')
|
||||
and $_->broken_fk eq 'biblio_id' )
|
||||
{
|
||||
return $c->render_resource_not_found("Biblio");
|
||||
return $c->render_resource_not_found("Bibliographic record");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ sub get {
|
|||
|
||||
my $biblio = Koha::Old::Biblios->find( { biblionumber => $c->param('biblio_id') }, $attributes );
|
||||
|
||||
return $c->render_resource_not_found("Biblio")
|
||||
return $c->render_resource_not_found("Bibliographic record")
|
||||
unless $biblio;
|
||||
|
||||
return try {
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ sub add {
|
|||
unless ($biblio) {
|
||||
return $c->render(
|
||||
status => 400,
|
||||
openapi => "Biblio not found."
|
||||
openapi => "Bibliographic record not found"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"404":
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"406":
|
||||
|
|
@ -155,7 +155,7 @@
|
|||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"404":
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"406":
|
||||
|
|
@ -207,7 +207,7 @@
|
|||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"404":
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"409":
|
||||
|
|
@ -266,7 +266,7 @@
|
|||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"404":
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"406":
|
||||
|
|
@ -344,7 +344,7 @@
|
|||
schema:
|
||||
$ref: ../swagger.yaml#/definitions/error
|
||||
"404":
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
$ref: ../swagger.yaml#/definitions/error
|
||||
"406":
|
||||
|
|
@ -419,7 +419,7 @@
|
|||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"404":
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"500":
|
||||
|
|
@ -519,7 +519,7 @@
|
|||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"404":
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"406":
|
||||
|
|
@ -702,7 +702,7 @@
|
|||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"404":
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"500":
|
||||
|
|
@ -749,7 +749,7 @@
|
|||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"404":
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"406":
|
||||
|
|
@ -822,7 +822,7 @@
|
|||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"404":
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"406":
|
||||
|
|
@ -899,7 +899,7 @@
|
|||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"404":
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"500":
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
'404':
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
"$ref": "../swagger.yaml#/definitions/error"
|
||||
'401':
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"404":
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"406":
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"404":
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"406":
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@
|
|||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"404":
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"409":
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@
|
|||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"404":
|
||||
description: Biblio not found
|
||||
description: Bibliographic record not found
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
"500":
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ subtest 'get() tests' => sub {
|
|||
my $biblio_exist = $builder->build_sample_biblio();
|
||||
$t->get_ok( "//$userid:$password@/api/v1/deleted/biblios/"
|
||||
. $biblio_exist->biblionumber => { Accept => 'application/marc' } )->status_is(404)
|
||||
->json_is( '/error', 'Biblio not found' );
|
||||
->json_is( '/error', 'Bibliographic record not found' );
|
||||
|
||||
subtest 'marc-in-json encoding tests' => sub {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue