Azure / Azure/azure-sdk-tools

[TypeSpec APIView] TypeSpec parser incorrectly generates duplicate line ID

Open
#11,922 3 comments 1 reaction 1 assignee Claimed by @tjprescott View on GitHub
APIView TypeSpec
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

TypeSpec parser is generating duplicate line ids in some cases, this is not allowed by ApiView Web, so these needs to be addressed.

We are planning to enforce this policy, and we have an outgoing effort for this: https://github.com/Azure/azure-sdk-tools/issues/11591

Sharing an example: [Oracle.Database](https://spa.apiviewstagingtest.com/review/2faf4b6ed221430b9137650d1d5ee620?activeApiRevisionId=86fb18443c1a48dcadd1290b0fd6210e)

and a small list of places where this is happening:
```json
{
"$id": "17",
"language": "TypeSpec",
"packageName": "Oracle.Database",
"reviewId": "2faf4b6ed221430b9137650d1d5ee620",
"revisionId": "86fb18443c1a48dcadd1290b0fd6210e",
"duplicateLineIds": "Oracle.Database.example, Oracle.Database.ListActions.ArmResourceGetActionAsync.@extension, Oracle.Database.Versions.v20230901.@useDependency"
},
{
"$id": "18",
"language": "TypeSpec",
"packageName": "Microsoft.Support",
"reviewId": "2703c77c22cf4a5093dd42e9684010f2",
"revisionId": "3c46a944757649a2876380c3ca620211",
"duplicateLineIds": "Microsoft.Support.doc, Microsoft.Support.Versions.v2024_04_01.@useDependency"
},
{
"$id": "19",
"language": "TypeSpec",
"packageName": "Microsoft.Compute",
"reviewId": "1097f44b07334f34a318f999b6fa43c3",
"revisionId": "5a44543f38f84a5490008998460b8286",
"duplicateLineIds": "Microsoft.Compute.externalTypeRef, Microsoft.Compute.identifiers, Microsoft.Compute.doc, Microsoft.Compute.Versions.v2024_11_01.@useDependency, Microsoft.Compute.VirtualMachineScaleSetVMPath.anonymous.KeysOf"
},
{
"$id": "20",
"language": "TypeSpec",
"packageName": "Microsoft.AzureStackHCI",
"reviewId": "b3ac630ce9324be38f24c2c26a57a6e4",
"revisionId": "15bed05b316145b981a9bbbd35aca430",
"duplicateLineIds": "Microsoft.AzureStackHCI.ImageArmReference.id.anonymous.type, Microsoft.AzureStackHCI.IPConfigurationArmReference.resourceId.anonymous.type, Microsoft.AzureStackHCI.LogicalNetworkArmReference.id.anonymous.type, Microsoft.AzureStackHCI.ManagedNetworkFabricArmReference.resourceId.anonymous.type, Microsoft.AzureStackHCI.PublicIPAddressProperties.ipAllocationScope.anonymous.type, Microsoft.AzureStackHCI.Versions.v2024_02_01_preview.@useDependency, Microsoft.AzureStackHCI.Versions.v2024_05_01_preview.@useDependency, Microsoft.AzureStackHCI.Versions.v2024_07_15_preview.@useDependency, Microsoft.AzureStackHCI.Versions.v2024_08_01_preview.@useDependency, Microsoft.AzureStackHCI.Versions.v2024_09_01_preview.@useDependency, Microsoft.AzureStackHCI.Versions.v2024_10_01_preview.@useDependency, Microsoft.AzureStackHCI.Versions.v2025_02_01_preview.@useDependency, Microsoft.AzureStackHCI.Versions.v2025_04_01_preview.@useDependency, Microsoft.AzureStackHCI.Versions.v2025_06_01_preview.@useDependency, Microsoft.AzureStackHCI.Versions.v2025_09_01_preview.@useDependency"
},
{
"$id": "21",
"language": "TypeSpec",
"packageName": "Microsoft.GuestConfiguration",
"reviewId": "07e08781e2cf43d1890bbc23ebb630fd",
"revisionId": "a8139fbb54c54b48a098ba88d756dd5d",
"duplicateLineIds": "Microsoft.GuestConfiguration.doc, Microsoft.GuestConfiguration.Versions.v2024_04_05.@useDependency, Microsoft.GuestConfiguration.GuestConfigurationAssignmentOps.anonymous.ExtensionProviderNamespace, Microsoft.GuestConfiguration.GuestConfigurationConnectedVMwarevSphereAssignmentOps.anonymous.ExtensionProviderNamespace, Microsoft.GuestConfiguration.GuestConfigurationHCRPAssignmentOps.anonymous.ExtensionProviderNamespace"
},
{
"$id": "22",
"language": "TypeSpec",
"packageName": "Microsoft.AppConfiguration",
"reviewId": "c3eb6a477cc04cdf9ebde23bee22fda1",
"revisionId": "1946216bfddf4e0693786f707a00af7b",
"duplicateLineIds": "Microsoft.AppConfiguration.maxLength, Microsoft.AppConfiguration.minLength, Microsoft.AppConfiguration.doc"
},
{
"$id": "23",
"language": "TypeSpec",
"packageName": "Microsoft.AzureFleetCapacity",
"reviewId": "7bed60c483284f2fbb4541c4addafc96",
"revisionId": "920db911b3ba4682b242c83a6a7fc6c6",
"duplicateLineIds": "Microsoft.AzureFleetCapacity.Versions.v2025_08_01_preview.@useDependency"
},
{
"$id": "24",
"language": "TypeSpec",
"packageName": "Microsoft.Network",
"reviewId": "61f151c7236d48c18abde8f461186725",
"revisionId": "c68b8599d9914d68972be318b2811030",
"duplicateLineIds": "Microsoft.Network.doc"
},
{
"$id": "25",
"language": "TypeSpec",
"packageName": "Microsoft.DataBox",
"reviewId": "b365cce333634e708329faca8d8b5011",
"revisionId": "9fd6cb0b66e24601a596c9b0de532d1e",
"duplicateLineIds": "Microsoft.DataBox.doc, Microsoft.DataBox.Versions.v2025_07_01.@useDependency"
},
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.