[Bug 23859] New: Cities endpoint not setting the Location header
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 Bug ID: 23859 Summary: Cities endpoint not setting the Location header Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: REST api Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23843 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23843 [Bug 23843] Make existing endpoints use Koha::Object(s)->to_api -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 94497 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94497&action=edit Bug 23859: Update tests to new style Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94497|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 94498 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94498&action=edit Bug 23859: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 94499 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94499&action=edit Bug 23859: Make POST add the Location header on cities endpoint According to the coding guidelines, this endpoint should be adding the Location header on POST actions. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/cities.t => FAIL: Tests fail! 3. Apply this patch 4. Repeat (1) => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 94500 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94500&action=edit Bug 23859: Update tests to new style The /cities endpoint is refered in several places as the reference implementation of a route for devs to pick it for copy and pasting. Yet, it is outdated in terms of how the tests are written. This patch rewrites some bits so it uses BASIC auth and the built-ins Test::Mojo provides. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_19_11_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94498|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 94938 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94938&action=edit Bug 23859: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94499|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 94939 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94939&action=edit Bug 23859: Make POST add the Location header on cities endpoint According to the coding guidelines, this endpoint should be adding the Location header on POST actions. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/cities.t => FAIL: Tests fail! 3. Apply this patch 4. Repeat (1) => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94500|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 94940 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94940&action=edit Bug 23859: Update tests to new style The /cities endpoint is refered in several places as the reference implementation of a route for devs to pick it for copy and pasting. Yet, it is outdated in terms of how the tests are written. This patch rewrites some bits so it uses BASIC auth and the built-ins Test::Mojo provides. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Trivial patch that improves the consistency of our API's. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23859 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_19_11_candidate | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org