diff --git a/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache b/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache
index f3f1caeaf0a..2f20508f336 100644
--- a/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache
+++ b/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache
@@ -51,8 +51,8 @@ namespace {{packageName}}.Test
[Test]
public void {{operationId}}InstanceTest()
{
- // test 'IsInstanceOfType' {{classname}}
- Assert.IsInstanceOfType(typeof({{classname}}), instance, "instance is a {{classname}}");
+ // TODO uncomment below to test 'IsInstanceOfType' {{classname}}
+ //Assert.IsInstanceOfType(typeof({{classname}}), instance, "instance is a {{classname}}");
}
{{#operations}}{{#operation}}
diff --git a/modules/swagger-codegen/src/main/resources/csharp/packages_test.config.mustache b/modules/swagger-codegen/src/main/resources/csharp/packages_test.config.mustache
index 95192a480bf..7e6f4575391 100644
--- a/modules/swagger-codegen/src/main/resources/csharp/packages_test.config.mustache
+++ b/modules/swagger-codegen/src/main/resources/csharp/packages_test.config.mustache
@@ -1,6 +1,6 @@
-
+
diff --git a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln
index c10f905241c..0456bee0d8b 100644
--- a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln
+++ b/samples/client/petstore/csharp/SwaggerClient/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", "{4744D957-AA0D-4BF3-A0B6-60A13E6749BB}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{ACE32FB1-CE7D-4A06-B9D3-1955C51516CA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
@@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
-{4744D957-AA0D-4BF3-A0B6-60A13E6749BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-{4744D957-AA0D-4BF3-A0B6-60A13E6749BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
-{4744D957-AA0D-4BF3-A0B6-60A13E6749BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
-{4744D957-AA0D-4BF3-A0B6-60A13E6749BB}.Release|Any CPU.Build.0 = Release|Any CPU
+{ACE32FB1-CE7D-4A06-B9D3-1955C51516CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+{ACE32FB1-CE7D-4A06-B9D3-1955C51516CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+{ACE32FB1-CE7D-4A06-B9D3-1955C51516CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+{ACE32FB1-CE7D-4A06-B9D3-1955C51516CA}.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
diff --git a/samples/client/petstore/csharp/SwaggerClient/README.md b/samples/client/petstore/csharp/SwaggerClient/README.md
index db0560b134f..87ac879ca46 100644
--- a/samples/client/petstore/csharp/SwaggerClient/README.md
+++ b/samples/client/petstore/csharp/SwaggerClient/README.md
@@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c
- API version: 1.0.0
- SDK version: 1.0.0
-- Build date: 2016-07-13T19:06:48.432+08:00
+- Build date: 2016-07-21T17:39:01.768+08:00
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
## Frameworks supported
diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/packages.config b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/packages.config
index 317248179b6..9bb00f0fc4f 100644
--- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/packages.config
+++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/packages.config
@@ -1,6 +1,6 @@
-
+
diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs
index 60a2adac79a..fcefd40a36c 100644
--- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs
+++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs
@@ -179,9 +179,36 @@ namespace IO.Swagger.Client
///
public void AddDefaultHeader(string key, string value)
{
+ if (_defaultHeaderMap.ContainsKey(key))
+ _defaultHeaderMap.Remove(key);
_defaultHeaderMap.Add(key, value);
}
+ ///
+ /// Add Api Key Header.
+ ///
+ /// Api Key name.
+ /// Api Key value.
+ ///
+ public void AddApiKey(string key, string value)
+ {
+ if (ApiKey.ContainsKey(key))
+ ApiKey.Remove(key);
+ ApiKey.Add(key, value);
+ }
+
+ ///
+ /// Sets the API key prefix.
+ ///
+ /// Api Key name.
+ /// Api Key value.
+ public void AddApiKeyPrefix(string key, string value)
+ {
+ if (ApiKeyPrefix.ContainsKey(key))
+ ApiKeyPrefix.Remove(key);
+ ApiKeyPrefix.Add(key, value);
+ }
+
///
/// Gets or sets the HTTP user agent.
///
diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj
index e03d788d32d..d46a58703fd 100644
--- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj
+++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj
@@ -24,7 +24,7 @@ limitations under the License.
Debug
AnyCPU
- {4744D957-AA0D-4BF3-A0B6-60A13E6749BB}
+ {ACE32FB1-CE7D-4A06-B9D3-1955C51516CA}
Library
Properties
Swagger Library