Azure / typespec-azure

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

Add `resourceType` scalar in `typespec-azure-core` library #1268

Open ArcturusZhang opened 1 month ago

ArcturusZhang commented 1 month ago

We also need a resourceType scalar to make a specific scalar to be the arm resource type. DotNet SDK will generate resourceType into Azure.Core.ResourceType. Other languages could simply generate it as string.

The definition could be

scalar resourceType extends string;

And the TrackedResource, ProxyResource template needs to be updated accordingly - their type property should be resourceType.

markcowl commented 1 month ago

Also, this should change the type of the allowedResourceTypes array in the armResourceIdentifier template

markcowl commented 1 month ago

est: 5