'Is this possible to use dataGenerator inside Json?

Have a little problem. I have a feature postUser with request body, which I provide inside this feature. Body doens't have unique data, it filled manually. I know that I can read this requestBody from requestBody.json but I dont know how to connect data generator to this json and even if this a possible. So, my json looks like this

{
"first_name": "test",
"last_name": "user",
"email": "[email protected]",
"phone_number": "12341415",
"image": "",
"status": "INACTIVE",
}

And I want to have dataGenerator inside this json like this

{
"first_name": "#(userName)",
"last_name": "#(userLastName)",
"email": "#(userEmail)",
"phone_number": "#(userPhoneNumber)",
"image": "",
"status": "INACTIVE",
}

Is this possible to have the next scenario if yes, how can I do this?

* path 'user'
And request requestBody
When method Post
Then response 200

P.S. I'm a newbie in Java, so I don't know how to resolve this(



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source