Skip to content

GetFieldDeserializers should instanciate an insensitive dictionary #7060

@FraiseBanane

Description

@FraiseBanane

What are you generating using Kiota, clients or plugins?

API Client/SDK

In what context or format are you using Kiota?

Nuget tool

Client library/SDK language

Csharp

Describe the bug

My app receives a response from an API for which I use a Kiota generated client. Kiota expects PascalCase format but response is camelCase. Thus some properties are not mapped.

Expected behavior

returned type should be new Dictionary<string, Action<IParseNode>>(base.GetFieldDeserializers(), StringComparer.OrdinalIgnoreCase) instead of new Dictionary<string, Action<IParseNode>>(base.GetFieldDeserializers()).

How to reproduce

Generate a client with Kiota from a swagger with PascalCase property names.
Respond to the requests with CamelCase property names.

Check that properties are not mapped and values are not as expected

Open API description file

No response

Kiota Version

1.29.0

Latest Kiota version known to work for scenario above?(Not required)

No response

Known Workarounds

No response

Configuration

No response

Debug output

Click to expand log ```
</details>


### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    CsharpPull requests that update .net codestatus:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    Status

    Needs Triage 🔍

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions