Closed archerzz closed 3 months ago
minor
SdkHttpResponse.contentTypes is an optional array: https://github.com/Azure/typespec-azure/blob/d30db5bd8bf78c5eb237ea8cdbc0e98755a86be1/packages/typespec-client-generator-core/src/interfaces.ts#L435-L440
SdkHttpResponse.contentTypes
So it would be better to either a non-empty array or undefined, but not an empty array.
undefined
Try to parse a spec like https://github.com/Azure/cadl-ranch/blob/main/packages/cadl-ranch-specs/http/authentication/http/custom/main.tsp
You'll find the contentTypes is an empty array.
contentTypes
good point, let me fix this
Describe the bug
minor
SdkHttpResponse.contentTypes
is an optional array: https://github.com/Azure/typespec-azure/blob/d30db5bd8bf78c5eb237ea8cdbc0e98755a86be1/packages/typespec-client-generator-core/src/interfaces.ts#L435-L440So it would be better to either a non-empty array or
undefined
, but not an empty array.Reproduction
Try to parse a spec like https://github.com/Azure/cadl-ranch/blob/main/packages/cadl-ranch-specs/http/authentication/http/custom/main.tsp
You'll find the
contentTypes
is an empty array.Checklist