Bug 13903: Add API routes to list, create, update, delete reserves
commit70928807d83a8156b77396359b18579d6c7677eb
authorJulian Maurice <julian.maurice@biblibre.com>
Tue, 24 Mar 2015 10:30:00 +0000 (24 11:30 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Wed, 4 May 2016 13:54:01 +0000 (4 13:54 +0000)
treedb4b983f406ff17a4eb1f4c78f4f5411333fe2a7
parent7b6a9f3be177da6606a425b749201da951628528
Bug 13903: Add API routes to list, create, update, delete reserves

GET    /reserves?borrowernumber=X (list)
POST   /reserves                  (create)
PUT    /reserves/{reserve_id}     (update)
DELETE /reserves/{reserve_id}     (delete)

Unit tests in t/db_dependent/api/v1/reserves.t

Test plan:
1. Apply patch
2. Run unit tests
3. Play with the API with your favorite REST client, using documentation
   in the swagger.json file
4. Try to make reserves until the maximum number of reserves for a user
   is reached (you should have a 403 error)

Depends on bug 15126

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/REST/V1/Reserve.pm [new file with mode: 0644]
api/v1/definitions/index.json
api/v1/definitions/reserve.json [new file with mode: 0644]
api/v1/definitions/reserves.json [new file with mode: 0644]
api/v1/swagger.json
t/db_dependent/api/v1/reserves.t [new file with mode: 0644]