Shrimanju_KS | 2024-08-30 06:22:48 UTC | #1
Hi all, I am facing an error while fetching data via a third-party API in actions, i explicitly mentioned 3 records using indexing. I get the data as an integer from API, but if no records are present or if i trie to fetch 2 records i encounter the following error:
{ "message": "JSON failed output schema validation for the following reasons: Schema: # @/properties/id3. Error location: /id3. instance type (string) does not match any allowed primitive type (allowed: [\"integer\"])", "code": "invalid.schema", "status": 400, "messageParams": {}, "contextId": "e1cff598-810f-4eeb-a92c-3c7573852242", "details": [ { "errorCode": "ACTION.PROCESSING" } ], "errors": [] }
JSON Input contract --
{ "type": "object", "required": [ "phoneNumber" ], "properties": { "startDate": { "type": "string" }, "endDate": { "type": "string" }, "phoneNumber": { "type": "string" }, "numofcases": { "type": "string" } }, "additionalProperties": true }
JSON Output contract --
{ "type": "object", "properties": { "count": { "type": "integer" }, "id1": { "type": "integer" }, "priority1": { "type": "string" }, "AgentName1": { "type": "string" }, "StatusValue1": { "type": "string" }, "caseType1": { "type": "string" }, "created1": { "type": "string" }, "id2": { "type": "integer" }, "priority2": { "type": "string" }, "AgentName2": { "type": "string" }, "StatusValue2": { "type": "string" }, "caseType2": { "type": "string" }, "created2": { "type": "string" }, "id3": { "type": "integer" }, "priority3": { "type": "string" }, "AgentName3": { "type": "string" }, "StatusValue3": { "type": "string" }, "caseType3": { "type": "string" }, "created3": { "type": "string" } }, "additionalProperties": true }
Configuration responce body ----
{ "translationMap": { "id1": "$[0].id", "id2": "$[1].id", "id3": "$[2].id", "priority1": "$[0].priority", "priority2": "$[1].priority", "priority3": "$[2].priority", "AgentName1": "$[0].agent.name", "AgentName2": "$[1].agent.name", "AgentName3": "$[2].agent.name", "StatusValue1": "$[0].status.value", "StatusValue2": "$[1].status.value", "StatusValue3": "$[2].status.value", "caseType1": "$[0].department.caseType.type", "caseType2": "$[1].department.caseType.type", "caseType3": "$[2].department.caseType.type", "created1": "$[0].created", "created2": "$[1].created", "created3": "$[2].created", "count": "$.size()" }, "translationMapDefaults": { "id1": "\"\"", "id2": "\"\"", "id3":"\"\"", "priority1": "\"\"", "priority2": "\"\"", "priority3": "\"\"", "AgentName1": "\"\"", "AgentName2": "\"\"", "AgentName3": "\"\"", "StatusValue1": "\"\"", "StatusValue2": "\"\"", "StatusValue3": "\"\"", "caseType1": "\"\"", "caseType2": "\"\"", "caseType3": "\"\"", "created1": "\"\"", "created2": "\"\"", "created3": "\"\"", "count": "0" }, "successTemplate": "{\"count\":${count}, \"id1\":${id1},\"priority1\":${priority1},\"AgentName1\":${AgentName1},\"StatusValue1\":${StatusValue1},\"caseType1\":${caseType1},\"created1\":${created1},\"id2\":${id2},\"priority2\":${priority2},\"AgentName2\":${AgentName2},\"StatusValue2\":${StatusValue2},\"caseType2\":${caseType2},\"created2\":${created2}, \"id3\":${id3},\"priority3\":${priority3},\"AgentName3\":${AgentName3},\"StatusValue3\":${StatusValue3},\"caseType3\":${caseType3},\"created3\":${created3}}}" }
system | 2024-09-30 06:20:32 UTC | #2
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 28816