Description
Problem
The below is a hickup in developer experience of the SDK. After writing it I realised that update
is performing a PATCH
and thus does not require all the data to be passed, but only the data that you actually wish to change.
I'm submitting this anyway because it's non-obvious when using just the SDK without actively looking at the docs and it may help someone else who was similarly puzzled.
Original Issue
The default_domain
is a property of Project
. Thus using the SDK I would expect to be able to update this property by:
- Fetching the project
- Getting the data for the project
- Adjusting the project
- Updating the project
However, in the current implementation this does not cause an error in the SDK. However it does cause a BadResponseException with a 400 Bad Request error from the server.
The API docs show that fetching provides a lot more info than is needed in updating which is probably the problem.
The checkProperty
function could be used to flag this for a developer but it's currently not implemented for Project
.