Skip to content

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

Open
@Nairda015

Description

@Nairda015

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    annotationsbugThis issue is a bug.p2This is a standard priority issuequeued

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions