By the looks of things, it seems that the response status cannot be changed without causing quite a number of side effects to the API.
Response statuses are hard-coded for all the 'create' (201) and 'delete' (204) methods and by _design_ all the others return 200 on success. Even if a method's return value is None, this is going to be serialized into 'null', with no means to dictate the response code if not by the 'action' value defined in api/v2/resource.py.
If a 204 response code on null body would be enforced, this might have unpredictable consequences to other API calls that also return None as a result.
Unless the API code is refactored to be more flexible, I regret to say that this bug is a no-goer.
By the looks of things, it seems that the response status cannot be changed without causing quite a number of side effects to the API.
Response statuses are hard-coded for all the 'create' (201) and 'delete' (204) methods and by _design_ all the others return 200 on success. Even if a method's return value is None, this is going to be serialized into 'null', with no means to dictate the response code if not by the 'action' value defined in api/v2/resource.py.
If a 204 response code on null body would be enforced, this might have unpredictable consequences to other API calls that also return None as a result.
Unless the API code is refactored to be more flexible, I regret to say that this bug is a no-goer.
Opinions welcome.