Skip to content

Commit 7ca7c28

Browse files
committed
Fix erroneous templating function in doc (#1077)
1 parent 931a473 commit 7ca7c28

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/pages/keyconcepts/templating/templating.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@ Additional data can come from helper methods. These are the ones Hoverfly curren
8282
+-----------------------------------------------------------+-----------------------------------------------------------+-----------------------------------------+
8383
| A random UUID | ``{{ randomUuid }}`` | 7b791f3d-d7f4-4635-8ea1-99568d821562 |
8484
+-----------------------------------------------------------+-----------------------------------------------------------+-----------------------------------------+
85-
| Replace all occurrences of the old value with the new | ``{{ replace Request.Body 'be' 'mock' }}`` | |
85+
| Replace all occurrences of the old value with the new | ``{{ replace (Request.Body 'jsonpath' '$.text')`` | |
86+
| | ``'be' 'mock' }}`` | |
87+
| value in the target string | (where Request.Body has the value of | |
8688
| | | |
87-
| value in the target string | (where Request.Body has the value of "to be or not to be" | to mock or not to mock |
89+
| | {"text":"to be or not to be"} | to mock or not to mock |
8890
+-----------------------------------------------------------+-----------------------------------------------------------+-----------------------------------------+
8991
| Generate random data using go-fakeit | ``{{ faker 'Name' }}`` | John Smith |
9092
+-----------------------------------------------------------+-----------------------------------------------------------+-----------------------------------------+

0 commit comments

Comments
 (0)