[Koha-bugs] [Bug 21116] Add API routes through plugins

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Aug 9 00:33:32 CEST 2018


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

Benjamin Rokseth <benjamin.rokseth at deichman.no> changed:

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

--- Comment #4 from Benjamin Rokseth <benjamin.rokseth at deichman.no> ---
Created attachment 77601
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77601&action=edit
Bug 21116: Add API routes through plugins

This patch adds plugins the capability of injecting new routes on the
API.

The plugins should provide the following methods to be considered valid
API-generating plugins:

- 'api_routes': returning the 'path' component of the OpenAPI specification
corresponding to the routes served by the plugin
- 'api_namespace': it should return a namespace to be used for grouping the
endpoints provided by the plugin

otherwise, they will be just skipped.

All plugin-generated routes will be added the 'contrib' namespace, and
will end up placed inside /contrib/<namespace>, where <namespace> is what the
'api_namespace' returns.

A sample endpoint will be added to the Kitchen Sink plugin, and tests
are being written.

To test, wait a bit more for those samples :-D

Signed-off-by: Benjamin Rokseth <benjamin.rokseth at deichman.no>

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


More information about the Koha-bugs mailing list