Description
PATCH::/api/point/<point_id>
point will be erased some enum field to default enum value due to fallback in null value
{
"enabled": false,
"protocol": "UNKNOWN",
"kind": "UNKNOWN",
"type": "UNKNOWN"
}
Somehow, it happens on POST:/api/point also although POST response is correct, but GET:/api/point response is erased
Solution
- Split
null case in enum type in PATCH action
Description
PATCH::/api/point/<point_id>{ "enabled": false }pointwill be erased someenumfield todefault enumvalue due to fallback innullvalue{ "enabled": false, "protocol": "UNKNOWN", "kind": "UNKNOWN", "type": "UNKNOWN" }Somehow, it happens on
POST:/api/pointalso althoughPOST responseis correct, butGET:/api/pointresponse is erasedSolution
nullcase inenum typeinPATCHaction