[Bug 18137] New: REST API: Migrate from Mojolicious::Plugin:: Swagger2 to Mojolicious::Plugin::OpenAPI
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Bug ID: 18137 Summary: REST API: Migrate from Mojolicious::Plugin::Swagger2 to Mojolicious::Plugin::OpenAPI Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: lari.taskula@jns.fi QA Contact: testopia@bugs.koha-community.org As "the Swagger2 distribution is no longer actively maintained", migrate from Mojolicious::Plugin::Swagger2 to Mojolicious::Plugin::OpenAPI. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #1 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 60490 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60490&action=edit Bug 18137: List Mojolicious::Plugin::OpenAPI as Perl dependency This patch also upgrades Mojolicious version requirement to 6.40 as it is the minimum requirement set by Mojolicious::Plugin::OpenAPI. To test: 1. sudo cpanm Mojolicious::Plugin::OpenAPI@1.10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #2 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 60491 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60491&action=edit Bug 18137: Add useful Koha::Exceptions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #3 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 60492 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60492&action=edit Bug 18137: Migrate from Swagger2 to Mojolicious::Plugin::OpenAPI This patch migrates from Swagger2 to Mojolicious::Plugin::OpenAPI as Swagger2 is no longer actively maintained. This migration involves some minor changes to our Swagger specification documents and to controllers. Each operation is migrated in following patches separately. Please see Mojolicious::Plugin::OpenAPI and its tutorial for more documentation. The patch also refactors some API authentication -related code by taking advantage of Koha::Exceptions. Authentication is now handled via Mojolicious's "under->to" functionality. The actual authentication & authorization checks are moved to Koha::REST::V1::Auth. Added a HTTP 503 response for when database update is required, instead of returning an authentication failure as before. To test: 1. prove t/db_dependent/api/v1/auth.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #4 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 60493 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60493&action=edit Bug 18137: Make /patrons Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. - fixing failing test due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/patrons.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #5 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 60494 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60494&action=edit Bug 18137: Make /cities Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. To test: 1. prove t/db_dependent/api/v1/cities.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #6 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 60495 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60495&action=edit Bug 18137: Make /holds Mojolicious::Plugin::OpenAPI compatible Also - adding some missing and new response definitions into Swagger spec. - fixing failing tests due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/holds.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|gmcharlt@gmail.com |lari.taskula@jns.fi --- Comment #7 from Lari Taskula <lari.taskula@jns.fi> --- Mojolicious::Plugin::OpenAPI is at the time of this post at version 1.09 in CPAN, however I am having problems with the CPAN version, as follows: Could not load document from /home/ubuntu/kohaclone/api/v1/swagger/../parameters.json: Can't open file "/home/ubuntu/kohaclone/api/v1/swagger/../parameters.json": No such file or directory at /usr/local/share/perl/5.18.2/JSON/Validator.pm line 140. Fortunately, it looks like Mojolicious::Plugin::OpenAPI version 1.10 (currently at unreleased status in GitHub) fixes this issue. So if you are testing this before 1.10 is released, I would suggest using the source provided directly in GitHub. https://github.com/jhthorsen/mojolicious-plugin-openapi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Keywords| |dependency -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mirko@abunchofthings.net -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #8 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 60533 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60533&action=edit Bug 18137: Remove x-mojo-around-action Mojolicious::Plugin::OpenAPI does not support x-mojo-around action. This patch removes it from our specification document. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #9 from Lari Taskula <lari.taskula@jns.fi> --- (In reply to Lari Taskula from comment #7)
Mojolicious::Plugin::OpenAPI is at the time of this post at version 1.09 in CPAN, however I am having problems with the CPAN version, as follows:
Could not load document from /home/ubuntu/kohaclone/api/v1/swagger/../parameters.json: Can't open file "/home/ubuntu/kohaclone/api/v1/swagger/../parameters.json": No such file or directory at /usr/local/share/perl/5.18.2/JSON/Validator.pm line 140.
Fortunately, it looks like Mojolicious::Plugin::OpenAPI version 1.10 (currently at unreleased status in GitHub) fixes this issue. So if you are testing this before 1.10 is released, I would suggest using the source provided directly in GitHub. https://github.com/jhthorsen/mojolicious-plugin-openapi It appears v 1.10 was released right after I posted this. So cpanm Mojolicious::Plugin::OpenAPI@1.10 should be fine.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #10 from Lari Taskula <lari.taskula@jns.fi> --- I would like to point out that I am experiencing an issue with JSON::Validator, where $refs are sometimes left unresolved in our spec and it causes some error messages and crashes. This issue is being tracked at https://github.com/jhthorsen/json-validator/pull/52. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60490|0 |1 is obsolete| | --- Comment #11 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 60837 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60837&action=edit Bug 18137: List Mojolicious::Plugin::OpenAPI as Perl dependency This patch also upgrades Mojolicious version requirement to 6.40 as it is the minimum requirement set by Mojolicious::Plugin::OpenAPI. To test: 1. sudo cpanm Mojolicious::Plugin::OpenAPI@1.10 Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60491|0 |1 is obsolete| | --- Comment #12 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 60838 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60838&action=edit Bug 18137: Add useful Koha::Exceptions Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60492|0 |1 is obsolete| | --- Comment #13 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 60839 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60839&action=edit Bug 18137: Migrate from Swagger2 to Mojolicious::Plugin::OpenAPI This patch migrates from Swagger2 to Mojolicious::Plugin::OpenAPI as Swagger2 is no longer actively maintained. This migration involves some minor changes to our Swagger specification documents and to controllers. Each operation is migrated in following patches separately. Please see Mojolicious::Plugin::OpenAPI and its tutorial for more documentation. The patch also refactors some API authentication -related code by taking advantage of Koha::Exceptions. Authentication is now handled via Mojolicious's "under->to" functionality. The actual authentication & authorization checks are moved to Koha::REST::V1::Auth. Added a HTTP 503 response for when database update is required, instead of returning an authentication failure as before. To test: 1. prove t/db_dependent/api/v1/auth.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60493|0 |1 is obsolete| | --- Comment #14 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 60840 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60840&action=edit Bug 18137: Make /patrons Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. - fixing failing test due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/patrons.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60494|0 |1 is obsolete| | --- Comment #15 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 60841 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60841&action=edit Bug 18137: Make /cities Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. To test: 1. prove t/db_dependent/api/v1/cities.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60495|0 |1 is obsolete| | --- Comment #16 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 60842 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60842&action=edit Bug 18137: Make /holds Mojolicious::Plugin::OpenAPI compatible Also - adding some missing and new response definitions into Swagger spec. - fixing failing tests due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/holds.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60533|0 |1 is obsolete| | --- Comment #17 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 60843 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60843&action=edit Bug 18137: Remove x-mojo-around-action Mojolicious::Plugin::OpenAPI does not support x-mojo-around action. This patch removes it from our specification document. Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #18 from Lari Taskula <lari.taskula@jns.fi> --- (In reply to Lari Taskula from comment #10)
I would like to point out that I am experiencing an issue with JSON::Validator, where $refs are sometimes left unresolved in our spec and it causes some error messages and crashes. This issue is being tracked at https://github.com/jhthorsen/json-validator/pull/52.
The developer of JSON::Validator has been working hard on it and it now seems to have been fixed. The fix will appear in version 0.96 of JSON::Validator. That should probably be added as dependency once it is released. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com --- Comment #19 from Josef Moravec <josef.moravec@gmail.com> --- Just tested, looks good for me, just a minor issue found by qa test tool: FAIL Koha/REST/V1/Auth.pm FAIL pod in file Koha/REST/V1/Auth.pm *** WARNING: =head3 without preceding higher level -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18205 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18205 [Bug 18205] REST interface to Koha::Logger -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #20 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 60866 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60866&action=edit Bug 18137: (follow-up) Fix handling DBIx::Class::Exception messages - DBIx::Class::Exception should use ->{msg} -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #21 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 60867 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60867&action=edit Bug 18137: (QA-follow-up) Fix pod fail -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I like it, and I'm testing it. My only concern is dependencies. I tried to install Mojolicious 6.40 along with Mojolicious::Plugin::OpenAPI 1.10 and it wouldn't install. 1.10 needs newer Mojo (7.something). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #23 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pleaes provide feedback about the dependencies so I can test it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #24 from Mirko Tietgen <mirko@abunchofthings.net> --- I submitted Mojolicious::Plugin::OpenAPI to Debian a few days ago (1.10). 1.13 is out by now. And both versions depend on versions of libjson-validator-perl not yet in Debian unstable, and the tests in the latest version are broken. Can't build at the moment, but it seemed possible to get everything working in Jessie (including Mojolicious 7.x). I'll give an update when I know more. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #25 from Lari Taskula <lari.taskula@jns.fi> --- (In reply to Mirko Tietgen from comment #24)
I submitted Mojolicious::Plugin::OpenAPI to Debian a few days ago (1.10). 1.13 is out by now. And both versions depend on versions of libjson-validator-perl not yet in Debian unstable, and the tests in the latest version are broken. Thanks for looking at this Mirko!
I had a look at JSON::Validator version 0.96. There indeed seemed to be some issues with the tests in the latest version. I noticed there is a commit to json-validator in GitHub as well as some IRC discussion in #swagger @irc.perl.org suggesting that tests are broken on an older version of Test::More. Using the latest version of Test::More passes the tests. I tested an older version of Test::More (1.001014) and tests are indeed failing: $ sudo cpanm Test::More@1.001014 --> Working on Test::More Fetching http://backpan.perl.org/authors/id/E/EX/EXODIST/Test-Simple-1.001014.tar.gz ... OK Configuring Test-Simple-1.001014 ... OK Building and testing Test-Simple-1.001014 ... OK Successfully installed Test-Simple-1.001014 (downgraded from 1.302078) 1 distribution installed $ prove t .. .. Test Summary Report ------------------- t/acceptance.t (Wstat: 0 Tests: 265 Failed: 0) TODO passed: 45-47, 49-52, 56-57 t/jv-formats.t (Wstat: 256 Tests: 28 Failed: 1) Failed test: 27 Non-zero exit status: 1 t/jv-object.t (Wstat: 256 Tests: 19 Failed: 1) Failed test: 18 Non-zero exit status: 1 t/openapi-formats.t (Wstat: 512 Tests: 24 Failed: 2) Failed tests: 12, 22 Non-zero exit status: 2 t/openapi-response.t (Wstat: 0 Tests: 7 Failed: 0) TODO passed: 1 t/openapi.t (Wstat: 0 Tests: 8 Failed: 0) TODO passed: 1 Files=44, Tests=558, 11 wallclock secs ( 0.24 usr 0.06 sys + 9.82 cusr 1.04 csys = 11.16 CPU) Result: FAIL Whereas the new version passes: $ sudo cpanm Test::More --> Working on Test::More Fetching http://www.cpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302078.tar.gz ... OK Configuring Test-Simple-1.302078 ... OK Building and testing Test-Simple-1.302078 ... OK Successfully installed Test-Simple-1.302078 (upgraded from 1.001014) 1 distribution installed $ prove t .. .. All tests successful. Test Summary Report ------------------- t/acceptance.t (Wstat: 0 Tests: 265 Failed: 0) TODO passed: 45-47, 49-52, 56-57 t/jv-object.t (Wstat: 0 Tests: 19 Failed: 0) TODO passed: 9 t/openapi-formats.t (Wstat: 0 Tests: 24 Failed: 0) TODO passed: 7, 10-11 t/openapi-response.t (Wstat: 0 Tests: 7 Failed: 0) TODO passed: 1 t/openapi.t (Wstat: 0 Tests: 8 Failed: 0) TODO passed: 1 Files=44, Tests=558, 12 wallclock secs ( 0.23 usr 0.08 sys + 10.66 cusr 1.12 csys = 12.09 CPU) Result: PASS Could this be related to the issue you were having with the tests? Anyway, as a side note to comment #18, Mojolicious::Plugin::OpenAPI 1.13 has a requirement for JSON::Validator 0.95, which is not enough for us. We need JSON::Validator 0.96 or newer. It will be a requirement in currently unreleased Mojolicious::Plugin::OpenAPI version 1.14. Should we wait for that or explicitly define requirement for JSON::Validator 0.96 in PerlDependencies.pm? What comes to Mojolicious - I've attempted to run our REST API on Mojolicious 7.26 and so far it seems ok. Tests are also passing for me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #26 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 61163 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61163&action=edit Bug 18137: (follow-up) operationId must be unique operationId has the following documentation: "Unique string used to identify the operation. The id MUST be unique among all operations described in the API." This patch modifies operationIds to be unique accross our API operations. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |16497 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16497 [Bug 16497] REST API: add routes to list libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #27 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 61166 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61166&action=edit Bug 18137: (follow-up) Sort definitions.json Before this file grows, we should sort it alphabetically. To test: 1. prove t/db_dependent/api/v1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18282 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18282 [Bug 18282] OpenAPI operationId must be unique -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61163|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=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17479 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17479 [Bug 17479] REST API: Save information on owner access -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |16825 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16825 [Bug 16825] REST API: Add API route for getting an item -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #28 from Mirko Tietgen <mirko@abunchofthings.net> --- (In reply to Lari Taskula from comment #25)
Anyway, as a side note to comment #18, Mojolicious::Plugin::OpenAPI 1.13 has a requirement for JSON::Validator 0.95, which is not enough for us. We need JSON::Validator 0.96 or newer. It will be a requirement in currently unreleased Mojolicious::Plugin::OpenAPI version 1.14. Should we wait for that or explicitly define requirement for JSON::Validator 0.96 in PerlDependencies.pm?
We can define it now and maybe have to adjust in case it changes. Mojolicious::Plugin::OpenAPI 1.14 is not released yet, I can't work further on the Debian package until it is. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60837|0 |1 is obsolete| | --- Comment #29 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62780 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62780&action=edit Bug 18137: List Mojolicious::Plugin::OpenAPI as Perl dependency This patch also upgrades Mojolicious version requirement to 6.40 as it is the minimum requirement set by Mojolicious::Plugin::OpenAPI. To test: 1. sudo cpanm Mojolicious::Plugin::OpenAPI@1.10 Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60838|0 |1 is obsolete| | --- Comment #30 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62781 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62781&action=edit Bug 18137: Add useful Koha::Exceptions Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60839|0 |1 is obsolete| | --- Comment #31 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62782 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62782&action=edit Bug 18137: Migrate from Swagger2 to Mojolicious::Plugin::OpenAPI This patch migrates from Swagger2 to Mojolicious::Plugin::OpenAPI as Swagger2 is no longer actively maintained. This migration involves some minor changes to our Swagger specification documents and to controllers. Each operation is migrated in following patches separately. Please see Mojolicious::Plugin::OpenAPI and its tutorial for more documentation. The patch also refactors some API authentication -related code by taking advantage of Koha::Exceptions. Authentication is now handled via Mojolicious's "under->to" functionality. The actual authentication & authorization checks are moved to Koha::REST::V1::Auth. Added a HTTP 503 response for when database update is required, instead of returning an authentication failure as before. To test: 1. prove t/db_dependent/api/v1/auth.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60840|0 |1 is obsolete| | --- Comment #32 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62783 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62783&action=edit Bug 18137: Make /patrons Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. - fixing failing test due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/patrons.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60841|0 |1 is obsolete| | --- Comment #33 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62784 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62784&action=edit Bug 18137: Make /cities Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. To test: 1. prove t/db_dependent/api/v1/cities.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60842|0 |1 is obsolete| | --- Comment #34 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62785 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62785&action=edit Bug 18137: Make /holds Mojolicious::Plugin::OpenAPI compatible Also - adding some missing and new response definitions into Swagger spec. - fixing failing tests due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/holds.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60843|0 |1 is obsolete| | --- Comment #35 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62786 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62786&action=edit Bug 18137: Remove x-mojo-around-action Mojolicious::Plugin::OpenAPI does not support x-mojo-around action. This patch removes it from our specification document. Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60866|0 |1 is obsolete| | --- Comment #36 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62787 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62787&action=edit Bug 18137: (follow-up) Fix handling DBIx::Class::Exception messages - DBIx::Class::Exception should use ->{msg} -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60867|0 |1 is obsolete| | --- Comment #37 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62788 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62788&action=edit Bug 18137: (QA-follow-up) Fix pod fail -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61166|0 |1 is obsolete| | --- Comment #38 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62789 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62789&action=edit Bug 18137: (follow-up) Sort definitions.json Before this file grows, we should sort it alphabetically. To test: 1. prove t/db_dependent/api/v1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #39 from Lari Taskula <lari.taskula@jns.fi> --- Just rebasing these on master and squashing some forgotten "use"s into Koha::REST::V1::Auth. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #40 from Mirko Tietgen <mirko@abunchofthings.net> --- (In reply to Mirko Tietgen from comment #28)
Mojolicious::Plugin::OpenAPI 1.14 is not released yet, I can't work further on the Debian package until it is.
@ Lari: JSON::Validator 0.97 has been released. Mojolicious::Plugin::OpenAPI 1.14 has not been released. If I understand correctly, Mojolicious::Plugin::OpenAPI 1.14 is not a requirement for us, just JSON::Validator 0.96?.Then please specify 0.96 as a dependency and I will check if I can build JSON::Validator 0.97 and Mojolicious::Plugin::OpenAPI 1.13 now after the update. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #41 from Lari Taskula <lari.taskula@jns.fi> --- (In reply to Mirko Tietgen from comment #40)
(In reply to Mirko Tietgen from comment #28)
Mojolicious::Plugin::OpenAPI 1.14 is not released yet, I can't work further on the Debian package until it is.
@ Lari:
JSON::Validator 0.97 has been released. Mojolicious::Plugin::OpenAPI 1.14 has not been released.
If I understand correctly, Mojolicious::Plugin::OpenAPI 1.14 is not a requirement for us, just JSON::Validator 0.96?.Then please specify 0.96 as a dependency and I will check if I can build JSON::Validator 0.97 and Mojolicious::Plugin::OpenAPI 1.13 now after the update. (In reply to Mirko Tietgen from comment #40) (In reply to Mirko Tietgen from comment #28)
Mojolicious::Plugin::OpenAPI 1.14 is not released yet, I can't work further on the Debian package until it is.
@ Lari:
JSON::Validator 0.97 has been released. Mojolicious::Plugin::OpenAPI 1.14 has not been released.
If I understand correctly, Mojolicious::Plugin::OpenAPI 1.14 is not a requirement for us, just JSON::Validator 0.96?.Then please specify 0.96 as a dependency and I will check if I can build JSON::Validator 0.97 and Mojolicious::Plugin::OpenAPI 1.13 now after the update.
Thanks for checking! I'll do that! Also, Tomas experienced issues in installing Mojolicious 6.40 together with M::P::OpenAPI 1.10 - I couldn't reproduce this issue, but perhaps it is a safe bet to upgrade Mojolicious at the same time. We have been successfully running Koha REST API on Mojolicious versions between 7.26-7.29, and Koha's REST tests are also passing on the latest release 7.31. This upgrade will fail test t/db_dependent/api/v1/swagger/definitions.t. I will try to patch that in another Bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62780|0 |1 is obsolete| | --- Comment #42 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 62816 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62816&action=edit Bug 18137: List Mojolicious::Plugin::OpenAPI and JSON::Validator as dependencies Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18508 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18508 [Bug 18508] Fix t/db_dependent/api/v1/swagger/definitions.t (follow-up of 18137) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #43 from Lari Taskula <lari.taskula@jns.fi> --- (In reply to Lari Taskula from comment #41)
This upgrade will fail test t/db_dependent/api/v1/swagger/definitions.t. I will try to patch that in another Bug. Bug 18508
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Josef Moravec <josef.moravec@gmail.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=18137 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62781|0 |1 is obsolete| | Attachment #62782|0 |1 is obsolete| | Attachment #62783|0 |1 is obsolete| | Attachment #62784|0 |1 is obsolete| | Attachment #62785|0 |1 is obsolete| | Attachment #62786|0 |1 is obsolete| | Attachment #62787|0 |1 is obsolete| | Attachment #62788|0 |1 is obsolete| | Attachment #62789|0 |1 is obsolete| | Attachment #62816|0 |1 is obsolete| | --- Comment #44 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63025 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63025&action=edit [SIGNED-OFF] Bug 18137: Add useful Koha::Exceptions Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #45 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63026 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63026&action=edit [SIGNED-OFF] Bug 18137: Migrate from Swagger2 to Mojolicious::Plugin::OpenAPI This patch migrates from Swagger2 to Mojolicious::Plugin::OpenAPI as Swagger2 is no longer actively maintained. This migration involves some minor changes to our Swagger specification documents and to controllers. Each operation is migrated in following patches separately. Please see Mojolicious::Plugin::OpenAPI and its tutorial for more documentation. The patch also refactors some API authentication -related code by taking advantage of Koha::Exceptions. Authentication is now handled via Mojolicious's "under->to" functionality. The actual authentication & authorization checks are moved to Koha::REST::V1::Auth. Added a HTTP 503 response for when database update is required, instead of returning an authentication failure as before. To test: 1. prove t/db_dependent/api/v1/auth.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #46 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63027 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63027&action=edit [SIGNED-OFF] Bug 18137: Make /patrons Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. - fixing failing test due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/patrons.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #47 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63028 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63028&action=edit [SIGNED-OFF] Bug 18137: Make /cities Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. To test: 1. prove t/db_dependent/api/v1/cities.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #48 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63029 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63029&action=edit [SIGNED-OFF] Bug 18137: Make /holds Mojolicious::Plugin::OpenAPI compatible Also - adding some missing and new response definitions into Swagger spec. - fixing failing tests due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/holds.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #49 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63030 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63030&action=edit [SIGNED-OFF] Bug 18137: Remove x-mojo-around-action Mojolicious::Plugin::OpenAPI does not support x-mojo-around action. This patch removes it from our specification document. Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #50 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63031 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63031&action=edit [SIGNED-OFF] Bug 18137: (follow-up) Fix handling DBIx::Class::Exception messages - DBIx::Class::Exception should use ->{msg} Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #51 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63032 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63032&action=edit [SIGNED-OFF] Bug 18137: (QA-follow-up) Fix pod fail Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #52 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63033 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63033&action=edit [SIGNED-OFF] Bug 18137: (follow-up) Sort definitions.json Before this file grows, we should sort it alphabetically. To test: 1. prove t/db_dependent/api/v1 Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #53 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63034 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63034&action=edit [SIGNED-OFF] Bug 18137: List Mojolicious::Plugin::OpenAPI and JSON::Validator as dependencies Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #54 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Ok, I tested this successfully using: $ sudo cpanm Mojolicious@7.31 $ sudo cpanm JSON::Validator@0.96 $ sudo cpanm Mojolicious::Plugin::OpenAPI@1.13 Tests pass: kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/db_dependent/api/v1/ t/db_dependent/api/v1/auth.t ..... Use of uninitialized value $lasttime in numeric lt (<) at /home/vagrant/kohaclone/C4/Auth.pm line 1673. t/db_dependent/api/v1/auth.t ..... ok t/db_dependent/api/v1/cities.t ... ok t/db_dependent/api/v1/holds.t .... ok t/db_dependent/api/v1/patrons.t .. ok All tests successful. Files=4, Tests=31, 10 wallclock secs ( 0.05 usr 0.00 sys + 8.52 cusr 1.26 csys = 9.83 CPU) Result: PASS I also tested the API using Firefox's HttpRequester, with excellent results. I'm signing this patchset, but will wait for Mirko to tell about the deps, because otherwise we could end up breaking the stable release due to unpackaged dependencies. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63025|0 |1 is obsolete| | --- Comment #55 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63177 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63177&action=edit Bug 18137: Add useful Koha::Exceptions Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63026|0 |1 is obsolete| | --- Comment #56 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63178 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63178&action=edit Bug 18137: Migrate from Swagger2 to Mojolicious::Plugin::OpenAPI This patch migrates from Swagger2 to Mojolicious::Plugin::OpenAPI as Swagger2 is no longer actively maintained. This migration involves some minor changes to our Swagger specification documents and to controllers. Each operation is migrated in following patches separately. Please see Mojolicious::Plugin::OpenAPI and its tutorial for more documentation. The patch also refactors some API authentication -related code by taking advantage of Koha::Exceptions. Authentication is now handled via Mojolicious's "under->to" functionality. The actual authentication & authorization checks are moved to Koha::REST::V1::Auth. Added a HTTP 503 response for when database update is required, instead of returning an authentication failure as before. To test: 1. prove t/db_dependent/api/v1/auth.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63027|0 |1 is obsolete| | --- Comment #57 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63179 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63179&action=edit Bug 18137: Make /patrons Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. - fixing failing test due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/patrons.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63029|0 |1 is obsolete| | --- Comment #58 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63180 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63180&action=edit Bug 18137: Make /cities Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. To test: 1. prove t/db_dependent/api/v1/cities.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 --- Comment #59 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63181 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63181&action=edit Bug 18137: Make /holds Mojolicious::Plugin::OpenAPI compatible Also - adding some missing and new response definitions into Swagger spec. - fixing failing tests due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/holds.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 --- Comment #60 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63182 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63182&action=edit Bug 18137: Remove x-mojo-around-action Mojolicious::Plugin::OpenAPI does not support x-mojo-around action. This patch removes it from our specification document. Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63030|0 |1 is obsolete| | --- Comment #61 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63183 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63183&action=edit Bug 18137: (follow-up) Fix handling DBIx::Class::Exception messages - DBIx::Class::Exception should use ->{msg} Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63031|0 |1 is obsolete| | --- Comment #62 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63184 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63184&action=edit Bug 18137: (QA-follow-up) Fix pod fail Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63032|0 |1 is obsolete| | --- Comment #63 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63185 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63185&action=edit Bug 18137: (follow-up) Sort definitions.json Before this file grows, we should sort it alphabetically. To test: 1. prove t/db_dependent/api/v1 Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63034|0 |1 is obsolete| | --- Comment #64 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63186 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63186&action=edit Bug 18137: List Mojolicious::Plugin::OpenAPI and JSON::Validator as dependencies Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63028|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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63033|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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63177|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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63178|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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63179|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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63180|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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63181|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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63182|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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63183|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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63184|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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63185|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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63186|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=18137 --- Comment #65 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I messed up with the packages/obsoletes, re-submitting. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #66 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63187 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63187&action=edit Bug 18137: Add useful Koha::Exceptions Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 --- Comment #67 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63188 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63188&action=edit Bug 18137: Migrate from Swagger2 to Mojolicious::Plugin::OpenAPI This patch migrates from Swagger2 to Mojolicious::Plugin::OpenAPI as Swagger2 is no longer actively maintained. This migration involves some minor changes to our Swagger specification documents and to controllers. Each operation is migrated in following patches separately. Please see Mojolicious::Plugin::OpenAPI and its tutorial for more documentation. The patch also refactors some API authentication -related code by taking advantage of Koha::Exceptions. Authentication is now handled via Mojolicious's "under->to" functionality. The actual authentication & authorization checks are moved to Koha::REST::V1::Auth. Added a HTTP 503 response for when database update is required, instead of returning an authentication failure as before. To test: 1. prove t/db_dependent/api/v1/auth.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 --- Comment #68 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63189 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63189&action=edit Bug 18137: Make /patrons Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. - fixing failing test due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/patrons.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 --- Comment #69 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63190 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63190&action=edit Bug 18137: Make /cities Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. To test: 1. prove t/db_dependent/api/v1/cities.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 --- Comment #70 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63191 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63191&action=edit Bug 18137: Make /holds Mojolicious::Plugin::OpenAPI compatible Also - adding some missing and new response definitions into Swagger spec. - fixing failing tests due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/holds.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 --- Comment #71 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63192 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63192&action=edit Bug 18137: Remove x-mojo-around-action Mojolicious::Plugin::OpenAPI does not support x-mojo-around action. This patch removes it from our specification document. Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 --- Comment #72 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63193 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63193&action=edit Bug 18137: (follow-up) Fix handling DBIx::Class::Exception messages - DBIx::Class::Exception should use ->{msg} Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 --- Comment #73 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63194 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63194&action=edit Bug 18137: (QA-follow-up) Fix pod fail Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 --- Comment #74 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63195 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63195&action=edit Bug 18137: (follow-up) Sort definitions.json Before this file grows, we should sort it alphabetically. To test: 1. prove t/db_dependent/api/v1 Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 --- Comment #75 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 63196 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63196&action=edit Bug 18137: List Mojolicious::Plugin::OpenAPI and JSON::Validator as dependencies Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63196|0 |1 is obsolete| | --- Comment #76 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 63283 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63283&action=edit Bug 18137: List Mojolicious::Plugin::OpenAPI and JSON::Validator as dependencies Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 --- Comment #77 from Lari Taskula <lari.taskula@jns.fi> --- (In reply to Lari Taskula from comment #76)
Created attachment 63283 [details] [review] Bug 18137: List Mojolicious::Plugin::OpenAPI and JSON::Validator as dependencies
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Rebased on master. This patch now maintains requirement as defined by Bug 17190. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18407 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18407 [Bug 18407] REST API: Include renewability information on checkouts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #78 from Mirko Tietgen <mirko@abunchofthings.net> --- I have uploaded libmojolicious-perl_7.21+dfsg-1~kohadev1 to the unstable repository. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #79 from Mirko Tietgen <mirko@abunchofthings.net> --- I have uploaded preliminary versions of libjson-validator-perl_0.97-1_all.deb libmojolicious-plugin-openapi-perl_1.15-1~kohadev1_all.deb to the unstable repository. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #80 from Mirko Tietgen <mirko@abunchofthings.net> --- I have uploaded preliminary versions of libjson-validator-perl_0.97-1~kohadev1_all.deb libmojolicious-plugin-openapi-perl_1.15-1~kohadev1_all.deb to the unstable repository -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #81 from Mirko Tietgen <mirko@abunchofthings.net> --- According to Tomás, the newer versions break dev setups, so we are back to libmojolicious-perl 6.15 and libjson-validator-perl 0.67 for the time being. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18890 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18890 [Bug 18890] REST API: Fix fetching operation spec in route chain -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17505 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17505 [Bug 17505] REST API: Add route for messaging preferences -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63187|0 |1 is obsolete| | --- Comment #82 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 65106 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65106&action=edit Bug 18137: Add useful Koha::Exceptions Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63188|0 |1 is obsolete| | --- Comment #83 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 65107 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65107&action=edit Bug 18137: Migrate from Swagger2 to Mojolicious::Plugin::OpenAPI This patch migrates from Swagger2 to Mojolicious::Plugin::OpenAPI as Swagger2 is no longer actively maintained. This migration involves some minor changes to our Swagger specification documents and to controllers. Each operation is migrated in following patches separately. Please see Mojolicious::Plugin::OpenAPI and its tutorial for more documentation. The patch also refactors some API authentication -related code by taking advantage of Koha::Exceptions. Authentication is now handled via Mojolicious's "under->to" functionality. The actual authentication & authorization checks are moved to Koha::REST::V1::Auth. Added a HTTP 503 response for when database update is required, instead of returning an authentication failure as before. To test: 1. prove t/db_dependent/api/v1/auth.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63189|0 |1 is obsolete| | --- Comment #84 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 65108 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65108&action=edit Bug 18137: Make /patrons Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. - fixing failing test due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/patrons.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63190|0 |1 is obsolete| | --- Comment #85 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 65109 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65109&action=edit Bug 18137: Make /cities Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. To test: 1. prove t/db_dependent/api/v1/cities.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63191|0 |1 is obsolete| | --- Comment #86 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 65110 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65110&action=edit Bug 18137: Make /holds Mojolicious::Plugin::OpenAPI compatible Also - adding some missing and new response definitions into Swagger spec. - fixing failing tests due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/holds.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63192|0 |1 is obsolete| | --- Comment #87 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 65111 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65111&action=edit Bug 18137: Remove x-mojo-around-action Mojolicious::Plugin::OpenAPI does not support x-mojo-around action. This patch removes it from our specification document. Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63193|0 |1 is obsolete| | --- Comment #88 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 65112 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65112&action=edit Bug 18137: (follow-up) Fix handling DBIx::Class::Exception messages - DBIx::Class::Exception should use ->{msg} Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63194|0 |1 is obsolete| | --- Comment #89 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 65113 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65113&action=edit Bug 18137: (QA-follow-up) Fix pod fail Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63195|0 |1 is obsolete| | --- Comment #90 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 65114 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65114&action=edit Bug 18137: (follow-up) Sort definitions.json Before this file grows, we should sort it alphabetically. To test: 1. prove t/db_dependent/api/v1 Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63283|0 |1 is obsolete| | --- Comment #91 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 65115 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65115&action=edit Bug 18137: List Mojolicious::Plugin::OpenAPI and JSON::Validator as dependencies Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #92 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- The QA script reports POD coverage issues. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |11897 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11897 [Bug 11897] Stock Rotation for Koha -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65115|0 |1 is obsolete| | --- Comment #93 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 65404 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65404&action=edit Bug 18137: List Mojolicious::Plugin::OpenAPI and JSON::Validator as dependencies Edit (tcohen): I've changed the version numbers to match those Mirko has already successfully packaged and are known to work for this patchset. Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19037 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19037 [Bug 19037] Circulation and fine rules test tool -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #94 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I get a warning and a failure from tests: t/db_dependent/api/v1/auth.t ................. Use of uninitialized value $lasttime in numeric lt (<) at /home/vagrant/kohaclone/C4/Auth.pm line 1679. t/db_dependent/api/v1/swagger/definitions.t .. Can't locate object method "cache_dir" via package "Swagger2::SchemaValidator" at /usr/share/perl5/Swagger2.pm line 41. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #95 from Lari Taskula <lari.taskula@jns.fi> --- (In reply to Jonathan Druart from comment #94)
I get a warning and a failure from tests:
t/db_dependent/api/v1/auth.t ................. Use of uninitialized value $lasttime in numeric lt (<) at /home/vagrant/kohaclone/C4/Auth.pm line 1679.
t/db_dependent/api/v1/swagger/definitions.t .. Can't locate object method "cache_dir" via package "Swagger2::SchemaValidator" at /usr/share/perl5/Swagger2.pm line 41.
See Bug 18508 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA --- Comment #96 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I missed definitions.t on testing. And confirm this is fixed by Lari's patch. Note: I'm all for removing definitions.t BTW, just wanted to note it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #97 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 65713 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65713&action=edit Bug 18137: (QA followup) Make sure the session exists and is expired on expiration 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=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65713|0 |1 is obsolete| | --- Comment #98 from Lari Taskula <lari.taskula@jns.fi> --- Created attachment 65714 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65714&action=edit Bug 18137: (QA followup) Make sure the session exists and is expired on expiration tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lari Taskula <lari.taskula@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Lari Taskula <lari.taskula@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19072 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19072 [Bug 19072] REST API: Toggle suspend for /api/v1/holds -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18731 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18731 [Bug 18731] Orders table slow to load for vendors with many orders -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18120 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18120 [Bug 18120] REST API: CRUD endpoint for vendors -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18290 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18290 [Bug 18290] Fix t/db_dependent/Koha/Object.t, Mojo::JSON::Bool is a JSON::PP::Boolean :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #99 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Comment on attachment 65107 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65107 Bug 18137: Migrate from Swagger2 to Mojolicious::Plugin::OpenAPI Review of attachment 65107: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=18137&attachment=65107) ----------------------------------------------------------------- ::: Koha/REST/V1/Auth.pm @@ +57,5 @@
+ json => { error => 'Something went wrong, check the logs.' } + ); + } + if ($_->isa('Koha::Exceptions::UnderMaintenance')) { + return $c->render(status => 503, json => { error => $_->error });
Should these calls to render not all be 'openapi => { error => $_->error }` as aposed to `json => { error => $_->error }`.. else none of these responses are getting validated. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #100 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Martin Renvoize from comment #99)
Comment on attachment 65107 [details] [review] Bug 18137: Migrate from Swagger2 to Mojolicious::Plugin::OpenAPI
Review of attachment 65107 [details] [review]: -----------------------------------------------------------------
::: Koha/REST/V1/Auth.pm @@ +57,5 @@
+ json => { error => 'Something went wrong, check the logs.' } + ); + } + if ($_->isa('Koha::Exceptions::UnderMaintenance')) { + return $c->render(status => 503, json => { error => $_->error });
Should these calls to render not all be 'openapi => { error => $_->error }` as aposed to `json => { error => $_->error }`.. else none of these responses are getting validated.
That's because the auth check is done using ->under, and as the check itself is calling ->render, it is breaking the dispatch chain (not breaking like in 'stop working' but like short-circuiting to another way of returning the error. Clarifying to avoid possible idiomatic issues). I think we should leave it as-is and deal with this problem on a separate bug, or leave it. Because it could involve a big re-engineering to make the check let the chain continue while propagating the exception. I can't even imagine how to do it without adding irrelevant checks and repetitive code to controller classes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19196 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19196 [Bug 19196] Add pagination helpers -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65110|0 |1 is obsolete| | --- Comment #101 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66802 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66802&action=edit Bug 18137: Make /holds Mojolicious::Plugin::OpenAPI compatible Also - adding some missing and new response definitions into Swagger spec. - fixing failing tests due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/holds.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65111|0 |1 is obsolete| | --- Comment #102 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66803 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66803&action=edit Bug 18137: Remove x-mojo-around-action Mojolicious::Plugin::OpenAPI does not support x-mojo-around action. This patch removes it from our specification document. Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65112|0 |1 is obsolete| | --- Comment #103 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66804 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66804&action=edit Bug 18137: (follow-up) Fix handling DBIx::Class::Exception messages - DBIx::Class::Exception should use ->{msg} Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65113|0 |1 is obsolete| | --- Comment #104 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66805 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66805&action=edit Bug 18137: (QA-follow-up) Fix pod fail Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65114|0 |1 is obsolete| | --- Comment #105 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66806 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66806&action=edit Bug 18137: (follow-up) Sort definitions.json Before this file grows, we should sort it alphabetically. To test: 1. prove t/db_dependent/api/v1 Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65404|0 |1 is obsolete| | --- Comment #106 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66807 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66807&action=edit Bug 18137: List Mojolicious::Plugin::OpenAPI and JSON::Validator as dependencies Edit (tcohen): I've changed the version numbers to match those Mirko has already successfully packaged and are known to work for this patchset. Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65714|0 |1 is obsolete| | --- Comment #107 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66808 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66808&action=edit Bug 18137: (QA followup) Make sure the session exists and is expired on expiration tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lari Taskula <lari.taskula@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65106|0 |1 is obsolete| | --- Comment #108 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66809 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66809&action=edit Bug 18137: Add useful Koha::Exceptions Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65107|0 |1 is obsolete| | --- Comment #109 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66810 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66810&action=edit Bug 18137: Migrate from Swagger2 to Mojolicious::Plugin::OpenAPI This patch migrates from Swagger2 to Mojolicious::Plugin::OpenAPI as Swagger2 is no longer actively maintained. This migration involves some minor changes to our Swagger specification documents and to controllers. Each operation is migrated in following patches separately. Please see Mojolicious::Plugin::OpenAPI and its tutorial for more documentation. The patch also refactors some API authentication -related code by taking advantage of Koha::Exceptions. Authentication is now handled via Mojolicious's "under->to" functionality. The actual authentication & authorization checks are moved to Koha::REST::V1::Auth. Added a HTTP 503 response for when database update is required, instead of returning an authentication failure as before. To test: 1. prove t/db_dependent/api/v1/auth.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65108|0 |1 is obsolete| | --- Comment #110 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66811 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66811&action=edit Bug 18137: Make /patrons Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. - fixing failing test due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/patrons.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65109|0 |1 is obsolete| | --- Comment #111 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66812 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66812&action=edit Bug 18137: Make /cities Mojolicious::Plugin::OpenAPI compatible Also: - adding some missing and new response definitions into Swagger spec. To test: 1. prove t/db_dependent/api/v1/cities.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66802|0 |1 is obsolete| | --- Comment #112 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66813 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66813&action=edit Bug 18137: Make /holds Mojolicious::Plugin::OpenAPI compatible Also - adding some missing and new response definitions into Swagger spec. - fixing failing tests due to Bug 17932's change of boolean values To test: 1. prove t/db_dependent/api/v1/holds.t Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66803|0 |1 is obsolete| | --- Comment #113 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66814 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66814&action=edit Bug 18137: Remove x-mojo-around-action Mojolicious::Plugin::OpenAPI does not support x-mojo-around action. This patch removes it from our specification document. Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66804|0 |1 is obsolete| | --- Comment #114 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66815 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66815&action=edit Bug 18137: (follow-up) Fix handling DBIx::Class::Exception messages - DBIx::Class::Exception should use ->{msg} Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66805|0 |1 is obsolete| | --- Comment #115 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66816 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66816&action=edit Bug 18137: (QA-follow-up) Fix pod fail Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66806|0 |1 is obsolete| | --- Comment #116 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66817 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66817&action=edit Bug 18137: (follow-up) Sort definitions.json Before this file grows, we should sort it alphabetically. To test: 1. prove t/db_dependent/api/v1 Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66807|0 |1 is obsolete| | --- Comment #117 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66818 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66818&action=edit Bug 18137: List Mojolicious::Plugin::OpenAPI and JSON::Validator as dependencies Edit (tcohen): I've changed the version numbers to match those Mirko has already successfully packaged and are known to work for this patchset. Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66808|0 |1 is obsolete| | --- Comment #118 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 66819 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66819&action=edit Bug 18137: (QA followup) Make sure the session exists and is expired on expiration tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lari Taskula <lari.taskula@jns.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 --- Comment #119 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Rebased against master, which changed Koha::REST::V1::Hold a bit. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Architecture, internals, |REST api |and plumbing | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19234 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19234 [Bug 19234] Add query parameters handling helpers -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|19234 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19234 [Bug 19234] Add query parameters handling helpers -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|18508 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18508 [Bug 18508] Fix t/db_dependent/api/v1/swagger/definitions.t (follow-up of 18137) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17424 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17424 [Bug 17424] REST API: Preference to control access to own objects without permission -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #120 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Patch complexity|--- |Medium patch Resolution|--- |FIXED CC| |fridolin.somers@biblibre.co | |m --- Comment #121 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Enhancement not pushed to 17.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|REST API: Migrate from |Migrate from |Mojolicious::Plugin::Swagge |Mojolicious::Plugin::Swagge |r2 to |r2 to |Mojolicious::Plugin::OpenAP |Mojolicious::Plugin::OpenAP |I |I -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |20595 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20595 [Bug 20595] EDI: Add support for LRP (Library Rotation Plan) for Koha with Stock Rotation enabled -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|19037 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19037 [Bug 19037] Circulation and fine rules test tool -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org