diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
index aaa49ea79f6..c5a186a6e0f 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
@@ -106,6 +106,7 @@ public class DefaultCodegen {
protected Boolean ensureUniqueParams = true;
protected String gitUserId, gitRepoId, releaseNote;
protected String httpUserAgent;
+ protected Boolean hideGenerationTimestamp = true;
// How to encode special characters like $
// They are translated to words like "Dollar" and prefixed with '
// Then translated back during JSON encoding and decoding
diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java
index 5dce9aff641..bc61b839009 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java
@@ -96,6 +96,10 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
cliOptions.add(framework);
// CLI Switches
+ addSwitch(CodegenConstants.HIDE_GENERATION_TIMESTAMP,
+ CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC,
+ this.hideGenerationTimestamp);
+
addSwitch(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG,
CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC,
this.sortParamsByRequiredFlag);
@@ -134,8 +138,16 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
@Override
public void processOpts() {
super.processOpts();
- Boolean excludeTests = false;
+ // default HIDE_GENERATION_TIMESTAMP to true
+ if (!additionalProperties.containsKey(CodegenConstants.HIDE_GENERATION_TIMESTAMP)) {
+ additionalProperties.put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, Boolean.TRUE.toString());
+ } else {
+ additionalProperties.put(CodegenConstants.HIDE_GENERATION_TIMESTAMP,
+ Boolean.valueOf((String)additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP).toString()));
+ }
+
+ Boolean excludeTests = false;
if(additionalProperties.containsKey(CodegenConstants.EXCLUDE_TESTS)) {
excludeTests = Boolean.valueOf(additionalProperties.get(CodegenConstants.EXCLUDE_TESTS).toString());
}
diff --git a/modules/swagger-codegen/src/main/resources/csharp/README.mustache b/modules/swagger-codegen/src/main/resources/csharp/README.mustache
index a72bb17f89b..7c8a3df52df 100644
--- a/modules/swagger-codegen/src/main/resources/csharp/README.mustache
+++ b/modules/swagger-codegen/src/main/resources/csharp/README.mustache
@@ -8,7 +8,9 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c
- API version: {{appVersion}}
- SDK version: {{packageVersion}}
+{{^hideGenerationTimestamp}}
- Build date: {{generatedDate}}
+{{/hideGenerationTimestamp}}
- Build package: {{generatorClass}}
{{#infoUrl}}
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
diff --git a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/CSharpClientOptionsProvider.java b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/CSharpClientOptionsProvider.java
index 5f43f5cf155..28d9e0d4b20 100644
--- a/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/CSharpClientOptionsProvider.java
+++ b/modules/swagger-codegen/src/test/java/io/swagger/codegen/options/CSharpClientOptionsProvider.java
@@ -33,6 +33,7 @@ public class CSharpClientOptionsProvider implements OptionsProvider {
.put(CodegenConstants.OPTIONAL_PROJECT_GUID, PACKAGE_GUID_VALUE)
.put(CodegenConstants.DOTNET_FRAMEWORK, "4.x")
.put(CodegenConstants.OPTIONAL_EMIT_DEFAULT_VALUES, "true")
+ .put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "true")
.build();
}
diff --git a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln
index 9dc6bc62fa2..5a4fa34db71 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", "{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{497E0E11-BFD7-4CB3-BA32-A19285FBB551}"
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
-{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}.Debug|Any CPU.Build.0 = Debug|Any CPU
-{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}.Release|Any CPU.ActiveCfg = Release|Any CPU
-{F616AC0A-13D9-4D7E-ACE1-93E41B628F88}.Release|Any CPU.Build.0 = Release|Any CPU
+{497E0E11-BFD7-4CB3-BA32-A19285FBB551}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+{497E0E11-BFD7-4CB3-BA32-A19285FBB551}.Debug|Any CPU.Build.0 = Debug|Any CPU
+{497E0E11-BFD7-4CB3-BA32-A19285FBB551}.Release|Any CPU.ActiveCfg = Release|Any CPU
+{497E0E11-BFD7-4CB3-BA32-A19285FBB551}.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 94f420f1cba..24181432ff2 100644
--- a/samples/client/petstore/csharp/SwaggerClient/README.md
+++ b/samples/client/petstore/csharp/SwaggerClient/README.md
@@ -6,7 +6,6 @@ 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-31T22:04:18.446+08:00
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
## Frameworks supported
@@ -80,7 +79,7 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
-*FakeApi* | [**TestEnumQueryParameters**](docs/FakeApi.md#testenumqueryparameters) | **GET** /fake | To test enum query parameters
+*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
@@ -116,6 +115,7 @@ Class | Method | HTTP request | Description
- [Model.Cat](docs/Cat.md)
- [Model.Category](docs/Category.md)
- [Model.Dog](docs/Dog.md)
+ - [Model.EnumArrays](docs/EnumArrays.md)
- [Model.EnumClass](docs/EnumClass.md)
- [Model.EnumTest](docs/EnumTest.md)
- [Model.FormatTest](docs/FormatTest.md)
@@ -144,6 +144,10 @@ Class | Method | HTTP request | Description
- **API key parameter name**: api_key
- **Location**: HTTP header
+### http_basic_test
+
+- **Type**: HTTP basic authentication
+
### petstore_auth
- **Type**: OAuth
diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md
index 8ad352e0537..106daec81bf 100644
--- a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md
+++ b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md
@@ -6,7 +6,7 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
-[**TestEnumQueryParameters**](FakeApi.md#testenumqueryparameters) | **GET** /fake | To test enum query parameters
+[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
@@ -71,7 +71,7 @@ No authorization required
# **TestEndpointParameters**
-> void TestEndpointParameters (decimal? number, double? _double, string _string, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null)
+> void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null)
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@@ -92,15 +92,20 @@ namespace Example
public void main()
{
+ // Configure HTTP basic authorization: http_basic_test
+ Configuration.Default.Username = "YOUR_USERNAME";
+ Configuration.Default.Password = "YOUR_PASSWORD";
+
var apiInstance = new FakeApi();
var number = 3.4; // decimal? | None
var _double = 1.2; // double? | None
- var _string = _string_example; // string | None
+ var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None
var _byte = B; // byte[] | None
var integer = 56; // int? | None (optional)
var int32 = 56; // int? | None (optional)
var int64 = 789; // long? | None (optional)
var _float = 3.4; // float? | None (optional)
+ var _string = _string_example; // string | None (optional)
var binary = B; // byte[] | None (optional)
var date = 2013-10-20; // DateTime? | None (optional)
var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional)
@@ -109,7 +114,7 @@ namespace Example
try
{
// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
- apiInstance.TestEndpointParameters(number, _double, _string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
+ apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password);
}
catch (Exception e)
{
@@ -126,12 +131,13 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**number** | **decimal?**| None |
**_double** | **double?**| None |
- **_string** | **string**| None |
+ **patternWithoutDelimiter** | **string**| None |
**_byte** | **byte[]**| None |
**integer** | **int?**| None | [optional]
**int32** | **int?**| None | [optional]
**int64** | **long?**| None | [optional]
**_float** | **float?**| None | [optional]
+ **_string** | **string**| None | [optional]
**binary** | **byte[]**| None | [optional]
**date** | **DateTime?**| None | [optional]
**dateTime** | **DateTime?**| None | [optional]
@@ -143,7 +149,7 @@ void (empty response body)
### Authorization
-No authorization required
+[http_basic_test](../README.md#http_basic_test)
### HTTP request headers
@@ -152,11 +158,11 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **TestEnumQueryParameters**
-> void TestEnumQueryParameters (string enumQueryString = null, decimal? enumQueryInteger = null, double? enumQueryDouble = null)
+
+# **TestEnumParameters**
+> void TestEnumParameters (List enumFormStringArray = null, string enumFormString = null, List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, decimal? enumQueryInteger = null, double? enumQueryDouble = null)
-To test enum query parameters
+To test enum parameters
### Example
```csharp
@@ -168,24 +174,29 @@ using IO.Swagger.Model;
namespace Example
{
- public class TestEnumQueryParametersExample
+ public class TestEnumParametersExample
{
public void main()
{
var apiInstance = new FakeApi();
+ var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional)
+ var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg)
+ var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional)
+ var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg)
+ var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional)
var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg)
var enumQueryInteger = 3.4; // decimal? | Query parameter enum test (double) (optional)
var enumQueryDouble = 1.2; // double? | Query parameter enum test (double) (optional)
try
{
- // To test enum query parameters
- apiInstance.TestEnumQueryParameters(enumQueryString, enumQueryInteger, enumQueryDouble);
+ // To test enum parameters
+ apiInstance.TestEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
}
catch (Exception e)
{
- Debug.Print("Exception when calling FakeApi.TestEnumQueryParameters: " + e.Message );
+ Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message );
}
}
}
@@ -196,6 +207,11 @@ namespace Example
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
+ **enumFormStringArray** | [**List**](string.md)| Form parameter enum test (string array) | [optional]
+ **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg]
+ **enumHeaderStringArray** | [**List**](string.md)| Header parameter enum test (string array) | [optional]
+ **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg]
+ **enumQueryStringArray** | [**List**](string.md)| Query parameter enum test (string array) | [optional]
**enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
**enumQueryInteger** | **decimal?**| Query parameter enum test (double) | [optional]
**enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional]
diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs
index 0bf1cdf583c..f6d4c85a6ce 100644
--- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs
+++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs
@@ -66,18 +66,19 @@ namespace IO.Swagger.Api
/// Thrown when fails to make API call
/// None
/// None
- /// None
+ /// None
/// None
/// None (optional)
/// None (optional)
/// None (optional)
/// None (optional)
+ /// None (optional)
/// None (optional)
/// None (optional)
/// None (optional)
/// None (optional)
///
- void TestEndpointParameters (decimal? number, double? _double, string _string, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null);
+ void TestEndpointParameters (decimal? number, double? _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null);
///
/// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@@ -88,43 +89,54 @@ namespace IO.Swagger.Api
/// Thrown when fails to make API call
/// None
/// None
- /// None
+ /// None
/// None
/// None (optional)
/// None (optional)
/// None (optional)
/// None (optional)
+ /// None (optional)
/// None (optional)
/// None (optional)
/// None (optional)
/// None (optional)
/// ApiResponse of Object(void)
- ApiResponse