4

I'm getting an error in a sample JSON payload using the Parse JSON function in a Power Automate flow:

{
    "message": "Invalid type. Expected Integer but got Number.",
    "lineNumber": 0,
    "linePosition": 0,
    "path": "issues[0].fields.customfield_18478",
    "value": 1,
    "schemaId": "#/properties/issues/items/properties/fields/properties/customfield_18478",
    "errorType": "type",
    "childErrors": []
}

The above is a sample error I have been getting for custom fields in JIRA. Any clue how to solve it?

3
  • Please post all the fields that fail in your code.
    – philoez98
    Commented Jun 23, 2019 at 12:09
  • @philoez98 all the custom fields are failing like customfield_18479,customfield_18485,customfield_18486 etc Commented Jun 24, 2019 at 7:11
  • 1
    Encountered same issue with logic apps Parse JSON Data Operations; added ["integer", "number"] to items causing 'Invalid type' error as per Arun and solved
    – GLarose
    Commented Jun 8, 2020 at 15:20

1 Answer 1

7

Looks like you have to define the schema for both integer and number. This should solve the issue.

"customfield_18478": {

"type": ["integer", "number"]

},

Reference

1
  • 1
    Thanks for that: I added this schema for an error I have occurred on my code and its works now. "properties": { "overall_satisfaction": {"type": ["double", "number"]}, }
    – ealvarado
    Commented Jan 14, 2021 at 17:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.