aws / aws/aws-lambda-dotnet

Unable to use user defined types due to Convert.ChangeType

Open
#1,686 2 comments 3 reactions 0 assignees View on GitHub
annotations bug p2 queued
Dominant language
C#
Stars
1.7k
Forks
503
Avg merge
1d 5h
Merged PRs (30d)
18

Description

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.