[Koha-bugs] [Bug 18137] REST API: Migrate from Mojolicious::Plugin:: Swagger2 to Mojolicious::Plugin::OpenAPI

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 5 18:06:33 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18137

Tomás Cohen Arazi <tomascohen at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #63026|0                           |1
        is obsolete|                            |

--- Comment #56 from Tomás Cohen Arazi <tomascohen at 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 at jns.fi>

Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list