From c6f74f753faf265a9b5eb2524c2955c8f927db65 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 29 Apr 2024 10:00:42 +0000 Subject: [PATCH] Bug 35197: (QA follow-up): Update tablename prove t/db_dependent/api/v1/additional_fields.t Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- Koha/REST/V1/AdditionalFields.pm | 2 +- api/v1/swagger/paths/additional_fields.yaml | 2 +- t/db_dependent/api/v1/additional_fields.t | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Koha/REST/V1/AdditionalFields.pm b/Koha/REST/V1/AdditionalFields.pm index db9e2ed8d2..21f4b899d5 100644 --- a/Koha/REST/V1/AdditionalFields.pm +++ b/Koha/REST/V1/AdditionalFields.pm @@ -34,7 +34,7 @@ use Try::Tiny qw( catch try ); sub list { my $c = shift->openapi->valid_input or return; - my $tablename = $c->param('tablename'); + my $tablename = $c->param('table_name'); return try { my $additional_fields_set = Koha::AdditionalFields->new; diff --git a/api/v1/swagger/paths/additional_fields.yaml b/api/v1/swagger/paths/additional_fields.yaml index 3f5b5b651f..887dba81b9 100644 --- a/api/v1/swagger/paths/additional_fields.yaml +++ b/api/v1/swagger/paths/additional_fields.yaml @@ -11,7 +11,7 @@ parameters: - description: filter by table name in: query - name: tablename + name: table_name type: string - $ref: "../swagger.yaml#/parameters/match" - $ref: "../swagger.yaml#/parameters/order_by" diff --git a/t/db_dependent/api/v1/additional_fields.t b/t/db_dependent/api/v1/additional_fields.t index 6c0a9fdb5a..29b7c4e30e 100755 --- a/t/db_dependent/api/v1/additional_fields.t +++ b/t/db_dependent/api/v1/additional_fields.t @@ -99,7 +99,7 @@ subtest 'list() tests' => sub { ); # Filtering works, two agreements sharing vendor_id - $t->get_ok( "//$userid:$password@/api/v1/additional_fields?tablename=" . $additional_field->tablename ) + $t->get_ok( "//$userid:$password@/api/v1/additional_fields?table_name=" . $additional_field->tablename ) ->status_is(200)->json_is( [ $additional_field->to_api, $another_additional_field->to_api ] ); # Warn on unsupported query parameter -- 2.39.5