]> git.koha-community.org Git - koha.git/commit
Bug 32981: Add endpoint to get AV for given category
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 16 Feb 2023 10:45:20 +0000 (11:45 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 2 Mar 2023 15:00:10 +0000 (12:00 -0300)
commit7e5c75549fe66eb16eb365ea3a79ee8d7fb6946b
treefbc443f06d5bf9f3bbf367701cd428589605cd6b
parentfe872b792037ee2f8cce0d25f95c1e4f739ffe49
Bug 32981: Add endpoint to get AV for given category

For, at least, the ERM module we would like to retrieve the authorised
values for a given category to build a dropdown list with the different options.

It has been decided on bug 17390 to use
GET /authorised_value_categories/:authorised_value_category_id/values

Test plan:
curl -v -s -u koha:koha --request GET  http://kohadev-intra.mydnsname.org:8081/api/v1/authorised_value_categories/LOC/values
Should display the list of LOC

curl -v -s -u koha:koha --request GET  http://kohadev-intra.mydnsname.org:8081/api/v1/authorised_value_categories/xLOCx/values
Should return a 404

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/AuthorisedValue.pm
Koha/REST/V1/AuthorisedValues.pm [new file with mode: 0644]
api/v1/swagger/definitions/authorised_value.yaml [new file with mode: 0644]
api/v1/swagger/paths/authorised_values.yaml [new file with mode: 0644]
api/v1/swagger/swagger.yaml
t/db_dependent/api/v1/authorised_values.t [new file with mode: 0644]