Skip to content

Commit 27e9714

Browse files
Generate the Azure scenarios (Azure#49715)
* Generate azure specs * revert test project change
1 parent e2a2f54 commit 27e9714

39 files changed

+2636
-13
lines changed

eng/packages/http-client-csharp/eng/scripts/Generate.ps1

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,27 @@ $failingSpecs = @(
7474
Join-Path 'http' 'parameters' 'collection-format'
7575
Join-Path 'http' 'response' 'status-code-range' # Response namespace conflicts with Azure.Response
7676
Join-Path 'http' 'routes'
77-
)
77+
# Azure scenarios not yet buildable
78+
Join-Path 'http' 'client' 'namespace'
79+
Join-Path 'http' 'azure' 'client-generator-core' 'access'
80+
Join-Path 'http' 'azure' 'client-generator-core' 'api-version' 'header'
81+
Join-Path 'http' 'azure' 'client-generator-core' 'api-version' 'path'
82+
Join-Path 'http' 'azure' 'client-generator-core' 'api-version' 'query'
83+
Join-Path 'http' 'azure' 'core' 'basic'
84+
Join-Path 'http' 'azure' 'core' 'lro' 'rpc'
85+
Join-Path 'http' 'azure' 'core' 'lro' 'standard'
86+
Join-Path 'http' 'azure' 'core' 'model'
87+
Join-Path 'http' 'azure' 'core' 'page'
88+
Join-Path 'http' 'azure' 'core' 'scalar'
89+
Join-Path 'http' 'azure' 'core' 'traits'
90+
Join-Path 'http' 'azure' 'encode' 'duration'
91+
Join-Path 'http' 'azure' 'payload' 'pageable'
92+
# These scenarios will be covered in Azure.Generator.Mgmt
93+
Join-Path 'http' 'azure' 'resource-manager' 'common-properties'
94+
Join-Path 'http' 'azure' 'resource-manager' 'non-resource'
95+
Join-Path 'http' 'azure' 'resource-manager' 'operation-templates'
96+
Join-Path 'http' 'azure' 'resource-manager' 'resources'
7897

79-
$azureAllowSpecs = @(
80-
Join-Path 'http' 'client' 'naming'
81-
Join-Path 'http' 'client' 'structure' 'client-operation-group'
82-
Join-Path 'http' 'client' 'structure' 'default'
83-
Join-Path 'http' 'client' 'structure' 'multi-client'
84-
Join-Path 'http' 'client' 'structure' 'renamed-operation'
85-
Join-Path 'http' 'client' 'structure' 'two-operation-group'
86-
Join-Path 'http' 'resiliency' 'srv-driven'
8798
)
8899

89100
$spectorLaunchProjects = @{}
@@ -110,10 +121,6 @@ foreach ($directory in $directories) {
110121
continue
111122
}
112123

113-
if ($fromAzure -eq $true -and !$azureAllowSpecs.Contains($subPath)) {
114-
continue
115-
}
116-
117124
if ($failingSpecs.Contains($subPath)) {
118125
Write-Host "Skipping $subPath" -ForegroundColor Yellow
119126
continue

eng/packages/http-client-csharp/generator/Azure.Generator/src/Properties/launchSettings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@
2525
"commandName": "Executable",
2626
"executablePath": "dotnet"
2727
},
28+
"http-azure-client-generator-core-flatten-property": {
29+
"commandLineArgs": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.dll $(SolutionDir)/TestProjects/Spector/http/azure/client-generator-core/flatten-property -g AzureStubGenerator",
30+
"commandName": "Executable",
31+
"executablePath": "dotnet"
32+
},
33+
"http-azure-client-generator-core-usage": {
34+
"commandLineArgs": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.dll $(SolutionDir)/TestProjects/Spector/http/azure/client-generator-core/usage -g AzureStubGenerator",
35+
"commandName": "Executable",
36+
"executablePath": "dotnet"
37+
},
38+
"http-azure-special-headers-client-request-id": {
39+
"commandLineArgs": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.dll $(SolutionDir)/TestProjects/Spector/http/azure/special-headers/client-request-id -g AzureStubGenerator",
40+
"commandName": "Executable",
41+
"executablePath": "dotnet"
42+
},
2843
"http-client-structure-default": {
2944
"commandLineArgs": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.dll $(SolutionDir)/TestProjects/Spector/http/client/structure/default -g AzureStubGenerator",
3045
"commandName": "Executable",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"package-name": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty",
3+
"license": {
4+
"name": "MIT License",
5+
"company": "Microsoft Corporation",
6+
"link": "https://mit-license.org",
7+
"header": "Copyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the MIT License.",
8+
"description": "Copyright (c) Microsoft Corporation\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the “Software”), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE."
9+
}
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio Version 16
3+
VisualStudioVersion = 16.0.29709.97
4+
MinimumVisualStudioVersion = 10.0.40219.1
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "_Specs_.Azure.ClientGenerator.Core.FlattenProperty", "src\_Specs_.Azure.ClientGenerator.Core.FlattenProperty.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
6+
EndProject
7+
Global
8+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
9+
Debug|Any CPU = Debug|Any CPU
10+
Release|Any CPU = Release|Any CPU
11+
EndGlobalSection
12+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
13+
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
14+
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
15+
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
16+
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU
17+
{8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18+
{8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU
19+
{8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU
20+
{8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU
21+
{A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22+
{A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
23+
{A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
24+
{A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU
25+
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26+
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU
27+
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU
28+
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU
29+
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30+
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
31+
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
32+
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU
33+
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34+
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU
35+
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU
36+
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU
37+
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38+
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
39+
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU
40+
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU
41+
EndGlobalSection
42+
GlobalSection(SolutionProperties) = preSolution
43+
HideSolutionNode = FALSE
44+
EndGlobalSection
45+
GlobalSection(ExtensibilityGlobals) = postSolution
46+
SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE}
47+
EndGlobalSection
48+
EndGlobal

eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenPropertyClient.cs

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/FlattenPropertyClientOptions.cs

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/Models/ChildFlattenModel.Serialization.cs

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/Models/ChildFlattenModel.cs

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/Models/ChildModel.Serialization.cs

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/Generated/Models/ChildModel.cs

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)