diff --git a/Koha/REST/V1/Biblios.pm b/Koha/REST/V1/Biblios.pm index baf9d943be..9b4750b65e 100644 --- a/Koha/REST/V1/Biblios.pm +++ b/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; diff --git a/api/v1/swagger/swagger.yaml b/api/v1/swagger/swagger.yaml index 7d5e04f62d..10e09cbc8b 100644 --- a/api/v1/swagger/swagger.yaml +++ b/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 diff --git a/t/db_dependent/api/v1/biblios.t b/t/db_dependent/api/v1/biblios.t index d074084238..de45fe0eeb 100755 --- a/t/db_dependent/api/v1/biblios.t +++ b/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)