Azure / Azure/azure-rest-api-specs
The parameter name of request body in a operation should be updated automatically
Open
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
Assessment
This issue has not been assessed yet.