Skip to content

Commit daf2487

Browse files
Add legacy-emitter-package.json files and update tsp-location.yaml to use explicit emitter paths (#54277)
* Initial plan * Add legacy-emitter-package.json files and update tsp-location.yaml files to use legacy emitter Co-authored-by: JoshLove-msft <[email protected]> * Delete eng/emitter-package.json and eng/emitter-package-lock.json Co-authored-by: JoshLove-msft <[email protected]> * Fix migration script * Update template to use mgmt emitter instead of legacy emitter Co-authored-by: JoshLove-msft <[email protected]> * delete authoring package.json --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: JoshLove-msft <[email protected]> Co-authored-by: jolov <[email protected]>
1 parent a232206 commit daf2487

File tree

65 files changed

+82
-1932
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+82
-1932
lines changed

doc/GeneratorMigration/Library_Inventory.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@
1212

1313
## Summary
1414

15-
- Total libraries: 394
15+
- Total libraries: 396
1616
- Management Plane (MPG): 225
1717
- Autorest/Swagger: 158
1818
- New Emitter (TypeSpec): 26
1919
- Old TypeSpec: 41
20-
- Data Plane (DPG): 169
20+
- Data Plane (DPG): 171
2121
- Autorest/Swagger: 86
2222
- New Emitter (TypeSpec): 19
23-
- Old TypeSpec: 15
23+
- Old TypeSpec: 17
2424
- No generator: 49
2525

2626

2727
## Data Plane Libraries (DPG) - Migrated to New Emitter
2828

2929
Libraries that provide client APIs for Azure services and have been migrated to the new TypeSpec emitter.
3030

31-
**Migration Status**: 19 / 34 (55.9%)
31+
**Migration Status**: 19 / 36 (52.8%)
3232

3333
| Service | Library | New Emitter |
3434
| ------- | ------- | ----------- |
@@ -40,6 +40,8 @@ Libraries that provide client APIs for Azure services and have been migrated to
4040
| batch | Azure.Compute.Batch | |
4141
| cognitivelanguage | Azure.AI.Language.Conversations | |
4242
| cognitivelanguage | Azure.AI.Language.Conversations.Authoring | |
43+
| cognitivelanguage | Azure.AI.Language.QuestionAnswering.Authoring | |
44+
| cognitivelanguage | Azure.AI.Language.QuestionAnswering.Inference | |
4345
| cognitivelanguage | Azure.AI.Language.Text | |
4446
| cognitivelanguage | Azure.AI.Language.Text.Authoring | |
4547
| communication | Azure.Communication.JobRouter | |

doc/GeneratorMigration/Library_Inventory.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ function Get-GeneratorType {
6565
return $EmitterMap[$emitterPath]
6666
}
6767

68-
# If we couldn't extract a specific name, use a default fully qualified name
69-
return "Unknown TypeSpec Generator: $emitterPath"
68+
# If we didn't match the known emitters, return TSP-Old
69+
return "TSP-Old"
7070
}
7171
}
7272
else {
@@ -101,7 +101,7 @@ function Get-GeneratorType {
101101

102102
function Test-HasTspLocation {
103103
param([string]$Path)
104-
104+
105105
# Check if the library has a tsp-location.yaml file
106106
$tspLocationFiles = Get-ChildItem -Path $Path -Recurse -Filter "tsp-location.yaml" -ErrorAction SilentlyContinue
107107
return ($tspLocationFiles.Count -gt 0)
@@ -173,7 +173,7 @@ function New-MarkdownReport {
173173
$mgmtSwagger = $mgmtLibraries | Where-Object { $_.generator -eq "Swagger" }
174174
$mgmtNewEmitter = $mgmtLibraries | Where-Object { $_.generator -notin @("Swagger", "TSP-Old", "No Generator") }
175175
$mgmtTspOld = $mgmtLibraries | Where-Object { $_.generator -eq "TSP-Old" }
176-
176+
177177
$dataSwagger = $dataLibraries | Where-Object { $_.generator -eq "Swagger" }
178178
$dataNewEmitter = $dataLibraries | Where-Object { $_.generator -notin @("Swagger", "TSP-Old", "No Generator") }
179179
$dataTspOld = $dataLibraries | Where-Object { $_.generator -eq "TSP-Old" }
@@ -186,7 +186,7 @@ function New-MarkdownReport {
186186
$mgmtMigrated = $mgmtNewEmitter.Count
187187
$mgmtTypeSpecTotal = $mgmtTypeSpecLibs.Count
188188
$mgmtPercentage = if ($mgmtTypeSpecTotal -gt 0) { [math]::Round(($mgmtMigrated / $mgmtTypeSpecTotal) * 100, 1) } else { 0 }
189-
189+
190190
$dataMigrated = $dataNewEmitter.Count
191191
$dataTypeSpecTotal = $dataTypeSpecLibs.Count
192192
$dataPercentage = if ($dataTypeSpecTotal -gt 0) { [math]::Round(($dataMigrated / $dataTypeSpecTotal) * 100, 1) } else { 0 }
File renamed without changes.
File renamed without changes.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
directory: specification/LowercaseProviderShortName/TypeSpecDirectory
22
commit: CommitId
3-
repo: Azure/azure-rest-api-specs
3+
repo: Azure/azure-rest-api-specs
4+
emitterPackageJsonPath: eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json

sdk/ai/Azure.AI.Agents.Persistent/tsp-location.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ directory: specification/ai/Azure.AI.Agents
22
commit: 7b7f3e03323b8bee808184e41e9906e9d8c2d8e9
33
repo: Azure/azure-rest-api-specs
44
additionalDirectories:
5+
emitterPackageJsonPath: eng/legacy-emitter-package.json
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
directory: specification/cognitiveservices/AnomalyDetector
22
commit: 6267b64842af3d744c5b092a3f3beef49729ad6d
33
repo: Azure/azure-rest-api-specs
4+
emitterPackageJsonPath: eng/legacy-emitter-package.json
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
directory: specification/vmware/resource-manager/Microsoft.AVS/AVS
22
commit: e89374a1f5e2c4ddcf34ed01495a98dfedac0f8b
3-
repo: Azure/azure-rest-api-specs
3+
repo: Azure/azure-rest-api-specs
4+
emitterPackageJsonPath: eng/legacy-emitter-package.json
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
directory: specification/azurestackhci/AzureStackHCI.StackHCIVM.Management
22
commit: 95a3846d7efe375934a6be713413f5a2cf9d17f1
3-
repo: Azure/azure-rest-api-specs
3+
repo: Azure/azure-rest-api-specs
4+
emitterPackageJsonPath: eng/legacy-emitter-package.json
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
directory: specification/batch/Azure.Batch
22
commit: 110584e2d5955b67491cf3b377df887fe24bacbd
33
repo: Azure/azure-rest-api-specs
4+
emitterPackageJsonPath: eng/legacy-emitter-package.json

0 commit comments

Comments
 (0)