From 11bd9e8c7b0f758ede8615eb5d284344a93ab3c1 Mon Sep 17 00:00:00 2001 From: Rico Suter Date: Tue, 26 Apr 2016 17:42:27 +0200 Subject: [PATCH] Fixed FromUrl --- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- src/NSwag.Core/Properties/AssemblyInfo.cs | 2 +- src/NSwag.Core/SwaggerService.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- src/NSwag.Tests/Properties/AssemblyInfo.cs | 2 +- src/NSwag.Tests/Specification/GeneralTests.cs | 13 + src/NSwag/Properties/AssemblyInfo.cs | 2 +- src/NSwagStudio.Installer/Generated.wxs | 1164 ++++++++--------- src/NSwagStudio/Properties/AssemblyInfo.cs | 2 +- 11 files changed, 604 insertions(+), 591 deletions(-) diff --git a/src/NSwag.Annotations/Properties/AssemblyInfo.cs b/src/NSwag.Annotations/Properties/AssemblyInfo.cs index 6fdea5fb3a..ed9736f78a 100644 --- a/src/NSwag.Annotations/Properties/AssemblyInfo.cs +++ b/src/NSwag.Annotations/Properties/AssemblyInfo.cs @@ -5,4 +5,4 @@ [assembly: AssemblyCompany("Rico Suter")] [assembly: AssemblyProduct("NSwag.Annotations")] [assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")] -[assembly: AssemblyVersion("2.10.*")] +[assembly: AssemblyVersion("2.11.*")] diff --git a/src/NSwag.CodeGeneration.Tests/Properties/AssemblyInfo.cs b/src/NSwag.CodeGeneration.Tests/Properties/AssemblyInfo.cs index 311436f01d..98e839c9c7 100644 --- a/src/NSwag.CodeGeneration.Tests/Properties/AssemblyInfo.cs +++ b/src/NSwag.CodeGeneration.Tests/Properties/AssemblyInfo.cs @@ -31,6 +31,6 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("2.10.*")] +// [assembly: AssemblyVersion("2.11.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/NSwag.CodeGeneration/Properties/AssemblyInfo.cs b/src/NSwag.CodeGeneration/Properties/AssemblyInfo.cs index 0750dae9fe..22ab143854 100644 --- a/src/NSwag.CodeGeneration/Properties/AssemblyInfo.cs +++ b/src/NSwag.CodeGeneration/Properties/AssemblyInfo.cs @@ -5,4 +5,4 @@ [assembly: AssemblyCompany("Rico Suter")] [assembly: AssemblyProduct("NSwag.CodeGeneration")] [assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")] -[assembly: AssemblyVersion("2.10.*")] +[assembly: AssemblyVersion("2.11.*")] diff --git a/src/NSwag.Core/Properties/AssemblyInfo.cs b/src/NSwag.Core/Properties/AssemblyInfo.cs index 65e273a22b..9960b411df 100644 --- a/src/NSwag.Core/Properties/AssemblyInfo.cs +++ b/src/NSwag.Core/Properties/AssemblyInfo.cs @@ -5,4 +5,4 @@ [assembly: AssemblyCompany("Rico Suter")] [assembly: AssemblyProduct("NSwag")] [assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")] -[assembly: AssemblyVersion("2.10.*")] +[assembly: AssemblyVersion("2.11.*")] diff --git a/src/NSwag.Core/SwaggerService.cs b/src/NSwag.Core/SwaggerService.cs index 31d2d0a21d..65c18ccc98 100644 --- a/src/NSwag.Core/SwaggerService.cs +++ b/src/NSwag.Core/SwaggerService.cs @@ -169,7 +169,7 @@ public static SwaggerService FromJson(string data) /// The . public static SwaggerService FromUrl(string url) { - dynamic client = Activator.CreateInstance(Type.GetType("System.Net.WebClient", true)); + dynamic client = Activator.CreateInstance(Type.GetType("System.Net.WebClient, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", true)); using (client) { var data = client.DownloadString(url); diff --git a/src/NSwag.Demo.Client/Properties/AssemblyInfo.cs b/src/NSwag.Demo.Client/Properties/AssemblyInfo.cs index 33a69e21bd..9b71f08ada 100644 --- a/src/NSwag.Demo.Client/Properties/AssemblyInfo.cs +++ b/src/NSwag.Demo.Client/Properties/AssemblyInfo.cs @@ -50,6 +50,6 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("2.10.*")] +// [assembly: AssemblyVersion("2.11.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/NSwag.Tests/Properties/AssemblyInfo.cs b/src/NSwag.Tests/Properties/AssemblyInfo.cs index 4848f5df1a..810f5727f8 100644 --- a/src/NSwag.Tests/Properties/AssemblyInfo.cs +++ b/src/NSwag.Tests/Properties/AssemblyInfo.cs @@ -31,6 +31,6 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("2.10.*")] +// [assembly: AssemblyVersion("2.11.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/NSwag.Tests/Specification/GeneralTests.cs b/src/NSwag.Tests/Specification/GeneralTests.cs index 69358cef1b..b50b9ae066 100644 --- a/src/NSwag.Tests/Specification/GeneralTests.cs +++ b/src/NSwag.Tests/Specification/GeneralTests.cs @@ -6,6 +6,19 @@ namespace NSwag.Tests [TestClass] public class GeneralTests { + [TestMethod] + public void When_Swagger_is_loaded_from_url_then_it_works() + { + //// Arrange + + + //// Act + var swagger = SwaggerService.FromUrl("http://petstore.swagger.io/v2/swagger.json"); + + //// Assert + Assert.IsNotNull(swagger); + } + [TestMethod] public void WhenConvertingAndBackThenItShouldBeTheSame() { diff --git a/src/NSwag/Properties/AssemblyInfo.cs b/src/NSwag/Properties/AssemblyInfo.cs index 4acde87a2f..23ad78ff56 100644 --- a/src/NSwag/Properties/AssemblyInfo.cs +++ b/src/NSwag/Properties/AssemblyInfo.cs @@ -5,4 +5,4 @@ [assembly: AssemblyCompany("Rico Suter")] [assembly: AssemblyProduct("NSwag.Console")] [assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")] -[assembly: AssemblyVersion("2.10.*")] +[assembly: AssemblyVersion("2.11.*")] diff --git a/src/NSwagStudio.Installer/Generated.wxs b/src/NSwagStudio.Installer/Generated.wxs index 429b8137fb..771d8d75ed 100644 --- a/src/NSwagStudio.Installer/Generated.wxs +++ b/src/NSwagStudio.Installer/Generated.wxs @@ -691,140 +691,140 @@ - - - - - - - - + + - + - - - - + - + - + + + + + + + - + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -833,528 +833,528 @@ - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - + - - - - - - - - - - + - + - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + - - + + - - + + - + - - - - - - - + - - + + - + - - - - + - + + + + + + + + + + - - + + - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/NSwagStudio/Properties/AssemblyInfo.cs b/src/NSwagStudio/Properties/AssemblyInfo.cs index 20a2a1c20a..560ff65d8a 100644 --- a/src/NSwagStudio/Properties/AssemblyInfo.cs +++ b/src/NSwagStudio/Properties/AssemblyInfo.cs @@ -5,4 +5,4 @@ [assembly: AssemblyCompany("Rico Suter")] [assembly: AssemblyProduct("NSwagStudio")] [assembly: AssemblyCopyright("Copyright © Rico Suter, 2015")] -[assembly: AssemblyVersion("2.10.*")] +[assembly: AssemblyVersion("2.11.*")]