microsoft / microsoft/typespec
[python] default body param name to model name
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
When we switched to tsp, we decided to default body param names to the generic `body`. The main reason we went back to body - or at least a big part of it - was the base assumption at the time that we wouldn't generate models by defaults and thus didn't have a model to start with and we didn't want the introduction of a model later to become a breaking change. That assumption (luckily) did change over time (so it is not all regrets about how life has gone). As @johanste says, "body is the 'we couldn't figure out anything better, this seem to be non-optimal but safe' name", but we want to try to do better.
We could backfill existing libraries by using new decorator [`@bodyClientName`](https://github.com/Azure/typespec-azure/issues/3532) to avoid breaking changes
Contributor guide
Assessment
This issue has not been assessed yet.