Azure / Azure/azure-rest-api-specs

The parameter name of request body in a operation should be updated automatically

Open
#39,729 0 comments 1 reaction 2 assignees Claimed by @ArthurMa1978 View on GitHub
CodeGen Mgmt
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

In https://github.com/Azure/azure-sdk-for-net/blob/main/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/BodyParameterNameNormalizer.cs, the current logic only handles suffix-based naming and does not consider the operation type. The expected behavior should be:
1. **For PATCH operations**: If the request body is a model, the parameter name should be patch.
2. **For POST operations**: If the request body is a model, the parameter name should be content.

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.