From b7ae86a13486142aa08ad5d141b1610532e4db47 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 9 Feb 2023 10:55:56 +0100 Subject: [PATCH] Bug 32923: Some fixes in ERM specs Signed-off-by: Pedro Amorim Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- api/v1/swagger/paths/erm_agreements.yaml | 4 +++- api/v1/swagger/paths/erm_eholdings_packages.yaml | 9 ++++++--- .../swagger/paths/erm_eholdings_packages_resources.yaml | 2 +- api/v1/swagger/paths/erm_licenses.yaml | 1 + t/db_dependent/api/v1/erm_eholdings_packages.t | 4 ++-- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/api/v1/swagger/paths/erm_agreements.yaml b/api/v1/swagger/paths/erm_agreements.yaml index 495914be1a..37233bdf37 100644 --- a/api/v1/swagger/paths/erm_agreements.yaml +++ b/api/v1/swagger/paths/erm_agreements.yaml @@ -181,8 +181,10 @@ - agreement_relationships - agreement_relationships.agreement - agreement_relationships.related_agreement + - agreement_packages + - agreement_packages.package - documents - - packages + - vendor collectionFormat: csv responses: 200: diff --git a/api/v1/swagger/paths/erm_eholdings_packages.yaml b/api/v1/swagger/paths/erm_eholdings_packages.yaml index 702e720e2e..a326dc5843 100644 --- a/api/v1/swagger/paths/erm_eholdings_packages.yaml +++ b/api/v1/swagger/paths/erm_eholdings_packages.yaml @@ -69,8 +69,9 @@ items: type: string enum: - - vendors + - vendor.name - resources+count + - resources collectionFormat: csv responses: 200: @@ -180,8 +181,10 @@ items: type: string enum: - - agreements - - resources + - package_agreements + - package_agreements.agreement + - resources+count + - vendor collectionFormat: csv responses: 200: diff --git a/api/v1/swagger/paths/erm_eholdings_packages_resources.yaml b/api/v1/swagger/paths/erm_eholdings_packages_resources.yaml index 7ade1c7bc0..696f495857 100644 --- a/api/v1/swagger/paths/erm_eholdings_packages_resources.yaml +++ b/api/v1/swagger/paths/erm_eholdings_packages_resources.yaml @@ -50,7 +50,7 @@ items: type: string enum: - - title.publication_title + - title collectionFormat: csv responses: 200: diff --git a/api/v1/swagger/paths/erm_licenses.yaml b/api/v1/swagger/paths/erm_licenses.yaml index d9f3efb1eb..0abc7cf424 100644 --- a/api/v1/swagger/paths/erm_licenses.yaml +++ b/api/v1/swagger/paths/erm_licenses.yaml @@ -160,6 +160,7 @@ enum: - user_roles - user_roles.patron + - vendor - documents collectionFormat: csv responses: diff --git a/t/db_dependent/api/v1/erm_eholdings_packages.t b/t/db_dependent/api/v1/erm_eholdings_packages.t index ecb4dc9f76..090ba879a8 100755 --- a/t/db_dependent/api/v1/erm_eholdings_packages.t +++ b/t/db_dependent/api/v1/erm_eholdings_packages.t @@ -182,8 +182,8 @@ subtest 'get() tests' => sub { # Return one EHoldings package with embed $t->get_ok( "//$userid:$password@/api/v1/erm/eholdings/local/packages/" . $ehpackage->package_id => - { 'x-koha-embed' => 'resources,resources.package' } )->status_is(200) - ->json_is( { %{ $ehpackage->to_api }, resources => [] } ); + { 'x-koha-embed' => 'resources+count' } )->status_is(200) + ->json_is( { %{ $ehpackage->to_api }, resources_count => 0 } ); # Unauthorized access $t->get_ok( -- 2.39.5