Provide a way to rename body parameters when using Azure.Core templates.
- Dominant language
- TypeScript
- Stars
- 27
- Forks
- 90
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 156
Description
### Clear and concise description of the problem
There's currently no simple way to rename a body parameter when using some Azure.Core templates, such as LongRunningResourceCreateOrReplace. This means folks have to re-write their operations or change templates simply to rename a body parameter. It would be nice to have a way to do these renames while still using the same standard template.
Example of an operation that cannot rename a body parameter simply:
```
op deidentifyDocuments is DeidentifyOperations.LongRunningResourceCreateOrReplace;
```
I was hoping we could access the body with metatypes or some other method.
### Checklist
- [x] Follow our [Code of Conduct](https://github.com/azure/typespec-azure/blob/main/CODE_OF_CONDUCT.md)
- [x] Check that this issue is about the Azure libraries for typespec. For feature request in the typespec language or core libraries file it in the [TypeSpec repo](https://github.com/Microsoft/TypeSpec/issues/new/choose)
- [x] Read the [docs](https://azure.github.io/typespec-azure/).
- [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Contributor guide
Research direction
Start with the LongRunningResourceCreateOrReplace template and the deidentifyDocuments operation example in the issue. Determine how body parameters are exposed for renaming without rewriting the operation or template; done means a standard Azure.Core template supports this rename directly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100