Azure / typespec-azure

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

[TCGC]: Unify case of header names #1098

Open archerzz opened 4 days ago

archerzz commented 4 days ago

Clear and concise description of the problem

Minor.

In some cases, the name of content type header as parameter is content-type. In other cases, it's Content-Type. See https://github.com/Azure/autorest.csharp/blob/72659d42a5067035f0c2d969ed07dd523cbda4dc/test/TestProjects/FirstTest-TypeSpec/FirstTest-TypeSpec.tsp#L286

@header contentType: "text/plain",

The header name is content-type v.s. Content-Type. image

This is not a big issue, because according to HTTP spec, the header name is case-insensitive.

Checklist