-
-
Notifications
You must be signed in to change notification settings - Fork 453
Closed
Labels
component:lib-commons-serverIssue related to the @mockoon/commons-server libIssue related to the @mockoon/commons-server lib
Description
Bug description
I'm not sure if this is a bug, maybe it's my fault.
I'm trying to create a mock for an API that returns a list of transactions.
Within each transaction I get the fields authorized amount and captured amount. The captured amount must be a causal number, but must not exceed the authorized amount.
To Reproduce
To achieve this, I've written the template below (application/json):
{
"list": [
{{# repeat (queryParam 'limit' '10') }}
{{setVar 'amount' (faker 'datatype.number' min=100000 max=9999999999)}}
{
"amount": {
"authorizedAmount": {{@amount}},
"capturedAmount": {{int 100000 @amount}},
"fee": 0,
"currency": "EUR"
},
[...]
}
{{/ repeat }}
]
}
}
but it seems that the higher limit @amount isn't considered.
How can I achieve the desired result?
Mockoon version:
1.18.1
OS / OS version:
Windows 10
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component:lib-commons-serverIssue related to the @mockoon/commons-server libIssue related to the @mockoon/commons-server lib
Type
Projects
Status
✅ Done (ready for next release)