-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Rename body parameter in non-resource method to "content". #53169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename body parameter in non-resource method to "content". #53169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements functionality to rename body parameters in non-resource methods from generic names to "content" for better API consistency. The change ensures that body parameters in non-resource methods use a standardized naming convention while maintaining the existing "patch" naming for resource update methods.
- Introduces a caching mechanism for non-resource method providers to enable parameter renaming
- Adds logic to identify and rename body parameters in non-resource methods to "content"
- Extends the management input library to track models used as body parameters in non-resource methods
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
NameVisitor.cs | Added logic to rename body parameters to "content" for non-resource methods and "patch" for resource methods |
NonResourceMethodProviderCache.cs | New utility class providing thread-safe caching for non-resource method providers |
MockableResourceProvider.cs | Updated to cache non-resource method providers during creation |
ExtensionProvider.cs | Extended to cache redirect methods when their target methods are non-resource methods |
ManagementInputLibrary.cs | Added functionality to identify models used as body parameters in non-resource methods |
Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.