https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23998 --- Comment #21 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Shi Yao Wang from comment #19)
I put those fields as required because they are database fields that are not nullable and without a default value. I agree it's not logical to require them for a put request, but I am unsure how I should resolve this. I wouldn't just remove the requirements because of post but I don't think duplicating the definition file for put is good either. This issue seems to be present for the patron api post vs. put path/definition as well (required: surname, library_id, category_id) if I am not mistaken.
Any advice?
I think the best course here would be to make the API call a PATCH instead of a PUT. You're correct that this problem exists elsewhere in Koha and there are a handful of bugs looking to move various API calls to PATCH (Bug 43279 and Bug 42916 are the first couple I found). -- You are receiving this mail because: You are watching all bug changes.