How can we verify the Json data type of mentioned fields such as "price", "ck", "name", "enabled" and "tags" in rest assured test.
{
"odd": {
"price": 200,
"ck": 12.2,
"name": "test this",
"enabled": true,
"tags": null
}
}
Is there any way or any assertion library which provide data type verification as mentioned in rest assured test example where instead of asserting the actual value of given key we can verify only the data type
ValidatableResponse response =
given().
spec(requestSpec).
headers("authkey", "abcdxxxxxxxxxyz").
pathParam("uid", oddUid).
when().
get("/orders" + "/{uid}").
then().
assertThat().
statusCode(200).
body(
"odd.price", isNumber(),
"odd.name", isString(),
"enabled", isboolean()
"tags", isNull()
);