Details
-
Change Request
-
Resolution: Fixed
-
P2: Important
-
None
-
None
-
None
-
4c8528bd7 (master)
Description
In various instances in the API I see missing values being encoded as empty strings.
One example, is in GET /taskWorkItems, for provisioning workitems:
"project": [ "" ], "branch": "",
This is confusing because empty string is not a valid project or branch name.
Instead when a simple value is missing, it should be encoded as the special null JSON value. When a list is empty, it should just be encoded as an empty array. The previous would become:
"project": [ ], "branch": null,
P.S. For the specific example, project shouldn't even be a list in the first place, but that is reported separately in COIN-942.
Attachments
For Gerrit Dashboard: COIN-945 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
437908,3 | Use null in API instead of empty string for empty values | master | qtqa/tqtc-coin-ci | Status: MERGED | +2 | 0 |
451678,6 | Empty values in API are nil and not empty strings | master | qtqa/tqtc-coin-ci | Status: MERGED | +2 | 0 |