Skip to content

Commit 165fa33

Browse files
committed
docs: update doc example
1 parent 5161e21 commit 165fa33

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/guide/executable.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,9 @@ executables:
365365
url: "http://pi.hole/admin/api.php?disable=$DURATION&auth=$PWHASH"
366366
logResponse: true # log the response body
367367
validStatusCodes: [200] # only consider the execution successful if the status code is 200
368-
# transform the response body with jq
368+
# transform the response body with a Expr expression
369369
transformResponse: |
370-
if .status == "disabled" then .status = "pause" else . end
370+
"paused: " + string(fromJSON(body)["status"] == "disabled")
371371
```
372372
373373
##### render

tools/builder/request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func RequestExecWithBody(opts ...Option) *executable.Executable {
6060
func RequestExecWithTransform(opts ...Option) *executable.Executable {
6161
name := "request-with-transform"
6262
docstring := requestBaseDesc +
63-
"The `transformResponse` field is optional and can be used to transform the response using a jq query."
63+
"The `transformResponse` field is optional and can be used to transform the response using an Expr expression."
6464
e := &executable.Executable{
6565
Verb: "run",
6666
Name: name,

0 commit comments

Comments
 (0)