From 47753e5c3b665d2a8033bf0d82cb6bad65b39ceb Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Fri, 29 Apr 2016 18:54:41 -0700 Subject: [PATCH] Fix AzureResourceSchema projects (#956) * Automatically detect MSBuild tools version in Windows platform * Add initial AzureResourceSchema project and test project * Update AzureResourceSchema projects and add initial c# files * Add AzureResourceSchema to configuration file * AzureResourceSchemaCodeGenerator shows up in AutoRest help and tests pass * Almost have Storage schema generating from swagger spec * Fix AzureResourceSchema project * Can generate storage schema from swagger * Fix FXCopy issues --- AutoRest.sln | 10 +- AutoRest/AutoRest.Core/AutoRest.nuspec | 1 + AutoRest/AutoRest/AutoRest.Release.json | 3 + AutoRest/AutoRest/AutoRest.json | 3 + ...Generator.AzureResourceSchema.Tests.csproj | 31 ++- .../AzureResourceSchemaCodeGeneratorTests.cs | 155 +++++++++++++ .../AzureResourceSchema.Tests/packages.config | 1 + ...oRest.Generator.AzureResourceSchema.csproj | 50 +++- .../AzureResourceSchemaCodeGenerator.cs | 218 ++++++++++++++++++ .../Properties/AssemblyInfo.cs | 6 +- .../AzureResourceSchema/Resource.cs | 56 +++++ .../AzureResourceSchema/ResourceProperty.cs | 50 ++++ .../AzureResourceSchema/ResourceSchema.cs | 171 ++++++++++++++ .../AzureResourceSchema/packages.config | 4 + CodeGenerator.sln | 27 ++- 15 files changed, 771 insertions(+), 15 deletions(-) create mode 100644 AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AzureResourceSchemaCodeGeneratorTests.cs create mode 100644 AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/AzureResourceSchemaCodeGenerator.cs create mode 100644 AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/Resource.cs create mode 100644 AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceProperty.cs create mode 100644 AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchema.cs create mode 100644 AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/packages.config diff --git a/AutoRest.sln b/AutoRest.sln index b11b89d798ca5..e9e2ddf312323 100644 --- a/AutoRest.sln +++ b/AutoRest.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.24720.0 +VisualStudioVersion = 14.0.25123.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoRest.Core", "AutoRest\AutoRest.Core\AutoRest.Core.csproj", "{C876085F-9DC3-41F0-B7B4-17022CD84684}" EndProject @@ -372,6 +372,14 @@ Global {DA37E6A9-5D59-45A3-A809-ABA85031C369}.Portable-Debug|Any CPU.Build.0 = Portable-Debug|Any CPU {DA37E6A9-5D59-45A3-A809-ABA85031C369}.Portable-Release|Any CPU.ActiveCfg = Portable-Release|Any CPU {DA37E6A9-5D59-45A3-A809-ABA85031C369}.Portable-Release|Any CPU.Build.0 = Portable-Release|Any CPU + {654344A5-0556-49C7-BFB3-59676D7440D3}.Net45-Debug|Any CPU.ActiveCfg = Net45-Debug|Any CPU + {654344A5-0556-49C7-BFB3-59676D7440D3}.Net45-Debug|Any CPU.Build.0 = Net45-Debug|Any CPU + {654344A5-0556-49C7-BFB3-59676D7440D3}.Net45-Release|Any CPU.ActiveCfg = Net45-Release|Any CPU + {654344A5-0556-49C7-BFB3-59676D7440D3}.Net45-Release|Any CPU.Build.0 = Net45-Release|Any CPU + {654344A5-0556-49C7-BFB3-59676D7440D3}.Portable-Debug|Any CPU.ActiveCfg = Portable-Debug|Any CPU + {654344A5-0556-49C7-BFB3-59676D7440D3}.Portable-Debug|Any CPU.Build.0 = Portable-Debug|Any CPU + {654344A5-0556-49C7-BFB3-59676D7440D3}.Portable-Release|Any CPU.ActiveCfg = Portable-Release|Any CPU + {654344A5-0556-49C7-BFB3-59676D7440D3}.Portable-Release|Any CPU.Build.0 = Portable-Release|Any CPU {654344A5-0556-49C7-BFB3-59676D7440D3}.Net45-Debug|Any CPU.ActiveCfg = Debug|Any CPU {654344A5-0556-49C7-BFB3-59676D7440D3}.Net45-Debug|Any CPU.Build.0 = Debug|Any CPU {654344A5-0556-49C7-BFB3-59676D7440D3}.Net45-Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/AutoRest/AutoRest.Core/AutoRest.nuspec b/AutoRest/AutoRest.Core/AutoRest.nuspec index 0451285cb520a..2af544a885822 100644 --- a/AutoRest/AutoRest.Core/AutoRest.nuspec +++ b/AutoRest/AutoRest.Core/AutoRest.nuspec @@ -31,6 +31,7 @@ + diff --git a/AutoRest/AutoRest/AutoRest.Release.json b/AutoRest/AutoRest/AutoRest.Release.json index b488b12ca1fc8..f368702db7a63 100644 --- a/AutoRest/AutoRest/AutoRest.Release.json +++ b/AutoRest/AutoRest/AutoRest.Release.json @@ -29,6 +29,9 @@ }, "Azure.Python": { "type": "AzurePythonCodeGenerator, AutoRest.Generator.Azure.Python" + }, + "AzureResourceSchema": { + "type": "AzureResourceSchemaCodeGenerator, AutoRest.Generator.AzureResourceSchema" } }, "modelers": { diff --git a/AutoRest/AutoRest/AutoRest.json b/AutoRest/AutoRest/AutoRest.json index b488b12ca1fc8..f368702db7a63 100644 --- a/AutoRest/AutoRest/AutoRest.json +++ b/AutoRest/AutoRest/AutoRest.json @@ -29,6 +29,9 @@ }, "Azure.Python": { "type": "AzurePythonCodeGenerator, AutoRest.Generator.Azure.Python" + }, + "AzureResourceSchema": { + "type": "AzureResourceSchemaCodeGenerator, AutoRest.Generator.AzureResourceSchema" } }, "modelers": { diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AutoRest.Generator.AzureResourceSchema.Tests.csproj b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AutoRest.Generator.AzureResourceSchema.Tests.csproj index 01522ea89f2b4..be1ade26d44d8 100644 --- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AutoRest.Generator.AzureResourceSchema.Tests.csproj +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AutoRest.Generator.AzureResourceSchema.Tests.csproj @@ -1,6 +1,7 @@  - - + + + Debug @@ -8,6 +9,7 @@ {1C3B4A33-E045-4C8F-9202-1B651A686567} Library Properties + Microsoft.Rest.Generator.AzureResourceSchema.Tests AutoRest.Generator.AzureResourceSchema.Tests AutoRest.Generator.AzureResourceSchema.Tests v4.5.2 @@ -33,6 +35,10 @@ 4 + + ..\..\..\..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll + True + @@ -42,25 +48,32 @@ - ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + ..\..\..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll True - ..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll + ..\..\..\..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll True - ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll + ..\..\..\..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll True - ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + ..\..\..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll True + + + + {c876085f-9dc3-41f0-b7b4-17022cd84684} + AutoRest.Core + + PreserveNewest @@ -72,12 +85,16 @@ AutoRest.Generator.AzureResourceSchema + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + +