Azure / typespec-azure

About TypeSpec Azure Libraries
https://azure.github.io/typespec-azure/
MIT License
11 stars 37 forks source link

[Bug][TCGC] TCGC shall not ignore `content-type` in output property `headers` #1112

Closed msyyc closed 3 months ago

msyyc commented 3 months ago

For the following Typespec: https://github.com/Azure/azure-rest-api-specs/blob/87a08b955c257c773a3bd42553c718d4b1092955/specification/schemaregistry/SchemaRegistry/main.tsp#L234-L238, TCGC doesn't output header content-type. The root cause is: after refactor, content-type is moved as special body property instead of headers. TCGC also needs special logic to extract content type to headers again.