microsoft / microsoft/kiota

Feature request: support case insensitive field deserialization.

Open
#7,060 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Csharp enhancement type:feature
Dominant language
C#
Stars
3.8k
Forks
333
Avg merge
16h 29m
Merged PRs (30d)
116

Description

### 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 camelCase format but response is PascalCase. Thus some properties are not mapped.

### Expected behavior

returned type should be `new Dictionary>(base.GetFieldDeserializers(), StringComparer.OrdinalIgnoreCase)` instead of `new Dictionary>(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
```

```

### Other information

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is named. Reproduce the generated-client scenario with PascalCase and camelCase properties, then trace the generated field-deserializer dictionaries; done when the generated C# client maps fields regardless of case and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.