I have an issue trying to validate a schema of response from a server, the issue is I need to validate the schema using rest assured but the json properties are dynamic I am getting the response as the current date with the values inside example
”
“2024-09-17 19:50:00”: {
"1. open": "214.2500",
"2. high": "214.2500",
"3. low": "214.1600",
"4. close": "214.1600",
"5. volume": "25"
},
“
This date which is the Json key in the required fields value will always change so it returns an error every day I need a solution to be able to create a Dynamic JSON schema that will validate upon using
response.then().body(JsonSchemaValidator.matchesJsonSchemaInClasspath("coreStocksEndpointsSchema/coreStockEndpointsIntraday.json")).log().all();
As creating Objects and validating the properties will be a very expensive solution, please if anyone has an idea share
I tried to create objects and validate them but it is very time consuming.
I need to have the property of the Json this date that holds the object answer "2024-09-17 19:50:00"
to be dynamic inside the JSON schema file to simply add the date dynamically inside the JSON schema file and though can make the validation.
1