mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
How to use brackets '[ ]' in Random String List HandleBar ? #521
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pouyaSobhanipour on GitHub (Jun 19, 2023).
Originally assigned to: @StefH on GitHub.
Hello
i want to use
"{{Random Type=\"StringList\" Values=[\"a\", \"b\", \"c\"]}}"to receive a random response from mock server each time i do a request.instead of a,b or c i want to use the following string :
"{\'errors\':[{\'detail\':\'Conditions must be seen\'}]}"it seems that when we have closed [] or {} wiremock does not responde .
how should i by pass this issue ?
Thanks
@StefH commented on GitHub (Jun 23, 2023):
This is probably possible, however I do not know the answer.
Best is to take a approach where you use a switch statement.
See
https://stackoverflow.com/a/53398537/255966
@pouyaSobhanipour commented on GitHub (Jun 30, 2023):
hello
but i need to use a mock list. the solution you have provided uses completely another approach.
isn't there any way to use the Random handle bar to by pass this problem ?
Thanks