[tcgc] report error if http body with xml content type is an anonymous model
- Dominant language
- TypeScript
- Stars
- 27
- Forks
- 90
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 156
Description
### Describe the bug
For [this](https://github.com/Azure/azure-rest-api-specs/blob/feature/blob-tsp/specification/storage/Microsoft.BlobStorage/routes.tsp#L52-L57) operation, anonymous model with generated name `SetPropertiesRequest` is created. However, its `serializationOptions.xml.name` is empty instead of the source model name ([`StorageServiceProperties` ](https://github.com/Azure/azure-rest-api-specs/blob/feature/blob-tsp/specification/storage/Microsoft.BlobStorage/models.tsp#L764-L786) in this case). As a result, the XML schema doesn't match.
### Reproduction
tcgc version 0.54.0
### 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 bug in the typespec language or core libraries file it in the [TypeSpec repo](https://github.com/Microsoft/TypeSpec/issues/new/choose)
- [x] Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- [x] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
Contributor guide
Assessment
This issue has not been assessed yet.