]> git.koha-community.org Git - koha.git/commit
Bug 31160: Required fields in patron api
authorMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Thu, 24 Nov 2022 15:37:51 +0000 (15:37 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 13 Dec 2022 11:44:35 +0000 (08:44 -0300)
commit1d522cc2464ac0d953e93d3f8f178da1a9e06d82
tree3c1f1758ddf32a1cf78b4e10291699c1567e052e
parentaf794a6cfa85d8f3160ddb4c4f626e85063a844c
Bug 31160: Required fields in patron api

The Patron API PUT request required the fields "surname","address","city","library_id","category_id". Meanwhile the CSV import page for patrons only requires "surname","library_id","category_id". The fields for "address" and "city" have been removed from the "required" section of the api>v1>swagger>definitions>patron.yaml file to match the CSV import page.

Test Plan:
1) Send a PUT request to http://localhost:8081/api/v1/patrons/19 with an empty body
2) Error message should ask for 5 missing fields as listed above
3) Apply patch
4) Restart Apache server using "restart_all" in your ktd shell
5) Resubmit your request
6) Error message should now only request "surname","library_id","category_id"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
api/v1/swagger/definitions/patron.yaml