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): Remove double quotes wrapping from uncasted single tokens in array editor #4670

Merged
merged 5 commits into from
Apr 23, 2024

Conversation

shuktika12163
Copy link
Contributor

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Bug fix for file content showing as empty/corrupted in email: https://msazure.visualstudio.com/One/_workitems/edit/27221229/

  • What is the current behavior? (You can also link to an open issue here)
    When user gets a file from OneDrive and sends an email with file content in attachments, current behavior wraps a single token in array editor in @{} (double quotes) which during runtime stringifies the output of the token.

Serialized array editor:
image

Code view:
image

Due to this, the inputs generated for ContentBytes for the send email action in OpenApi format are not correct (ContentBytes is supposed to be an object).

Current raw inputs sample:

"emailMessage/Attachments": [
      {
          "Name": "test.pdf",
          "ContentBytes": "JVBERi0xLj..."
      }
  ],
  • What is the new behavior (if this is a feature change)?
    In array editor, if the token is a single token and not casted, double quotes wrapping the token will be removed if present.

Serialized array editor:
image

Code view without {}:
image

Expected/new raw inputs sample after the change:

"emailMessage/Attachments": [
      {
          "Name": "test.pdf",
          "ContentBytes": {
                "$content-type": "application/pdf",
                "$content": "JVBERi0xLjcN..."
            }
      }
  ],
  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    No

  • Please Include Screenshots or Videos of the intended change:
    Provided above

@hartra344 hartra344 merged commit a9639dd into Azure:main Apr 23, 2024
10 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