Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Designer): Fix Request Body JSON Deserialization Bug #4745

Conversation

pranaydubeymicrosoft
Copy link
Contributor

@pranaydubeymicrosoft pranaydubeymicrosoft commented May 1, 2024

Adding context in top level comment

Adding a typecheck for output.type to ensure it's a string as expected. The current implementation permits users to provide a custom schema where output.type is an array instead of a string. This causes an issue during deserialization pictured below. This fix will block the equals comparison when output.type is not a string value.

Bug Repro:
Create a flow/logicapp in the designer using the http trigger "When an HTTP request is received" and in the schema provide something like:

{
    "type": "object",
    "properties": {
        "labels": {
            "type": "array",
            "items": {
                "type": [
                    "string",
                    "null"
                ]
            }
        }
    }
}

Try to save, note the error:

Power Automate
image

image

Logic Apps
image

Logic Apps Designer with fix
image

@hartra344
Copy link
Contributor

Can you please add a proper explanation of what this change is trying to accomplish and why?

@pranaydubeymicrosoft pranaydubeymicrosoft changed the title add string typecheck for spliton options fix(Designer): Fix Request Body JSON Deserialization Bug May 1, 2024
@hartra344 hartra344 merged commit f78a5e5 into Azure:main May 2, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants