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:
Tomas Cohen Arazi 2024-08-30 08:38:35 -03:00 committed by Katrin Fischer
parent 29c12515ed
commit 436ef4be6a
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
9 changed files with 21 additions and 21 deletions

View File

@ -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");
}
}

View File

@ -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 {

View File

@ -133,7 +133,7 @@ sub add {
unless ($biblio) {
return $c->render(
status => 400,
openapi => "Biblio not found."
openapi => "Bibliographic record not found"
);
}

View File

@ -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":

View File

@ -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':

View File

@ -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":

View File

@ -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":

View File

@ -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":

View File

@ -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 {