Mohamed OUALLA
07/10/2025, 11:44 AM"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"jsonBody": {
"the_token": "some values",
"token_type": "type 1",
"generated_at": "{{now format='unix'}}",
"expires_in": 3600
},
"transformers": ["response-template"]
}
My issue is with the generated_at
field: even though I am using {{now format='unix'}}
, wiremock doesn't start and shows some java line error messages. I need it to be returned as an integer.
Is there a way to achieve this directly within the jsonBody
section?
Please note that my actual response template is more complex than the example above, I simplified it here to highlight the issue.
I came across this Stack Overflow discussion, which suggests using the body
field instead of jsonBody
, but that approach does not fit well with my use case.
Is there a cleaner or simpler way to return generated_at
as an integer in jsonBody
?
Thank you!Lee Turner
07/10/2025, 1:12 PMMohamed OUALLA
07/10/2025, 2:32 PM