如何解决“类型无效。需要整数但得到数字”。用于 Power Automate 中的 JSON 有效负载?

Ash*_*han 4 api json power-automate

我在使用Parse JSONPower Automate 流中的函数的示例 JSON 负载中遇到错误:

{
    "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": []
}
Run Code Online (Sandbox Code Playgroud)

以上是我在 JIRA 中遇到的自定义字段的示例错误。任何线索如何解决它?

Aru*_*oth 7

像你看起来必须定义为两种模式integernumber。这应该可以解决问题。

"customfield_18478": {

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

},
Run Code Online (Sandbox Code Playgroud)

参考