@@ -, +, @@ $ prove t/db_dependent/api/v1/biblios.t --- Koha/REST/V1/Biblios.pm | 4 ++-- api/v1/swagger/swagger.yaml | 2 +- t/db_dependent/api/v1/biblios.t | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) --- a/Koha/REST/V1/Biblios.pm +++ a/Koha/REST/V1/Biblios.pm @@ -496,7 +496,7 @@ sub add { try { my $headers = $c->req->headers; - my $flavour = $headers->header('x-marc-schema'); + my $flavour = $headers->header('x-record-schema'); $flavour //= C4::Context->preference('marcflavour'); my $record; @@ -571,7 +571,7 @@ sub update { try { my $headers = $c->req->headers; - my $flavour = $headers->header('x-marc-schema'); + my $flavour = $headers->header('x-record-schema'); $flavour //= C4::Context->preference('marcflavour'); my $frameworkcode = $headers->header('x-framework-id') || $biblio->frameworkcode; --- a/api/v1/swagger/swagger.yaml +++ a/api/v1/swagger/swagger.yaml @@ -384,7 +384,7 @@ parameters: type: string marc_schema_header: description: March schema. One of MARC21 or UNIMARC - name: x-marc-schema + name: x-record-schema in: header required: false type: string --- a/t/db_dependent/api/v1/biblios.t +++ a/t/db_dependent/api/v1/biblios.t @@ -1156,8 +1156,8 @@ subtest 'post() tests' => sub { } ); - $t->post_ok("//$userid:$password@/api/v1/biblios" => {'Content-Type' => 'application/marcxml+xml', 'x-framework-id' => $frameworkcode, "x-marc-schema" => 'INVALID'}) - ->status_is(400, 'Invalid header x-marc-schema'); + $t->post_ok("//$userid:$password@/api/v1/biblios" => {'Content-Type' => 'application/marcxml+xml', 'x-framework-id' => $frameworkcode, "x-record-schema" => 'INVALID'}) + ->status_is(400, 'Invalid header x-record-schema'); $t->post_ok("//$userid:$password@/api/v1/biblios" => {'Content-Type' => 'application/marcxml+xml', 'x-framework-id' => $frameworkcode} => $marcxml) ->status_is(200) --