autorest.typescript icon indicating copy to clipboard operation
autorest.typescript copied to clipboard

[mgnt] Type choice name is not matched between definition and reference if name is all uppercase

Open MaryGao opened this issue 2 years ago • 0 comments

Type choice name is not matched between definition and reference if name is all uppercase After generation the definition of this type would be:

export type Sku = string;

But in the reference the type would be like:

/** Device Update Sku */
  sku?: SKU;

So we have below hint in VS code:

Cannot find name 'SKU'. Did you mean 'Sku'?
Exported type alias 'Account' has or is using private name 'SKU'.

Refer SKU enum definition in this swagger: https://github.com/Azure/azure-rest-api-specs/blob/78665b44d4b9295e56664193fc3baa9e0526d15d/specification/deviceupdate/resource-manager/Microsoft.DeviceUpdate/preview/2022-04-01-preview/deviceupdate.json#L1335

image

MaryGao avatar May 30 '22 05:05 MaryGao