Summary: | Allow fetching text-formatted MARC data | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | REST API | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | 1joynelson, lucas, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.05.00, 19.11.06
|
|
Circulation function: | |||
Bug Depends on: | 23677 | ||
Bug Blocks: | 24237 | ||
Attachments: |
Bug 24908: Unit tests
Bug 24908: Add text-formatted MARC support in /biblios/{biblio_id} Bug 24908: Unit tests Bug 24908: Add text-formatted MARC support in /biblios/{biblio_id} Bug 24908: Unit tests Bug 24908: Add text-formatted MARC support in /biblios/{biblio_id} |
Description
Tomás Cohen Arazi (tcohen)
2020-03-19 15:03:41 UTC
Created attachment 101028 [details] [review] Bug 24908: Unit tests Created attachment 101029 [details] [review] Bug 24908: Add text-formatted MARC support in /biblios/{biblio_id} This patch makes the route support requesting (through the Accept header) the MARC record to be output as formatted text as in $record->as_formatted. To test: 1. Apply the unit tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => FAIL: Tests fail 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Try the route with your favourite API testing tool (Postman?) => SUCCESS: Accept: text/plain returns the expected results => SUCCESS: Wrong Accept header returns a list of valid formats, and includes 'text/plain'. 6. Sign off :-D Created attachment 102158 [details] [review] Bug 24908: Unit tests Signed-off-by: David Nind <david@davidnind.com> Created attachment 102159 [details] [review] Bug 24908: Add text-formatted MARC support in /biblios/{biblio_id} This patch makes the route support requesting (through the Accept header) the MARC record to be output as formatted text as in $record->as_formatted. To test: 1. Apply the unit tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => FAIL: Tests fail 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Try the route with your favourite API testing tool (Postman?) => SUCCESS: Accept: text/plain returns the expected results => SUCCESS: Wrong Accept header returns a list of valid formats, and includes 'text/plain'. 6. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Created attachment 103750 [details] [review] Bug 24908: Unit tests Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 103751 [details] [review] Bug 24908: Add text-formatted MARC support in /biblios/{biblio_id} This patch makes the route support requesting (through the Accept header) the MARC record to be output as formatted text as in $record->as_formatted. To test: 1. Apply the unit tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/biblios.t => FAIL: Tests fail 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Try the route with your favourite API testing tool (Postman?) => SUCCESS: Accept: text/plain returns the expected results => SUCCESS: Wrong Accept header returns a list of valid formats, and includes 'text/plain'. 6. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Nice work everyone! Pushed to master for 20.05 backported to 19.11.x for 19.11.06 missing dependencies for 19.05.x, no backport |