apigee / apigeecli

This is a tool to interact with Apigee APIs. The tool lets you manage (create, del, get, list) environments, proxies, etc.
Apache License 2.0
51 stars 28 forks source link

KVM entry create with JSON adds too many `\` #510

Closed kurtkanaskie closed 1 month ago

kurtkanaskie commented 1 month ago

CLI adds too many '\' chars

apigeeclix kvms entries create --org=$ORG --env=$ENV --map=json --key=json-cli --value='{\"hello\":\"joe\"}'
{
    "name": "json1",
    "value": "{\\\"hello\\\":\\\"joe\\\"}"
}

API produces

curlx -X POST -H "Content-Type:application/json" \
    https://apigee.googleapis.com/v1/organizations/$ORG/environments/$ENV/keyvaluemaps/json/entries \
    -d '{"name":"json-api","value":"{\"hello\":\"joe\"}"}'
{
  "name": "json-api",
  "value": "{\"hello\":\"joe\"}"
}