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

Unable to use user defined types due to Convert.ChangeType #1686

Open
Nairda015 opened this issue Feb 29, 2024 · 2 comments
Open

Unable to use user defined types due to Convert.ChangeType #1686

Nairda015 opened this issue Feb 29, 2024 · 2 comments
Labels
annotations bug This issue is a bug. p2 This is a standard priority issue queued

Comments

@Nairda015
Copy link

Describe the bug

Current implementation of [FromHeaders] limits supported types to primitives like string/int

Expected Behavior

Correct values are passed from generated code to function

Current Behavior

It throws when I want to use Guid or other types with implicit cast from string or custom parser (IParsable)

Reproduction Steps

Add Guid as param with FromHeaderAttribute

Possible Solution

Enable using IParsable or casting from string

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

Amazon.Lambda.Annotations 1.2.0

Targeted .NET Platform

.NET 8

Operating System and version

Windows 10

@Nairda015 Nairda015 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 29, 2024
@bhoradc bhoradc added annotations needs-review and removed needs-triage This issue or PR still needs to be triaged. labels Mar 5, 2024
@ashishdhingra ashishdhingra changed the title Unable tu use user defined types due to Convert.ChangeType Unable to use user defined types due to Convert.ChangeType Mar 7, 2024
@ashishdhingra
Copy link
Contributor

Discussed with the team. This is a new feature to implement support for custom types. However, in interim, we should throw proper exception during source generation.

@ashishdhingra ashishdhingra added p2 This is a standard priority issue queued and removed needs-review labels Mar 15, 2024
@Nairda015
Copy link
Author

Do you need more hands in AWS to work on new features for this project? :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
annotations bug This issue is a bug. p2 This is a standard priority issue queued
Projects
None yet
Development

No branches or pull requests

3 participants