Skip to content

Escaping Item keywords in request builders also escapes unrelated request builder properties. #5433

Closed

Description

What are you generating using Kiota, clients or plugins?

API Client/SDK

In what context or format are you using Kiota?

Source Build

Client library/SDK language

Csharp

Describe the bug

Related to #4814

The escaping of requestBuilder properties causes the escpaing of unrelated builders such as DriveItemRequestBuilder becoming DriveItem_EscapedRequestBuilder.

The check should probably not use endsWith at

if (child.Path.EndsWith(OpenApiUrlTreeNodeExtensions.ReservedItemName, StringComparison.OrdinalIgnoreCase))

as it causing failing compilation at
microsoftgraph/msgraph-sdk-java#2161 and related PRs in other languages.

Expected behavior

  • Non breaking change
  • Passing compilation

How to reproduce

Run Kiota on latest head of main branch and with latest MS graph metadata.

Open API description file

No response

Kiota Version

main

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_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

CsharpPull requests that update .net codeWIPtype:bugA broken experience

Type

No type

Projects

  • Status

    Done ✔️

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions