apigeecli environments debugmask set
uses POST instead of PATCH and does not handle JSON arrays correctly
#530
Labels
bug
Something isn't working
Version: apigeecli version 2.4.0 date: 2024-08-21T16:56:04Z [commit: e96358f]
When running the command:
with the contents of the
debugmask.json
being:(taken from the samples/debugmask.json file in the repository), the following error is thrown by apigeecli:
It seems that this happens because the tool is trying to deserialize the JSON into a string-string key-value pair, as seen in the following part of the code: https://github.com/apigee/apigeecli/blob/main/internal/client/env/debugmask.go#L35-L39.
When I modify the JSON file to specify a string key-value pair like this:
the deserialization error disappears, but the command still fails, returning a 404 error page from Google:
Reproduction Steps
With
debugmask.json
containing:Additional Information
POST
request is sent to the API:Debug output:
Suggested Fix
POST
toPATCH
as per the official documentation."variables"
should be supported rather than string key-value pairs.The text was updated successfully, but these errors were encountered: