Bug 16222

Summary: Add REST API folder to Makefile.PL
Product: Koha Reporter: Benjamin Rokseth <benjamin.rokseth>
Component: Web servicesAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: brendan, julian.maurice, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 16222 - Add REST API folder to Makefile.PL
Bug 16222 - Add REST API folder to Makefile.PL
[PASSED QA] Bug 16222 - Add REST API folder to Makefile.PL
Bug 16222: (QA followup) Add /api dir for the API

Description Benjamin Rokseth 2016-04-07 09:06:16 UTC
By installing with perl Makefile.PL you will miss the required `api` folder containing the Swagger definition files and the Mojolicious mount CGI file app.pl.

This patch simply adds the `api` folder to the Makefile to install to the INTRANET_CGI_DIR

To verify, simply do a `perl Makefile.PL` installation and verify that the folder SRC/api is copied to INSTALL_DIR/intranet/cgi-bin/api
Comment 1 Benjamin Rokseth 2016-04-07 09:12:21 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2016-04-19 02:44:47 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2016-04-19 06:05:13 UTC
Created attachment 50383 [details] [review]
[PASSED QA] Bug 16222 - Add REST API folder to Makefile.PL

Add `api` folder to INTRANET_CGI_FOLDER in Makefile.PL so that the new
RESTFul API introduced in bug #13799 works also when installing with make.

Test plan:

- apply patch and do a `perl Makefile.PL` install
- observe that INSTALL_DIR/intranet/cgi-bin now has a folder `api`
  containing the swagger files and the api cgi mount, app.pl.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Tomás Cohen Arazi (tcohen) 2016-04-20 18:35:38 UTC
I think the solution falls short, because the koha-httpd.conf file points to the opac/ dir too. So it should be put in two different places.

The best approach would be to just put it on its own dir (/usr/share/koha/api). I'll try to provide a followup.
Comment 5 Tomás Cohen Arazi (tcohen) 2016-04-20 19:27:31 UTC
Created attachment 50477 [details] [review]
Bug 16222: (QA followup) Add /api dir for the API

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Brendan Gallagher 2016-04-20 21:19:17 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks!
Comment 7 Julian Maurice 2016-04-21 07:33:44 UTC
Pushed to 3.22.x, will be in 3.22.6