Azure / typespec-azure

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

[tcgc] don't set optional `.contentTypes` property on responses to an empty list #1070

Closed iscai-msft closed 2 weeks ago

iscai-msft commented 2 weeks ago

fixes #992

azure-sdk commented 2 weeks ago

All changed packages have been documented.

Show changes ### `@azure-tools/typespec-client-generator-core` - _fix_ [✏️](https://github.com/Azure/typespec-azure/edit/content_types_not_empty/.chronus/changes/content_types_not_empty-2024-5-24-16-39-12.md?pr=/Azure/typespec-azure/pull/1070) > don't let optional `.contentTypes` on response body be empty. If it's empty, just set it to undefined
azure-sdk commented 2 weeks ago

You can try these changes at https://cadlplayground.z22.web.core.windows.net/typespec-azure/prs/1070/

Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/typespec-azure/prs/1070/