Bug 16222 - Add REST API folder to Makefile.PL
Summary: Add REST API folder to Makefile.PL
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-07 09:06 UTC by Benjamin Rokseth
Modified: 2019-06-27 09:24 UTC (History)
3 users (show)

See Also:
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 (1.15 KB, patch)
2016-04-07 09:12 UTC, Benjamin Rokseth
Details | Diff | Splinter Review
Bug 16222 - Add REST API folder to Makefile.PL (1.20 KB, patch)
2016-04-19 02:44 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 16222 - Add REST API folder to Makefile.PL (1.27 KB, patch)
2016-04-19 06:05 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 16222: (QA followup) Add /api dir for the API (4.18 KB, patch)
2016-04-20 19:27 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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