API returns array of objects where objects has userId and source property. The problem is when source equal to "Customer" then I don't have userId property, but if it is "Seller" then I can see userId. Here is my response config:
{
"translationMap": {
"userId": "$[].[].userId",
"source": "$[].[].source"
},
"translationMapDefaults": {
"userId": "null",
"source": "null"
},
"successTemplate": "{"userId": ${userId},"source": ${source}}"
}
Error message:
11. Validate output against schema: JSON failed output schema validation for the following reasons: Schema: # @/properties/userId/items. Error location: /userId/0. instance type (null) does not match any allowed primitive type (allowed: ["string"]), Schema: # @/properties/userId/items. Error location: /userId/1. instance type (null) does not match any allowed primitive type (allowed: ["string"]), Schema: # @/properties/userId/items. Error location: /userId/2. instance type (null) does not match any allowed primitive type (allowed: ["string"]), Schema: # @/properties/userId/items. Error location: /userId/3. instance type (null) does not match any allowed primitive type (allowed: ["string"]), Schema: # @/properties/userId/items. Error location: /userId/4. instance type (null) does not match any allowed primitive type (allowed: ["string"]), Schema: # @/properties/userId/items. Error location: /userId/5. instance type (null) does not match any allowed primitive type (allowed: ["string"]), Schema: # @/properties/userId/items. Error location: /userId/6. instance type (null) does not match any allowed primitive type (allowed: ["string"]), Schema: # @/properties/userId/items. Error location: /userId/7. instance type (null) does not match any allowed primitive type (allowed: ["string"]), Schema: # @/properties/userId/items. Error location: /userId/8. instance type (null) does not match any allowed primitive type (allowed: ["string"]), Schema: # @/properties/userId/items. Error location: /userId/9. instance type (null) does not match any allowed primitive type (allowed: ["string"])