Hello,
I have a REST API I'm calling via data action. Several of the api fields are decimal data type.
I've setup the response contract to have those fields be string since decimal is not an option.
All decimal fields appear to parse correctly except one, MinRewardsAllowed.
I'm getting:
JSON failed output schema validation for the following reasons: Schema: # @/properties/MinRewardsAllowed. Error location: /MinRewardsAllowed. instance type (integer) does not match any allowed primitive type (allowed: ["string"])
The value does come back from the API as 0. I have another decimal property RewardAmount that also comes back as 0 but is translated to "0".
Any ideas on how to solve this issue?
{
"title": AccountInfo",
"type": "object",
"properties": {
"HasPaymentDueDate": {
"type": "boolean"
},
"HasMinimumRewards": {
"type": "boolean"
},
"NextPaymentDueDate": {
"type": "string"
},
"CurrentAmountDue": {
"type": "string"
},
"AccountID": {
"type": "integer"
},
"CardID": {
"type": "integer"
},
"HasLastPaymentDate": {
"type": "boolean"
},
"LastPaymentDate": {
"type": "string"
},
"LastPaymentAmount": {
"type": "string"
},
"LastStatementDate": {
"type": "string"
},
"AvailableCredit": {
"type": "string"
},
"CurrentBalance": {
"type": "string"
},
"CreditLimitAmount": {
"type": "string"
},
"DaysDelq": {
"type": "integer"
},
"Status": {
"type": "integer"
},
"CanRequestPIN": {
"type": "boolean"
},
"DefaultTransferDestination": {
"type": "string"
},
"IsACHPaymentEligible": {
"type": "boolean"
},
"IsDebitPaymentEligible": {
"type": "boolean"
},
"ProductHasPaymentProtection": {
"type": "boolean"
},
"HasPaymentProtection": {
"type": "boolean"
},
"EligibleForPaymentProtection": {
"type": "boolean"
},
"ProductHasRewards": {
"type": "boolean"
},
"MinRewardsAllowed": {
"type": "string"
},
"RewardAmount": {
"type": "string"
},
"RewardsRefundIncrement": {
"type": "string"
},
"PlayRewardsRedemptionDisclosure": {
"type": "boolean"
},
"CardNeedsActivating": {
"type": "boolean"
},
"RandomDigit": {
"type": "integer"
},
"DDA": {
"type": "string"
},
"RoutingNumber": {
"type": "string"
},
"SuspiciousActivity": {
"type": "boolean"
},
"CardProgramID": {
"type": "integer"
},
"RecordFound": {
"type": "boolean"
},
"FailureMessage": {
"type": "string"
}
},
"additionalProperties": true
}
{
"translationMap": {
"AccountIDValue": "$.AccountID",
"MinRewardsAllowedValue": "$.MinRewardsAllowed",
"CardIDValue": "$.CardID",
"DaysDelqValue": "$.DaysDelq",
"RandomDigitValue": "$.RandomDigit",
"NextPaymentDueDateValue": "$.NextPaymentDueDate",
"LastStatementDateValue": "$.LastStatementDate",
"LastPaymentDateValue": "$.LastPaymentDate",
"CurrentAmountDueValue": "$.CurrentAmountDue",
"LastPaymentAmountValue": "$.LastPaymentAmount",
"AvailableCreditValue": "$.AvailableCredit",
"CurrentBalanceValue": "$.CurrentBalance",
"CreditLimitAmountValue": "$.CreditLimitAmount",
"RewardAmountValue": "$.RewardAmount",
"RewardsRefundIncrementValue": "$.RewardsRefundIncrement",
"HasPaymentDueDateValue": "$.HasPaymentDueDate",
"HasLastPaymentDateValue": "$.HasLastPaymentDate",
"CanRequestPINValue": "$.CanRequestPIN",
"IsACHPaymentEligibleValue": "$.IsACHPaymentEligible",
"IsDebitPaymentEligibleValue": "$.IsDebitPaymentEligible",
"ProductHasPaymentProtectionValue": "$.ProductHasPaymentProtection",
"HasPaymentProtectionValue": "$.HasPaymentProtection",
"EligibleForPaymentProtectionValue": "$.EligibleForPaymentProtection",
"ProductHasRewardsValue": "$.ProductHasRewards",
"HasMinimumRewardsValue": "$.HasMinimumRewards",
"PlayRewardsRedemptionDisclosureValue": "$.PlayRewardsRedemptionDisclosure",
"CardNeedsActivatingValue": "$.CardNeedsActivating",
"SuspiciousActivityValue": "$.SuspiciousActivity",
"RecordFoundValue": "$.RecordFound",
"StatusValue": "$.Status",
"DefaultTransferDestinationValue": "$.DefaultTransferDestination",
"DDAValue": "$.DDA",
"RoutingNumberValue": "$.RoutingNumber"
},
"translationMapDefaults":
{
"MinRewardsAllowedValue": "0.00",
"IsDebitPaymentEligibleValue": "false"
},
"successTemplate": "{ "AccountID": ${AccountIDValue},"MinRewardsAllowed": ${MinRewardsAllowedValue},"CardID": ${CardIDValue}, "NextPaymentDueDate": "$NextPaymentDueDateValue.substring(1,11)", "LastStatementDate": "$LastStatementDateValue.substring(1,11)", "LastPaymentDate": "$LastPaymentDateValue.substring(1,11)", "CurrentAmountDue": "$CurrentAmountDueValue", "LastPaymentAmount": "$LastPaymentAmountValue", "AvailableCredit": "$AvailableCreditValue", "CurrentBalance": "$CurrentBalanceValue", "CreditLimitAmount": "$CreditLimitAmountValue", "RewardAmount": "$RewardAmountValue", "RewardsRefundIncrement": "$RewardsRefundIncrementValue", "DaysDelq": ${DaysDelqValue}, "RandomDigit": ${RandomDigitValue}, "RandomDigit": ${RandomDigitValue}, "HasPaymentDueDate": ${HasPaymentDueDateValue}, "HasLastPaymentDate": ${HasLastPaymentDateValue}, "CanRequestPIN": ${CanRequestPINValue}, "IsACHPaymentEligible": ${IsACHPaymentEligibleValue}, "IsDebitPaymentEligible": ${IsDebitPaymentEligibleValue}, "ProductHasPaymentProtection": ${ProductHasPaymentProtectionValue}, "HasPaymentProtection": ${HasPaymentProtectionValue}, "EligibleForPaymentProtection": ${EligibleForPaymentProtectionValue}, "ProductHasRewards": ${ProductHasRewardsValue}, "HasMinimumRewards": ${HasMinimumRewardsValue}, "PlayRewardsRedemptionDisclosure": ${PlayRewardsRedemptionDisclosureValue}, "CardNeedsActivating": ${CardNeedsActivatingValue}, "SuspiciousActivity": ${SuspiciousActivityValue}, "RecordFound": ${RecordFoundValue}, "Status": ${StatusValue}, "DefaultTransferDestination": ${DefaultTransferDestinationValue}, "DDA": ${DDAValue}, "RoutingNumber": ${RoutingNumberValue} }"
}