Open
Description
Hey,
I know this is auto generated client, but hopefully you would have a solution.
When i use the api-client-typescript package, and try to send a .patchFeatureFlag()
with a payload example:
"environmentKey": "environment-key-123abc",
"instructions": [{
"kind": "addValuesToClause",
"ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29",
"clauseId": "10a58772-3121-400f-846b-b8a04e8944ed",
"values": ["beta_testers"]
}]
}
There are 2 problems:
- type PatchOperation only supports properties:
op
,path
andvalue
, so there is a TS compile error. - Even after getting over the compile error, i've debugged and noticed that the request being sent with the following payload:
"patch": [
{
"environmentKey": "environment-key-123abc",
"instructions": [
{
"kind": "addValuesToClause",
"ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29,
"clauseId": "10a58772-3121-400f-846b-b8a04e8944ed",
"values": [
"please-work"
]
}
]
}
]
}
And the response from the REST API is 400 Error
"code": "invalid_patch",
"message": "must have at least one instruction"
}
Please advise, is there a way to use all the different patch operations via the client?
Metadata
Metadata
Assignees
Labels
No labels