[Bug 18890] New: REST API: Fix fetching operation spec in route chain
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18890 Bug ID: 18890 Summary: REST API: Fix fetching operation spec in route chain Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: lari.taskula@jns.fi QA Contact: testopia@bugs.koha-community.org Mojolicious::Plugin::OpenAPI version 1.17 added a feature for fetching API spec in route chain. For us, this type of functionality is used in authentication with our own workaround introduced in Bug 18137. Our own workaround no longer works if M::P::OpenAPI version >=1.17. When upgrading Mojolicious::Plugin::OpenAPI dependency, this patch will fix the issue. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18890 --- Comment #1 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 64774 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64774&action=edit Bug 18890: REST API: Fix fetching operation spec in route chain Mojolicious::Plugin::OpenAPI version 1.17 added a feature for fetching API spec in route chain. For us, this type of functionality is used in authentication with our own workaround introduced in Bug 18137. Our own workaround no longer works if M::P::OpenAPI version >=1.17. When upgrading Mojolicious::Plugin::OpenAPI dependency, this patch will fix the issue. To test: 1. prove t/db_dependent/api/v1 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18890 --- Comment #2 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 64777 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64777&action=edit Bug 18890: Fix cities.t The update also causes some tests authorization tests to fail with HTTP 400 response instead of the expected 401/403. It seems that the parameters were not properly validated before and the tests were mistakenly passing. To test: 1. prove t/db_dependent/api/v1/cities.t -- 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=18890 --- Comment #3 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 64778 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64778&action=edit Bug 18890: Fix holds.t The update also causes some tests authorization tests to fail with HTTP 400 response instead of the expected 401/403. It seems that the parameters were not properly validated before and the tests were mistakenly passing. To test: 1. prove t/db_dependent/api/v1/holds.t -- 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=18890 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |18137 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 [Bug 18137] REST API: Migrate from Mojolicious::Plugin::Swagger2 to Mojolicious::Plugin::OpenAPI -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18890 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lari.taskula@jns.fi |ity.org | -- 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=18890 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18890 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Web services |REST api QA Contact|testopia@bugs.koha-communit | |y.org | CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18890 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64774|0 |1 is obsolete| | --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 68370 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68370&action=edit Bug 18890: REST API: Fix fetching operation spec in route chain Mojolicious::Plugin::OpenAPI version 1.17 added a feature for fetching API spec in route chain. For us, this type of functionality is used in authentication with our own workaround introduced in Bug 18137. Our own workaround no longer works if M::P::OpenAPI version >=1.17. When upgrading Mojolicious::Plugin::OpenAPI dependency, this patch will fix the issue. To test: 1. prove t/db_dependent/api/v1 Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18890 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64777|0 |1 is obsolete| | --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 68371 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68371&action=edit Bug 18890: Fix cities.t The update also causes some tests authorization tests to fail with HTTP 400 response instead of the expected 401/403. It seems that the parameters were not properly validated before and the tests were mistakenly passing. To test: 1. prove t/db_dependent/api/v1/cities.t Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18890 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64778|0 |1 is obsolete| | --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 68372 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68372&action=edit Bug 18890: Fix holds.t The update also causes some tests authorization tests to fail with HTTP 400 response instead of the expected 401/403. It seems that the parameters were not properly validated before and the tests were mistakenly passing. To test: 1. prove t/db_dependent/api/v1/holds.t Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18890 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |mtompset@hotmail.com --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- Had to cpan2deb Mojolicious::Plugin::OpenAPI and JSON::Validator on a Debian 8 old git install to test. I tested cities and holds no problem. acquisition_vendors has a similar 400 vs 403 issue, but I didn't look into it. I'll Fail QA and hope for a patch to that test too, as the test plan in comment #1 is what triggered that problem. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18890 Bug 18890 depends on bug 18137, which changed state. Bug 18137 Summary: REST API: Migrate from Mojolicious::Plugin::Swagger2 to Mojolicious::Plugin::OpenAPI https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18890 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This is 6 years old now - is it still valid with the current implementation of our API? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18890 --- Comment #9 from Lari Taskula <lari.taskula@hypernova.fi> --- (In reply to Katrin Fischer from comment #8)
This is 6 years old now - is it still valid with the current implementation of our API?
Not valid. Already fixed by Bug 22522 Thanks for noticing this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18890 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |MOVED Status|Failed QA |RESOLVED --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thx for the feedback :) Closing. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org