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

Wrong json key name for URL (uses uri instead) #179

Closed
janfonas opened this issue Jul 20, 2022 · 4 comments · Fixed by #180
Closed

Wrong json key name for URL (uses uri instead) #179

janfonas opened this issue Jul 20, 2022 · 4 comments · Fixed by #180
Assignees
Labels
bug Something isn't working card format/adaptivecard Adaptive Card support
Milestone

Comments

@janfonas
Copy link

janfonas commented Jul 20, 2022

I've been trying to add an image to a message, but failing. Did a prettyPrint() of the json, and I see that the url key is missing, but it does have a uri key, with the value from Url in my code. Looking at the docs from MS, I think this should be url.

URL string `json:"uri,omitempty"`

Should not this be json:"url,omitempty" and not json:"uri,omitempty"

@atc0005 atc0005 self-assigned this Jul 20, 2022
@atc0005 atc0005 added the bug Something isn't working label Jul 20, 2022
@atc0005 atc0005 added this to the v2.7.0 milestone Jul 20, 2022
@atc0005
Copy link
Owner

atc0005 commented Jul 20, 2022

Looking at the docs from MS, I think this should be url.

Thank you for the report, and it looks like you're right:
https://adaptivecards.io/explorer/Image.html

Properties
url

The URL to the image. Supports data URI in version 1.2+

Type: uri
Required: Yes

I'll fix this momentarily.

atc0005 added a commit that referenced this issue Jul 20, 2022
Update the JSON key name to match the field name. I mistakenly
used the property type for the field instead of the field name
itself.

refs GH-179
@atc0005
Copy link
Owner

atc0005 commented Jul 20, 2022

@janfonas Pushing tag v2.7.0-alpha.6 now with the changes from #180.

@janfonas
Copy link
Author

Great! Working like a charm! Thanks for the quick response! :)

@atc0005
Copy link
Owner

atc0005 commented Jul 20, 2022

@janfonas You're welcome. Thanks for taking the time to file a report, it is much appreciated!

@atc0005 atc0005 changed the title Wrong json key name for URL (uses uri insted) Wrong json key name for URL (uses uri instead) Dec 12, 2022
@atc0005 atc0005 added the card format/adaptivecard Adaptive Card support label Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working card format/adaptivecard Adaptive Card support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants