if (resultRequest == true) {
KeywordUtil.markPassed('Request Schema is in compliance')
} else {
KeywordUtil.markFailed('Request Schema is not matching')
}
However, I’m getting the error:
Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token ‘Include’: was expecting (JSON String, Number, Array, Object or token ‘null’, ‘true’ or ‘false’)
I do not think you are implementing WS.validateJsonAgainstSchema correctly.
You are passing a String to WS.validateJsonAgainstSchema but it is expecting a JSON String. That is not the same thing.
If I look at the payloadR and payloadReq you set, you are trying to set these strings equal to the contents of the files called PostPayment_Payload.json and RequestPayment.json
So you will first need to set the strings equal to the contents of these files and not the string of where to locate these files.
Please have a look at the documentation again and take note of how the strings are written in the examples.