【问题标题】:Power Automate Json Schema电源自动化 Json 架构
【发布时间】:2022-10-04 21:26:52
【问题描述】:

我正在使用电源自动从Egnyte API 中提取一些 Json 数据。 Power Automate 从示例查询生成架构。问题是它生成的查询不适用于所有查询,因为它将类型设置为“字符串”并且某些空值将出现在某些查询中。我是否需要将所有类型从“string”更改为[“string”,“null”]?似乎这是 Power automatic 应该为类型自动执行的操作。

这是错误消息的一部分。

"message": "Invalid type. Expected String but got Null.", 

这是架构。

{
"properties": {
    "itemsPerPage": {
        "type": "integer"
    },
    "resources": {
        "items": {
            "properties": {
                "active": {
                    "type": "boolean"
                },
                "authType": {
                    "type": "string"
                },
                "createdDate": {
                    "type": "string"
                },
                "deleteOnExpiry": {
                },
                "email": {
                    "type": "string"
                },
                "emailChangePending": {
                    "type": "boolean"
                },
                "expiryDate": {
                },
                "externalId": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "idpUserId": {
                    "type": "string"
                },
                "isServiceAccount": {
                    "type": "boolean"
                },
                "lastActiveDate": {
                    "type": "string"
                },
                "lastModificationDate": {
                    "type": "string"
                },
                "locked": {
                    "type": "boolean"
                },
                "name": {
                    "properties": {
                        "familyName": {
                            "type": "string"
                        },
                        "formatted": {
                            "type": "string"
                        },
                        "givenName": {
                            "type": "string"
                        }
                    },
                    "type": "object"
                },
                "role": {
                    "type": "string"
                },
                "userName": {
                    "type": "string"
                },
                "userPrincipalName": {
                },
                "userType": {
                    "type": "string"
                }
            },
            "required": [
                "id",
                "userName",
                "externalId",
                "email",
                "name",
                "active",
                "locked",
                "emailChangePending",
                "authType",
                "userType",
                "role",
                "idpUserId",
                "userPrincipalName",
                "expiryDate",
                "deleteOnExpiry",
                "createdDate",
                "lastModificationDate",
                "lastActiveDate",
                "isServiceAccount"
            ],
            "type": "object"
        },
        "type": "array"
    },
    "startIndex": {
        "type": "integer"
    },
    "totalResults": {
        "type": "integer"
    }
},
"type": "object"

}

【问题讨论】:

  • 有我们可以使用的示例 JSON 吗?另外,请向我们展示您的流程,以便我们掌握您的方法。
  • 我在流程中有 API 密钥,因此无法与您共享,但我可以共享架构。

标签: json jsonschema power-automate egnyte


【解决方案1】:

很快,解析 json 操作应该能够处理空值。

此功能预计将于本月全面上市: https://learn.microsoft.com/en-gb/power-platform-release-plan/2022wave2/power-automate/parse-json-action-now-handles-null-objects

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-01-23
    • 2023-02-17
    • 2021-06-25
    • 1970-01-01
    • 2021-09-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多