I'm currently trying to create a custom action for a custom integration that calls one of my REST web services. When testing the custom action, the request succeeds, but the test fails on the "Validate output against schema" step. It gives the following error:
{
"status": 400,
"code": "invalid.schema",
"message": "JSON failed schema validation because it was malformed JSON. reason: 'Unrecognized token 'html5': was expecting ('true', 'false' or 'null')\n at [Source: (StringReader); line: 1, column: 6]'",
"messageParams": {},
"contextId": "1d036e0d-b14b-4ef9-8015-57e07948cffb",
"details": [],
"errors": []
}
The actual response from the web service is: "html5-e50fd861-96cd-4abb-a2e3-8edada33bdb3", which I can see in the "Apply Output Transformation" step. This is a valid response from the web service and is valid JSON (my header includes Accept: application/json)
The Response Configuration is:
{
"translationMap": {
},
"successTemplate": "${rawResult}"
}
The Response Contract is:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "My Response",
"description": "This is the contract that will be enforced. See the success template for how this is produced. Returns the full response.",
"properties": {
}
}
I'm new to integration development with PureCloud. Can someone point me in the right direction to fix the Response Contract and/or Translation Map so that the test succeeds?
Thanks!
Evan