mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
generate randow value alphanumeric string of length to be picked up from request.body parameter #430
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 @nilimamoh on GitHub (Aug 7, 2022).
My requirement is to make length accept the parameter i supplied from request body for the json path & generate a random alphanumeric string of the given length
but below is not working getting exception : is there a synax issue ? can this be done
{{{randomValue (length jsonPath request.body '$.otpParams.length') type='ALPHANUMERIC'}}}
@nilimamoh commented on GitHub (Aug 7, 2022):
<html> <head> </head>HTTP ERROR 500 wiremock.com.google.common.util.concurrent.UncheckedExecutionException: wiremock.com.github.jknack.handlebars.HandlebarsException: inline@6e008506:1:100: could not find helper: 'length' {{randomValue type='UUID'}}","callerTransactionId":"caller325782532086010","token":"{{{randomValue (length jsonPath request.body '$.otpParams.length') type='ALPHANUMERIC'}}} ^
Caused by:
wiremock.com.google.common.util.concurrent.UncheckedExecutionException: wiremock.com.github.jknack.handlebars.HandlebarsException: inline@6e008506:1:100: could not find helper: 'length' {{randomValue type='UUID'}}","callerTransactionId":"caller325782532086010","token":"{{{randomValue (length jsonPath request.body '$.otpParams.length') type='ALPHANUMERIC'}}} ^</html>Caused by: wiremock.com.github.jknack.handlebars.HandlebarsException: inline@6e008506:1:100: could not find helper: 'length'
{{randomValue type='UUID'}}","callerTransactionId":"caller325782532086010","token":"{{{randomValue (length jsonPath request.body '$.otpParams.length') type='ALPHANUMERIC'}}}
^
@StefH commented on GitHub (Aug 7, 2022):
@nilimamoh
This issue should be listed for https://wiremock.org/
(This repository is for the .NET version)