From 60eb2994caa7b827c48920a99e0ec8b608c25048 Mon Sep 17 00:00:00 2001 From: simo9000 Date: Sat, 22 Oct 2016 18:23:11 -0700 Subject: [PATCH 1/5] Added switch to config to toggle use of yaml base path as module paths --- samples/server/petstore/nancyfx/IO.Swagger.sln | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/samples/server/petstore/nancyfx/IO.Swagger.sln b/samples/server/petstore/nancyfx/IO.Swagger.sln index e6fd22af6f6..278e2516048 100644 --- a/samples/server/petstore/nancyfx/IO.Swagger.sln +++ b/samples/server/petstore/nancyfx/IO.Swagger.sln @@ -10,21 +10,10 @@ Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution -<<<<<<< HEAD {7D50D142-14E1-4E99-842B-18D3AF159948}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7D50D142-14E1-4E99-842B-18D3AF159948}.Debug|Any CPU.Build.0 = Debug|Any CPU {7D50D142-14E1-4E99-842B-18D3AF159948}.Release|Any CPU.ActiveCfg = Release|Any CPU {7D50D142-14E1-4E99-842B-18D3AF159948}.Release|Any CPU.Build.0 = Release|Any CPU -======= -{1CE943E7-586D-4D9C-BE8B-3E005FDC39D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{1CE943E7-586D-4D9C-BE8B-3E005FDC39D1}.Debug|Any CPU.Build.0 = Debug|Any CPU -{1CE943E7-586D-4D9C-BE8B-3E005FDC39D1}.Release|Any CPU.ActiveCfg = Release|Any CPU -{1CE943E7-586D-4D9C-BE8B-3E005FDC39D1}.Release|Any CPU.Build.0 = Release|Any CPU ->>>>>>> 92c474b2c235f4635e4be43a97c7941fec64dc82 -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From f6dc3ec46560e4db1575d0b7e02cb7a572c296d2 Mon Sep 17 00:00:00 2001 From: simo9000 Date: Mon, 24 Oct 2016 13:41:59 -0700 Subject: [PATCH 2/5] NancyFX template updated to return collections as array to allow framework to find views by type name for text/html mime type --- .../src/main/resources/nancyfx/api.mustache | 2 +- samples/server/petstore/nancyfx/IO.Swagger.sln | 12 ++++++------ .../nancyfx/src/IO.Swagger/IO.Swagger.csproj | 3 ++- .../nancyfx/src/IO.Swagger/Modules/PetModule.cs | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/nancyfx/api.mustache b/modules/swagger-codegen/src/main/resources/nancyfx/api.mustache index 1e66c83c769..b4213ff2056 100644 --- a/modules/swagger-codegen/src/main/resources/nancyfx/api.mustache +++ b/modules/swagger-codegen/src/main/resources/nancyfx/api.mustache @@ -30,7 +30,7 @@ namespace {{packageName}}.{{packageContext}}.Modules {{/hasMore}}{{/isBodyParam}}{{/allParams}}{{#allParams}}{{#required}} Preconditions.IsNotNull({{paramName}}, "Required parameter: '{{paramName}}' is missing at '{{operationId}}'"); {{/required}}{{/allParams}} - {{#returnType}}return {{/returnType}}service.{{operationId}}(Context{{#allParams.0}}, {{/allParams.0}}{{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{^returnType}} + {{#returnType}}return {{/returnType}}service.{{operationId}}(Context{{#allParams.0}}, {{/allParams.0}}{{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{#returnType}}{{#isListContainer}}.ToArray(){{/isListContainer}}{{/returnType}};{{^returnType}} return new Response { ContentType = "{{produces.0.mediaType}}"};{{/returnType}} }; {{/operation}} diff --git a/samples/server/petstore/nancyfx/IO.Swagger.sln b/samples/server/petstore/nancyfx/IO.Swagger.sln index 278e2516048..b87d32e0f12 100644 --- a/samples/server/petstore/nancyfx/IO.Swagger.sln +++ b/samples/server/petstore/nancyfx/IO.Swagger.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{7D50D142-14E1-4E99-842B-18D3AF159948}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{64DF1C62-F2E9-4C49-8AC9-CDE4251D7945}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -10,12 +10,12 @@ Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution -{7D50D142-14E1-4E99-842B-18D3AF159948}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{7D50D142-14E1-4E99-842B-18D3AF159948}.Debug|Any CPU.Build.0 = Debug|Any CPU -{7D50D142-14E1-4E99-842B-18D3AF159948}.Release|Any CPU.ActiveCfg = Release|Any CPU -{7D50D142-14E1-4E99-842B-18D3AF159948}.Release|Any CPU.Build.0 = Release|Any CPU +{64DF1C62-F2E9-4C49-8AC9-CDE4251D7945}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{64DF1C62-F2E9-4C49-8AC9-CDE4251D7945}.Debug|Any CPU.Build.0 = Debug|Any CPU +{64DF1C62-F2E9-4C49-8AC9-CDE4251D7945}.Release|Any CPU.ActiveCfg = Release|Any CPU +{64DF1C62-F2E9-4C49-8AC9-CDE4251D7945}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection -EndGlobal +EndGlobal \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj b/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj index 60535f7aae6..e0d9802d6ed 100644 --- a/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj +++ b/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj @@ -3,7 +3,7 @@ Debug AnyCPU - {7D50D142-14E1-4E99-842B-18D3AF159948} + {64DF1C62-F2E9-4C49-8AC9-CDE4251D7945} Library Properties IO.Swagger.v2 @@ -63,3 +63,4 @@ + diff --git a/samples/server/petstore/nancyfx/src/IO.Swagger/Modules/PetModule.cs b/samples/server/petstore/nancyfx/src/IO.Swagger/Modules/PetModule.cs index d6922531e24..edfa0ecac4a 100644 --- a/samples/server/petstore/nancyfx/src/IO.Swagger/Modules/PetModule.cs +++ b/samples/server/petstore/nancyfx/src/IO.Swagger/Modules/PetModule.cs @@ -55,7 +55,7 @@ public PetModule(PetService service) : base("/v2") var status = Parameters.ValueOf(parameters, Context.Request, "status", ParameterType.Query); Preconditions.IsNotNull(status, "Required parameter: 'status' is missing at 'FindPetsByStatus'"); - return service.FindPetsByStatus(Context, status); + return service.FindPetsByStatus(Context, status).ToArray(); }; Get["/pet/findByTags"] = parameters => @@ -63,7 +63,7 @@ public PetModule(PetService service) : base("/v2") var tags = Parameters.ValueOf>(parameters, Context.Request, "tags", ParameterType.Query); Preconditions.IsNotNull(tags, "Required parameter: 'tags' is missing at 'FindPetsByTags'"); - return service.FindPetsByTags(Context, tags); + return service.FindPetsByTags(Context, tags).ToArray(); }; Get["/pet/{petId}"] = parameters => From 773c5b5ea16f771e332eb36e2d571cd91668ff1a Mon Sep 17 00:00:00 2001 From: simo9000 Date: Wed, 26 Oct 2016 16:11:18 -0700 Subject: [PATCH 3/5] Added some more parser fixes for NancyFX --- .../src/main/resources/nancyfx/parameters.mustache | 12 ++++++------ samples/server/petstore/nancyfx/IO.Swagger.sln | 10 +++++----- .../nancyfx/src/IO.Swagger/IO.Swagger.csproj | 2 +- .../nancyfx/src/IO.Swagger/Utils/Parameters.cs | 12 ++++++------ 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/nancyfx/parameters.mustache b/modules/swagger-codegen/src/main/resources/nancyfx/parameters.mustache index e55a82416ec..f1766665dde 100644 --- a/modules/swagger-codegen/src/main/resources/nancyfx/parameters.mustache +++ b/modules/swagger-codegen/src/main/resources/nancyfx/parameters.mustache @@ -166,12 +166,12 @@ namespace {{packageName}}.{{packageContext}}.Utils parsers.Put(typeof(LocalTime), SafeParse(ParseLocalTime)); parsers.Put(typeof(LocalTime?), SafeParse(ParseLocalTime)); - parsers.Put(typeof(IEnumerable), value => value); - parsers.Put(typeof(ICollection), value => value); - parsers.Put(typeof(IList), value => value); - parsers.Put(typeof(List), value => value); - parsers.Put(typeof(ISet), value => value); - parsers.Put(typeof(HashSet), value => value); + parsers.Put(typeof(IEnumerable), ImmutableListParse(value => value)); + parsers.Put(typeof(ICollection), ImmutableListParse(value => value)); + parsers.Put(typeof(IList), ImmutableListParse(value => value)); + parsers.Put(typeof(List), ListParse(value => value)); + parsers.Put(typeof(ISet), ImmutableListParse(value => value)); + parsers.Put(typeof(HashSet), SetParse(value => value)); parsers.Put(typeof(IEnumerable), ImmutableListParse(bool.Parse)); parsers.Put(typeof(ICollection), ImmutableListParse(bool.Parse)); diff --git a/samples/server/petstore/nancyfx/IO.Swagger.sln b/samples/server/petstore/nancyfx/IO.Swagger.sln index b87d32e0f12..c978252fae3 100644 --- a/samples/server/petstore/nancyfx/IO.Swagger.sln +++ b/samples/server/petstore/nancyfx/IO.Swagger.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{64DF1C62-F2E9-4C49-8AC9-CDE4251D7945}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{3075D5B1-BA49-4325-8A5B-DAD6BA95C964}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -10,10 +10,10 @@ Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution -{64DF1C62-F2E9-4C49-8AC9-CDE4251D7945}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{64DF1C62-F2E9-4C49-8AC9-CDE4251D7945}.Debug|Any CPU.Build.0 = Debug|Any CPU -{64DF1C62-F2E9-4C49-8AC9-CDE4251D7945}.Release|Any CPU.ActiveCfg = Release|Any CPU -{64DF1C62-F2E9-4C49-8AC9-CDE4251D7945}.Release|Any CPU.Build.0 = Release|Any CPU +{3075D5B1-BA49-4325-8A5B-DAD6BA95C964}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{3075D5B1-BA49-4325-8A5B-DAD6BA95C964}.Debug|Any CPU.Build.0 = Debug|Any CPU +{3075D5B1-BA49-4325-8A5B-DAD6BA95C964}.Release|Any CPU.ActiveCfg = Release|Any CPU +{3075D5B1-BA49-4325-8A5B-DAD6BA95C964}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj b/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj index e0d9802d6ed..04562d9a41a 100644 --- a/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj +++ b/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj @@ -3,7 +3,7 @@ Debug AnyCPU - {64DF1C62-F2E9-4C49-8AC9-CDE4251D7945} + {3075D5B1-BA49-4325-8A5B-DAD6BA95C964} Library Properties IO.Swagger.v2 diff --git a/samples/server/petstore/nancyfx/src/IO.Swagger/Utils/Parameters.cs b/samples/server/petstore/nancyfx/src/IO.Swagger/Utils/Parameters.cs index 7f0e848f98a..48936a7650d 100644 --- a/samples/server/petstore/nancyfx/src/IO.Swagger/Utils/Parameters.cs +++ b/samples/server/petstore/nancyfx/src/IO.Swagger/Utils/Parameters.cs @@ -166,12 +166,12 @@ private static IDictionary> CreateParsers() parsers.Put(typeof(LocalTime), SafeParse(ParseLocalTime)); parsers.Put(typeof(LocalTime?), SafeParse(ParseLocalTime)); - parsers.Put(typeof(IEnumerable), value => value); - parsers.Put(typeof(ICollection), value => value); - parsers.Put(typeof(IList), value => value); - parsers.Put(typeof(List), value => value); - parsers.Put(typeof(ISet), value => value); - parsers.Put(typeof(HashSet), value => value); + parsers.Put(typeof(IEnumerable), ImmutableListParse(value => value)); + parsers.Put(typeof(ICollection), ImmutableListParse(value => value)); + parsers.Put(typeof(IList), ImmutableListParse(value => value)); + parsers.Put(typeof(List), ListParse(value => value)); + parsers.Put(typeof(ISet), ImmutableListParse(value => value)); + parsers.Put(typeof(HashSet), SetParse(value => value)); parsers.Put(typeof(IEnumerable), ImmutableListParse(bool.Parse)); parsers.Put(typeof(ICollection), ImmutableListParse(bool.Parse)); From 70f11bac9a216321796c5e70db1da066b8dc59ec Mon Sep 17 00:00:00 2001 From: simo9000 Date: Thu, 27 Oct 2016 14:08:46 -0700 Subject: [PATCH 4/5] Refactored collection parsers in Parameters.cs and changed some to return nullable collections to match the parameter mappings in AbstractCSharpCodegen --- .../resources/nancyfx/parameters.mustache | 169 ++++++++++-------- .../server/petstore/nancyfx/IO.Swagger.sln | 25 +-- .../nancyfx/src/IO.Swagger/IO.Swagger.csproj | 2 +- .../src/IO.Swagger/Utils/Parameters.cs | 169 ++++++++++-------- 4 files changed, 212 insertions(+), 153 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/nancyfx/parameters.mustache b/modules/swagger-codegen/src/main/resources/nancyfx/parameters.mustache index f1766665dde..75486f59f46 100644 --- a/modules/swagger-codegen/src/main/resources/nancyfx/parameters.mustache +++ b/modules/swagger-codegen/src/main/resources/nancyfx/parameters.mustache @@ -173,12 +173,12 @@ namespace {{packageName}}.{{packageContext}}.Utils parsers.Put(typeof(ISet), ImmutableListParse(value => value)); parsers.Put(typeof(HashSet), SetParse(value => value)); - parsers.Put(typeof(IEnumerable), ImmutableListParse(bool.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(bool.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(bool.Parse)); - parsers.Put(typeof(List), ListParse(bool.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(bool.Parse)); - parsers.Put(typeof(HashSet), SetParse(bool.Parse)); + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(List), NullableListParse(bool.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(bool.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(bool.Parse)); parsers.Put(typeof(IEnumerable), ImmutableListParse(byte.Parse)); parsers.Put(typeof(ICollection), ImmutableListParse(byte.Parse)); @@ -186,6 +186,7 @@ namespace {{packageName}}.{{packageContext}}.Utils parsers.Put(typeof(List), ListParse(byte.Parse)); parsers.Put(typeof(ISet), ImmutableSetParse(byte.Parse)); parsers.Put(typeof(HashSet), SetParse(byte.Parse)); + parsers.Put(typeof(IEnumerable), ImmutableListParse(sbyte.Parse)); parsers.Put(typeof(ICollection), ImmutableListParse(sbyte.Parse)); parsers.Put(typeof(IList), ImmutableListParse(sbyte.Parse)); @@ -199,6 +200,7 @@ namespace {{packageName}}.{{packageContext}}.Utils parsers.Put(typeof(List), ListParse(short.Parse)); parsers.Put(typeof(ISet), ImmutableSetParse(short.Parse)); parsers.Put(typeof(HashSet), SetParse(short.Parse)); + parsers.Put(typeof(IEnumerable), ImmutableListParse(ushort.Parse)); parsers.Put(typeof(ICollection), ImmutableListParse(ushort.Parse)); parsers.Put(typeof(IList), ImmutableListParse(ushort.Parse)); @@ -206,12 +208,13 @@ namespace {{packageName}}.{{packageContext}}.Utils parsers.Put(typeof(ISet), ImmutableSetParse(ushort.Parse)); parsers.Put(typeof(HashSet), SetParse(ushort.Parse)); - parsers.Put(typeof(IEnumerable), ImmutableListParse(int.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(int.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(int.Parse)); - parsers.Put(typeof(List), ListParse(int.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(int.Parse)); - parsers.Put(typeof(HashSet), SetParse(int.Parse)); + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(List), NullableListParse(int.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(int.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(int.Parse)); + parsers.Put(typeof(IEnumerable), ImmutableListParse(uint.Parse)); parsers.Put(typeof(ICollection), ImmutableListParse(uint.Parse)); parsers.Put(typeof(IList), ImmutableListParse(uint.Parse)); @@ -219,12 +222,13 @@ namespace {{packageName}}.{{packageContext}}.Utils parsers.Put(typeof(ISet), ImmutableSetParse(uint.Parse)); parsers.Put(typeof(HashSet), SetParse(uint.Parse)); - parsers.Put(typeof(IEnumerable), ImmutableListParse(long.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(long.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(long.Parse)); - parsers.Put(typeof(List), ListParse(long.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(long.Parse)); - parsers.Put(typeof(HashSet), SetParse(long.Parse)); + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(List), NullableListParse(long.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(long.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(long.Parse)); + parsers.Put(typeof(IEnumerable), ImmutableListParse(ulong.Parse)); parsers.Put(typeof(ICollection), ImmutableListParse(ulong.Parse)); parsers.Put(typeof(IList), ImmutableListParse(ulong.Parse)); @@ -232,34 +236,33 @@ namespace {{packageName}}.{{packageContext}}.Utils parsers.Put(typeof(ISet), ImmutableSetParse(ulong.Parse)); parsers.Put(typeof(HashSet), SetParse(ulong.Parse)); - parsers.Put(typeof(IEnumerable), ImmutableListParse(float.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(float.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(float.Parse)); - parsers.Put(typeof(List), ListParse(float.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(float.Parse)); - parsers.Put(typeof(HashSet), SetParse(float.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(double.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(double.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(double.Parse)); - parsers.Put(typeof(List), ListParse(double.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(double.Parse)); - parsers.Put(typeof(HashSet), SetParse(double.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(decimal.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(decimal.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(decimal.Parse)); - parsers.Put(typeof(List), ListParse(decimal.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(decimal.Parse)); - parsers.Put(typeof(HashSet), SetParse(decimal.Parse)); - - - parsers.Put(typeof(IEnumerable), ImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(List), ListParse(DateTime.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(DateTime.Parse)); - parsers.Put(typeof(HashSet), SetParse(DateTime.Parse)); + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(List), NullableListParse(float.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(float.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(float.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(List), NullableListParse(double.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(double.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(double.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(List), NullableListParse(decimal.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(decimal.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(decimal.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(List), NullableListParse(DateTime.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(DateTime.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(DateTime.Parse)); parsers.Put(typeof(IEnumerable), ImmutableListParse(TimeSpan.Parse)); parsers.Put(typeof(ICollection), ImmutableListParse(TimeSpan.Parse)); @@ -295,6 +298,11 @@ namespace {{packageName}}.{{packageContext}}.Utils }; } + private static Func NullableListParse(Func itemParser) where T: struct + { + return ListParse(it => it.ToNullable(itemParser)); + } + private static Func ListParse(Func itemParser) { return parameter => @@ -303,15 +311,15 @@ namespace {{packageName}}.{{packageContext}}.Utils { return new List(); } - var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None) - .Where(it => it != null) - .Select(it => it.Trim()) - .Select(itemParser) - .ToList(); - return results; + return ParseCollection(parameter.Value, itemParser).ToList(); }; } + private static Func NullableImmutableListParse(Func itemParser) where T: struct + { + return ImmutableListParse(it => it.ToNullable(itemParser)); + } + private static Func ImmutableListParse(Func itemParser) { return parameter => @@ -320,15 +328,15 @@ namespace {{packageName}}.{{packageContext}}.Utils { return Lists.EmptyList(); } - var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None) - .Where(it => it != null) - .Select(it => it.Trim()) - .Select(itemParser) - .ToImmutableList(); - return results; + return ParseCollection(parameter.Value, itemParser).ToImmutableList(); }; } + private static Func NullableSetParse(Func itemParser) where T: struct + { + return SetParse(it => it.ToNullable(itemParser)); + } + private static Func SetParse(Func itemParser) { return parameter => @@ -337,15 +345,15 @@ namespace {{packageName}}.{{packageContext}}.Utils { return new HashSet(); } - var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None) - .Where(it => it != null) - .Select(it => it.Trim()) - .Select(itemParser) - .ToSet(); - return results; + return ParseCollection(parameter.Value, itemParser).ToSet(); }; } + private static Func NullableImmutableSetParse(Func itemParser) where T: struct + { + return ImmutableSetParse(it => it.ToNullable(itemParser)); + } + private static Func ImmutableSetParse(Func itemParser) { return parameter => @@ -354,12 +362,7 @@ namespace {{packageName}}.{{packageContext}}.Utils { return Sets.EmptySet(); } - var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None) - .Where(it => it != null) - .Select(it => it.Trim()) - .Select(itemParser) - .ToImmutableHashSet(); - return results; + return ParseCollection(parameter.Value, itemParser).ToImmutableHashSet(); }; } @@ -386,6 +389,32 @@ namespace {{packageName}}.{{packageContext}}.Utils parameter.Name, parameter.Value, type)); } + private static IEnumerable ParseCollection(string value, Func itemParser) + { + var results = value.Split(new[] { ',' }, StringSplitOptions.None) + .Where(it => it != null) + .Select(it => it.Trim()) + .Select(itemParser); + return results; + } + + public static T? ToNullable(this string s, Func itemParser) where T : struct + { + T? result = new T?(); + try + { + if (!string.IsNullOrEmpty(s) && s.Trim().Length > 0) + { + result = itemParser(s); + } + } + catch (Exception e) + { + throw new InvalidOperationException(Strings.Format("Unable to parse value: '{0}' to nullable: '{1}'", s, typeof(T).ToString()), e); + } + return result; + } + private class Parameter { internal string Name { get; private set; } diff --git a/samples/server/petstore/nancyfx/IO.Swagger.sln b/samples/server/petstore/nancyfx/IO.Swagger.sln index c978252fae3..aa3a4d9aa11 100644 --- a/samples/server/petstore/nancyfx/IO.Swagger.sln +++ b/samples/server/petstore/nancyfx/IO.Swagger.sln @@ -1,21 +1,22 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -VisualStudioVersion = 12.0.0.0 -MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{3075D5B1-BA49-4325-8A5B-DAD6BA95C964}" +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{FA35C82B-4E1E-4C4E-BAF9-1F708CE75F10}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution -Debug|Any CPU = Debug|Any CPU -Release|Any CPU = Release|Any CPU + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution -{3075D5B1-BA49-4325-8A5B-DAD6BA95C964}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{3075D5B1-BA49-4325-8A5B-DAD6BA95C964}.Debug|Any CPU.Build.0 = Debug|Any CPU -{3075D5B1-BA49-4325-8A5B-DAD6BA95C964}.Release|Any CPU.ActiveCfg = Release|Any CPU -{3075D5B1-BA49-4325-8A5B-DAD6BA95C964}.Release|Any CPU.Build.0 = Release|Any CPU + {FA35C82B-4E1E-4C4E-BAF9-1F708CE75F10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA35C82B-4E1E-4C4E-BAF9-1F708CE75F10}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA35C82B-4E1E-4C4E-BAF9-1F708CE75F10}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA35C82B-4E1E-4C4E-BAF9-1F708CE75F10}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution -HideSolutionNode = FALSE + HideSolutionNode = FALSE EndGlobalSection -EndGlobal \ No newline at end of file +EndGlobal + diff --git a/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj b/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj index 04562d9a41a..84f00ce1ccc 100644 --- a/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj +++ b/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj @@ -3,7 +3,7 @@ Debug AnyCPU - {3075D5B1-BA49-4325-8A5B-DAD6BA95C964} + {FA35C82B-4E1E-4C4E-BAF9-1F708CE75F10} Library Properties IO.Swagger.v2 diff --git a/samples/server/petstore/nancyfx/src/IO.Swagger/Utils/Parameters.cs b/samples/server/petstore/nancyfx/src/IO.Swagger/Utils/Parameters.cs index 48936a7650d..6175758fd9a 100644 --- a/samples/server/petstore/nancyfx/src/IO.Swagger/Utils/Parameters.cs +++ b/samples/server/petstore/nancyfx/src/IO.Swagger/Utils/Parameters.cs @@ -173,12 +173,12 @@ private static IDictionary> CreateParsers() parsers.Put(typeof(ISet), ImmutableListParse(value => value)); parsers.Put(typeof(HashSet), SetParse(value => value)); - parsers.Put(typeof(IEnumerable), ImmutableListParse(bool.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(bool.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(bool.Parse)); - parsers.Put(typeof(List), ListParse(bool.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(bool.Parse)); - parsers.Put(typeof(HashSet), SetParse(bool.Parse)); + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(bool.Parse)); + parsers.Put(typeof(List), NullableListParse(bool.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(bool.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(bool.Parse)); parsers.Put(typeof(IEnumerable), ImmutableListParse(byte.Parse)); parsers.Put(typeof(ICollection), ImmutableListParse(byte.Parse)); @@ -186,6 +186,7 @@ private static IDictionary> CreateParsers() parsers.Put(typeof(List), ListParse(byte.Parse)); parsers.Put(typeof(ISet), ImmutableSetParse(byte.Parse)); parsers.Put(typeof(HashSet), SetParse(byte.Parse)); + parsers.Put(typeof(IEnumerable), ImmutableListParse(sbyte.Parse)); parsers.Put(typeof(ICollection), ImmutableListParse(sbyte.Parse)); parsers.Put(typeof(IList), ImmutableListParse(sbyte.Parse)); @@ -199,6 +200,7 @@ private static IDictionary> CreateParsers() parsers.Put(typeof(List), ListParse(short.Parse)); parsers.Put(typeof(ISet), ImmutableSetParse(short.Parse)); parsers.Put(typeof(HashSet), SetParse(short.Parse)); + parsers.Put(typeof(IEnumerable), ImmutableListParse(ushort.Parse)); parsers.Put(typeof(ICollection), ImmutableListParse(ushort.Parse)); parsers.Put(typeof(IList), ImmutableListParse(ushort.Parse)); @@ -206,12 +208,13 @@ private static IDictionary> CreateParsers() parsers.Put(typeof(ISet), ImmutableSetParse(ushort.Parse)); parsers.Put(typeof(HashSet), SetParse(ushort.Parse)); - parsers.Put(typeof(IEnumerable), ImmutableListParse(int.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(int.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(int.Parse)); - parsers.Put(typeof(List), ListParse(int.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(int.Parse)); - parsers.Put(typeof(HashSet), SetParse(int.Parse)); + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(int.Parse)); + parsers.Put(typeof(List), NullableListParse(int.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(int.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(int.Parse)); + parsers.Put(typeof(IEnumerable), ImmutableListParse(uint.Parse)); parsers.Put(typeof(ICollection), ImmutableListParse(uint.Parse)); parsers.Put(typeof(IList), ImmutableListParse(uint.Parse)); @@ -219,12 +222,13 @@ private static IDictionary> CreateParsers() parsers.Put(typeof(ISet), ImmutableSetParse(uint.Parse)); parsers.Put(typeof(HashSet), SetParse(uint.Parse)); - parsers.Put(typeof(IEnumerable), ImmutableListParse(long.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(long.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(long.Parse)); - parsers.Put(typeof(List), ListParse(long.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(long.Parse)); - parsers.Put(typeof(HashSet), SetParse(long.Parse)); + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(long.Parse)); + parsers.Put(typeof(List), NullableListParse(long.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(long.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(long.Parse)); + parsers.Put(typeof(IEnumerable), ImmutableListParse(ulong.Parse)); parsers.Put(typeof(ICollection), ImmutableListParse(ulong.Parse)); parsers.Put(typeof(IList), ImmutableListParse(ulong.Parse)); @@ -232,34 +236,33 @@ private static IDictionary> CreateParsers() parsers.Put(typeof(ISet), ImmutableSetParse(ulong.Parse)); parsers.Put(typeof(HashSet), SetParse(ulong.Parse)); - parsers.Put(typeof(IEnumerable), ImmutableListParse(float.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(float.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(float.Parse)); - parsers.Put(typeof(List), ListParse(float.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(float.Parse)); - parsers.Put(typeof(HashSet), SetParse(float.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(double.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(double.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(double.Parse)); - parsers.Put(typeof(List), ListParse(double.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(double.Parse)); - parsers.Put(typeof(HashSet), SetParse(double.Parse)); - - parsers.Put(typeof(IEnumerable), ImmutableListParse(decimal.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(decimal.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(decimal.Parse)); - parsers.Put(typeof(List), ListParse(decimal.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(decimal.Parse)); - parsers.Put(typeof(HashSet), SetParse(decimal.Parse)); - - - parsers.Put(typeof(IEnumerable), ImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(ICollection), ImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(IList), ImmutableListParse(DateTime.Parse)); - parsers.Put(typeof(List), ListParse(DateTime.Parse)); - parsers.Put(typeof(ISet), ImmutableSetParse(DateTime.Parse)); - parsers.Put(typeof(HashSet), SetParse(DateTime.Parse)); + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(float.Parse)); + parsers.Put(typeof(List), NullableListParse(float.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(float.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(float.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(double.Parse)); + parsers.Put(typeof(List), NullableListParse(double.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(double.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(double.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(decimal.Parse)); + parsers.Put(typeof(List), NullableListParse(decimal.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(decimal.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(decimal.Parse)); + + parsers.Put(typeof(IEnumerable), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(ICollection), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(IList), NullableImmutableListParse(DateTime.Parse)); + parsers.Put(typeof(List), NullableListParse(DateTime.Parse)); + parsers.Put(typeof(ISet), NullableImmutableSetParse(DateTime.Parse)); + parsers.Put(typeof(HashSet), NullableSetParse(DateTime.Parse)); parsers.Put(typeof(IEnumerable), ImmutableListParse(TimeSpan.Parse)); parsers.Put(typeof(ICollection), ImmutableListParse(TimeSpan.Parse)); @@ -295,6 +298,11 @@ private static Func SafeParse(Func parse) }; } + private static Func NullableListParse(Func itemParser) where T: struct + { + return ListParse(it => it.ToNullable(itemParser)); + } + private static Func ListParse(Func itemParser) { return parameter => @@ -303,15 +311,15 @@ private static Func ListParse(Func itemParser) { return new List(); } - var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None) - .Where(it => it != null) - .Select(it => it.Trim()) - .Select(itemParser) - .ToList(); - return results; + return ParseCollection(parameter.Value, itemParser).ToList(); }; } + private static Func NullableImmutableListParse(Func itemParser) where T: struct + { + return ImmutableListParse(it => it.ToNullable(itemParser)); + } + private static Func ImmutableListParse(Func itemParser) { return parameter => @@ -320,15 +328,15 @@ private static Func ImmutableListParse(Func ite { return Lists.EmptyList(); } - var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None) - .Where(it => it != null) - .Select(it => it.Trim()) - .Select(itemParser) - .ToImmutableList(); - return results; + return ParseCollection(parameter.Value, itemParser).ToImmutableList(); }; } + private static Func NullableSetParse(Func itemParser) where T: struct + { + return SetParse(it => it.ToNullable(itemParser)); + } + private static Func SetParse(Func itemParser) { return parameter => @@ -337,15 +345,15 @@ private static Func SetParse(Func itemParser) { return new HashSet(); } - var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None) - .Where(it => it != null) - .Select(it => it.Trim()) - .Select(itemParser) - .ToSet(); - return results; + return ParseCollection(parameter.Value, itemParser).ToSet(); }; } + private static Func NullableImmutableSetParse(Func itemParser) where T: struct + { + return ImmutableSetParse(it => it.ToNullable(itemParser)); + } + private static Func ImmutableSetParse(Func itemParser) { return parameter => @@ -354,12 +362,7 @@ private static Func ImmutableSetParse(Func item { return Sets.EmptySet(); } - var results = parameter.Value.Split(new[] { ',' }, StringSplitOptions.None) - .Where(it => it != null) - .Select(it => it.Trim()) - .Select(itemParser) - .ToImmutableHashSet(); - return results; + return ParseCollection(parameter.Value, itemParser).ToImmutableHashSet(); }; } @@ -386,6 +389,32 @@ private static ArgumentException InvalidParameterFormat(Parameter parameter, Typ parameter.Name, parameter.Value, type)); } + private static IEnumerable ParseCollection(string value, Func itemParser) + { + var results = value.Split(new[] { ',' }, StringSplitOptions.None) + .Where(it => it != null) + .Select(it => it.Trim()) + .Select(itemParser); + return results; + } + + public static T? ToNullable(this string s, Func itemParser) where T : struct + { + T? result = new T?(); + try + { + if (!string.IsNullOrEmpty(s) && s.Trim().Length > 0) + { + result = itemParser(s); + } + } + catch (Exception e) + { + throw new InvalidOperationException(Strings.Format("Unable to parse value: '{0}' to nullable: '{1}'", s, typeof(T).ToString()), e); + } + return result; + } + private class Parameter { internal string Name { get; private set; } From 3ba6b035687568fedf24846971ebd7db384f53a3 Mon Sep 17 00:00:00 2001 From: simo9000 Date: Tue, 1 Nov 2016 09:28:43 -0700 Subject: [PATCH 5/5] re-ran petstore build --- .../server/petstore/nancyfx/IO.Swagger.sln | 29 ++++++++++--------- .../nancyfx/src/IO.Swagger/IO.Swagger.csproj | 2 +- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/samples/server/petstore/nancyfx/IO.Swagger.sln b/samples/server/petstore/nancyfx/IO.Swagger.sln index aa3a4d9aa11..09301395de7 100644 --- a/samples/server/petstore/nancyfx/IO.Swagger.sln +++ b/samples/server/petstore/nancyfx/IO.Swagger.sln @@ -1,22 +1,25 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{FA35C82B-4E1E-4C4E-BAF9-1F708CE75F10}" +# Visual Studio 2012 +VisualStudioVersion = 12.0.0.0 +MinimumVisualStudioVersion = 10.0.0.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{3B55ED13-A471-44B1-A8D5-C158723C0A0C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU +Debug|Any CPU = Debug|Any CPU +Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FA35C82B-4E1E-4C4E-BAF9-1F708CE75F10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FA35C82B-4E1E-4C4E-BAF9-1F708CE75F10}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FA35C82B-4E1E-4C4E-BAF9-1F708CE75F10}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FA35C82B-4E1E-4C4E-BAF9-1F708CE75F10}.Release|Any CPU.Build.0 = Release|Any CPU +{3B55ED13-A471-44B1-A8D5-C158723C0A0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{3B55ED13-A471-44B1-A8D5-C158723C0A0C}.Debug|Any CPU.Build.0 = Debug|Any CPU +{3B55ED13-A471-44B1-A8D5-C158723C0A0C}.Release|Any CPU.ActiveCfg = Release|Any CPU +{3B55ED13-A471-44B1-A8D5-C158723C0A0C}.Release|Any CPU.Build.0 = Release|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE +HideSolutionNode = FALSE EndGlobalSection -EndGlobal - +EndGlobal \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj b/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj index 84f00ce1ccc..a103786b912 100644 --- a/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj +++ b/samples/server/petstore/nancyfx/src/IO.Swagger/IO.Swagger.csproj @@ -3,7 +3,7 @@ Debug AnyCPU - {FA35C82B-4E1E-4C4E-BAF9-1F708CE75F10} + {3B55ED13-A471-44B1-A8D5-C158723C0A0C} Library Properties IO.Swagger.v2