Bug 31794: Add REST endpoint to get an authority
authorAgustin Moyano <agustinmoyano@theke.io>
Tue, 6 Dec 2022 20:07:02 +0000 (17:07 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 6 Mar 2023 17:45:26 +0000 (14:45 -0300)
commit1e72e59030b1e43b3674e1997cb8d267fe369d92
tree0ff067fe4470cda58ab19904aa7f81d20eea029e
parent98dd32e82631d8623b0947a23e11b4c22b10b822
Bug 31794: Add REST endpoint to get an authority

To test:
1. Apply patch
2. Set RESTBasicAuth preference to true
3. Get the id of an authority
4. Make a GET request to /api/v1/authorities/{authid} with one of the following content type header
  - application/json
  - application/marcxml+xml
  - application/marc-in-json
  - application/marc
  - text/plain
5. Check that you get the authority in the corresponding format
6. Sign off

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Authority.pm
Koha/REST/V1/Authorities.pm [new file with mode: 0644]
api/v1/swagger/paths/authorities.yaml [new file with mode: 0644]
api/v1/swagger/swagger.yaml
t/db_dependent/Koha/Authorities.t
t/db_dependent/api/v1/authorities.t [new file with mode: 0755]