diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java index 10ccff345c13..e9259a4b3f44 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java @@ -484,7 +484,13 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co if (p instanceof StringProperty) { StringProperty dp = (StringProperty) p; if (dp.getDefault() != null) { - return "\"" + dp.getDefault() + "\""; + String _default = dp.getDefault(); + if (dp.getEnum() == null) { + return "\"" + _default + "\""; + } else { + // convert to enum var name later in postProcessModels + return _default; + } } } else if (p instanceof BooleanProperty) { BooleanProperty dp = (BooleanProperty) p; diff --git a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln index b7c1013e4346..04424e0729ff 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", "{959A8039-E3B9-4660-A666-840955E4520C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{4F6B73F4-427E-4C54-BB06-A106EBF09288}" 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 -{959A8039-E3B9-4660-A666-840955E4520C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{959A8039-E3B9-4660-A666-840955E4520C}.Debug|Any CPU.Build.0 = Debug|Any CPU -{959A8039-E3B9-4660-A666-840955E4520C}.Release|Any CPU.ActiveCfg = Release|Any CPU -{959A8039-E3B9-4660-A666-840955E4520C}.Release|Any CPU.Build.0 = Release|Any CPU +{4F6B73F4-427E-4C54-BB06-A106EBF09288}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{4F6B73F4-427E-4C54-BB06-A106EBF09288}.Debug|Any CPU.Build.0 = Debug|Any CPU +{4F6B73F4-427E-4C54-BB06-A106EBF09288}.Release|Any CPU.ActiveCfg = Release|Any CPU +{4F6B73F4-427E-4C54-BB06-A106EBF09288}.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 67a001aa0cfe..ab8b4d191393 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 package: class io.swagger.codegen.languages.CSharpClientCodegen +- Build package: io.swagger.codegen.languages.CSharpClientCodegen ## Frameworks supported @@ -38,6 +38,20 @@ using IO.Swagger.Api; using IO.Swagger.Client; using IO.Swagger.Model; ``` + + +## Packaging + +A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages. + +This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly: + +``` +nuget pack -Build -OutputDirectory out IO.Swagger.csproj +``` + +Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual. + ## Getting Started @@ -115,6 +129,7 @@ Class | Method | HTTP request | Description - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [Model.ArrayTest](docs/ArrayTest.md) + - [Model.Capitalization](docs/Capitalization.md) - [Model.Cat](docs/Cat.md) - [Model.Category](docs/Category.md) - [Model.ClassModel](docs/ClassModel.md) diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/Capitalization.md b/samples/client/petstore/csharp/SwaggerClient/docs/Capitalization.md new file mode 100644 index 000000000000..87d14f03e0d0 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/docs/Capitalization.md @@ -0,0 +1,14 @@ +# IO.Swagger.Model.Capitalization +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SmallCamel** | **string** | | [optional] +**CapitalCamel** | **string** | | [optional] +**SmallSnake** | **string** | | [optional] +**CapitalSnake** | **string** | | [optional] +**SCAETHFlowPoints** | **string** | | [optional] +**ATT_NAME** | **string** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md index de9d842ee061..44699db1dc2a 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md @@ -15,6 +15,8 @@ Method | HTTP request | Description To test \"client\" model +To test \"client\" model + ### Example ```csharp using System; @@ -166,6 +168,8 @@ void (empty response body) To test enum parameters +To test enum parameters + ### Example ```csharp using System; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/CapitalizationTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/CapitalizationTests.cs new file mode 100644 index 000000000000..30ed8700f748 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/CapitalizationTests.cs @@ -0,0 +1,118 @@ +/* + * Swagger Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using IO.Swagger.Api; +using IO.Swagger.Model; +using IO.Swagger.Client; +using System.Reflection; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing Capitalization + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CapitalizationTests + { + // TODO uncomment below to declare an instance variable for Capitalization + //private Capitalization instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of Capitalization + //instance = new Capitalization(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of Capitalization + /// + [Test] + public void CapitalizationInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" Capitalization + //Assert.IsInstanceOfType (instance, "variable 'instance' is a Capitalization"); + } + + /// + /// Test the property 'SmallCamel' + /// + [Test] + public void SmallCamelTest() + { + // TODO unit test for the property 'SmallCamel' + } + /// + /// Test the property 'CapitalCamel' + /// + [Test] + public void CapitalCamelTest() + { + // TODO unit test for the property 'CapitalCamel' + } + /// + /// Test the property 'SmallSnake' + /// + [Test] + public void SmallSnakeTest() + { + // TODO unit test for the property 'SmallSnake' + } + /// + /// Test the property 'CapitalSnake' + /// + [Test] + public void CapitalSnakeTest() + { + // TODO unit test for the property 'CapitalSnake' + } + /// + /// Test the property 'SCAETHFlowPoints' + /// + [Test] + public void SCAETHFlowPointsTest() + { + // TODO unit test for the property 'SCAETHFlowPoints' + } + /// + /// Test the property 'ATT_NAME' + /// + [Test] + public void ATT_NAMETest() + { + // TODO unit test for the property 'ATT_NAME' + } + + } + +} 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 52a26a00dbfa..502deb884fd0 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 @@ -28,7 +28,7 @@ namespace IO.Swagger.Api /// To test \"client\" model /// /// - /// + /// To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -39,7 +39,7 @@ namespace IO.Swagger.Api /// To test \"client\" model /// /// - /// + /// To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -96,7 +96,7 @@ namespace IO.Swagger.Api /// To test enum parameters /// /// - /// + /// To test enum parameters /// /// Thrown when fails to make API call /// Form parameter enum test (string array) (optional) @@ -114,7 +114,7 @@ namespace IO.Swagger.Api /// To test enum parameters /// /// - /// + /// To test enum parameters /// /// Thrown when fails to make API call /// Form parameter enum test (string array) (optional) @@ -133,7 +133,7 @@ namespace IO.Swagger.Api /// To test \"client\" model /// /// - /// + /// To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -144,7 +144,7 @@ namespace IO.Swagger.Api /// To test \"client\" model /// /// - /// + /// To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -201,7 +201,7 @@ namespace IO.Swagger.Api /// To test enum parameters /// /// - /// + /// To test enum parameters /// /// Thrown when fails to make API call /// Form parameter enum test (string array) (optional) @@ -219,7 +219,7 @@ namespace IO.Swagger.Api /// To test enum parameters /// /// - /// + /// To test enum parameters /// /// Thrown when fails to make API call /// Form parameter enum test (string array) (optional) @@ -345,7 +345,7 @@ namespace IO.Swagger.Api } /// - /// To test \"client\" model + /// To test \"client\" model To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -357,7 +357,7 @@ namespace IO.Swagger.Api } /// - /// To test \"client\" model + /// To test \"client\" model To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -423,7 +423,7 @@ namespace IO.Swagger.Api } /// - /// To test \"client\" model + /// To test \"client\" model To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -436,7 +436,7 @@ namespace IO.Swagger.Api } /// - /// To test \"client\" model + /// To test \"client\" model To test \"client\" model /// /// Thrown when fails to make API call /// client model @@ -756,7 +756,7 @@ namespace IO.Swagger.Api } /// - /// To test enum parameters + /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call /// Form parameter enum test (string array) (optional) @@ -774,7 +774,7 @@ namespace IO.Swagger.Api } /// - /// To test enum parameters + /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call /// Form parameter enum test (string array) (optional) @@ -844,7 +844,7 @@ namespace IO.Swagger.Api } /// - /// To test enum parameters + /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call /// Form parameter enum test (string array) (optional) @@ -863,7 +863,7 @@ namespace IO.Swagger.Api } /// - /// To test enum parameters + /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call /// Form parameter enum test (string array) (optional) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ExceptionFactory.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ExceptionFactory.cs index 31b270ea0ff0..0f16ee365e54 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ExceptionFactory.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ExceptionFactory.cs @@ -19,6 +19,6 @@ namespace IO.Swagger.Client /// /// Method name /// Response - /// Exceptions + /// Exceptions public delegate Exception ExceptionFactory(string methodName, IRestResponse response); } 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 43a0d972a0db..687da55e9241 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 @@ -11,7 +11,7 @@ Contact: apiteam@swagger.io Debug AnyCPU - {959A8039-E3B9-4660-A666-840955E4520C} + {4F6B73F4-427E-4C54-BB06-A106EBF09288} Library Properties IO.Swagger diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.nuspec b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.nuspec new file mode 100644 index 000000000000..4762df88d9cc --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.nuspec @@ -0,0 +1,40 @@ + + + + + $id$ + Swagger Library + + + $version$ + + + $author$ + + + $author$ + false + false + + + A library generated from a Swagger doc + http://swagger.io/terms/ + http://www.apache.org/licenses/LICENSE-2.0.html + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AdditionalPropertiesClass.cs index 3ee30aa66c3e..1abea7e7c14f 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AdditionalPropertiesClass.cs @@ -34,7 +34,7 @@ namespace IO.Swagger.Model /// /// MapProperty. /// MapOfMapProperty. - public AdditionalPropertiesClass(Dictionary MapProperty = null, Dictionary> MapOfMapProperty = null) + public AdditionalPropertiesClass(Dictionary MapProperty = default(Dictionary), Dictionary> MapOfMapProperty = default(Dictionary>)) { this.MapProperty = MapProperty; this.MapOfMapProperty = MapOfMapProperty; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Animal.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Animal.cs index 645c91cbef9d..16ce4bc5af66 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Animal.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Animal.cs @@ -39,7 +39,7 @@ namespace IO.Swagger.Model /// /// ClassName (required). /// Color (default to "red"). - public Animal(string ClassName = null, string Color = null) + public Animal(string ClassName = default(string), string Color = "red") { // to ensure "ClassName" is required (not null) if (ClassName == null) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ApiResponse.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ApiResponse.cs index a45534c222f6..7d7e0f15e299 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ApiResponse.cs @@ -35,7 +35,7 @@ namespace IO.Swagger.Model /// Code. /// Type. /// Message. - public ApiResponse(int? Code = null, string Type = null, string Message = null) + public ApiResponse(int? Code = default(int?), string Type = default(string), string Message = default(string)) { this.Code = Code; this.Type = Type; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayOfArrayOfNumberOnly.cs index a1a09c7cc0b8..7580c01639d5 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayOfArrayOfNumberOnly.cs @@ -33,7 +33,7 @@ namespace IO.Swagger.Model /// Initializes a new instance of the class. /// /// ArrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> ArrayArrayNumber = null) + public ArrayOfArrayOfNumberOnly(List> ArrayArrayNumber = default(List>)) { this.ArrayArrayNumber = ArrayArrayNumber; } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayOfNumberOnly.cs index 8fcd0d6dcf5b..2bdef12ebedb 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayOfNumberOnly.cs @@ -33,7 +33,7 @@ namespace IO.Swagger.Model /// Initializes a new instance of the class. /// /// ArrayNumber. - public ArrayOfNumberOnly(List ArrayNumber = null) + public ArrayOfNumberOnly(List ArrayNumber = default(List)) { this.ArrayNumber = ArrayNumber; } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayTest.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayTest.cs index 07a94aba71fb..6ebb5ef72566 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ArrayTest.cs @@ -35,7 +35,7 @@ namespace IO.Swagger.Model /// ArrayOfString. /// ArrayArrayOfInteger. /// ArrayArrayOfModel. - public ArrayTest(List ArrayOfString = null, List> ArrayArrayOfInteger = null, List> ArrayArrayOfModel = null) + public ArrayTest(List ArrayOfString = default(List), List> ArrayArrayOfInteger = default(List>), List> ArrayArrayOfModel = default(List>)) { this.ArrayOfString = ArrayOfString; this.ArrayArrayOfInteger = ArrayArrayOfInteger; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Capitalization.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Capitalization.cs new file mode 100644 index 000000000000..240e3c461cbf --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Capitalization.cs @@ -0,0 +1,197 @@ +/* + * Swagger Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; + +namespace IO.Swagger.Model +{ + /// + /// Capitalization + /// + [DataContract] + public partial class Capitalization : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// SmallCamel. + /// CapitalCamel. + /// SmallSnake. + /// CapitalSnake. + /// SCAETHFlowPoints. + /// Name of the pet . + public Capitalization(string SmallCamel = default(string), string CapitalCamel = default(string), string SmallSnake = default(string), string CapitalSnake = default(string), string SCAETHFlowPoints = default(string), string ATT_NAME = default(string)) + { + this.SmallCamel = SmallCamel; + this.CapitalCamel = CapitalCamel; + this.SmallSnake = SmallSnake; + this.CapitalSnake = CapitalSnake; + this.SCAETHFlowPoints = SCAETHFlowPoints; + this.ATT_NAME = ATT_NAME; + } + + /// + /// Gets or Sets SmallCamel + /// + [DataMember(Name="smallCamel", EmitDefaultValue=false)] + public string SmallCamel { get; set; } + /// + /// Gets or Sets CapitalCamel + /// + [DataMember(Name="CapitalCamel", EmitDefaultValue=false)] + public string CapitalCamel { get; set; } + /// + /// Gets or Sets SmallSnake + /// + [DataMember(Name="small_Snake", EmitDefaultValue=false)] + public string SmallSnake { get; set; } + /// + /// Gets or Sets CapitalSnake + /// + [DataMember(Name="Capital_Snake", EmitDefaultValue=false)] + public string CapitalSnake { get; set; } + /// + /// Gets or Sets SCAETHFlowPoints + /// + [DataMember(Name="SCA_ETH_Flow_Points", EmitDefaultValue=false)] + public string SCAETHFlowPoints { get; set; } + /// + /// Name of the pet + /// + /// Name of the pet + [DataMember(Name="ATT_NAME", EmitDefaultValue=false)] + public string ATT_NAME { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Capitalization {\n"); + sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); + sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); + sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); + sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); + sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); + sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Capitalization); + } + + /// + /// Returns true if Capitalization instances are equal + /// + /// Instance of Capitalization to be compared + /// Boolean + public bool Equals(Capitalization other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.SmallCamel == other.SmallCamel || + this.SmallCamel != null && + this.SmallCamel.Equals(other.SmallCamel) + ) && + ( + this.CapitalCamel == other.CapitalCamel || + this.CapitalCamel != null && + this.CapitalCamel.Equals(other.CapitalCamel) + ) && + ( + this.SmallSnake == other.SmallSnake || + this.SmallSnake != null && + this.SmallSnake.Equals(other.SmallSnake) + ) && + ( + this.CapitalSnake == other.CapitalSnake || + this.CapitalSnake != null && + this.CapitalSnake.Equals(other.CapitalSnake) + ) && + ( + this.SCAETHFlowPoints == other.SCAETHFlowPoints || + this.SCAETHFlowPoints != null && + this.SCAETHFlowPoints.Equals(other.SCAETHFlowPoints) + ) && + ( + this.ATT_NAME == other.ATT_NAME || + this.ATT_NAME != null && + this.ATT_NAME.Equals(other.ATT_NAME) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.SmallCamel != null) + hash = hash * 59 + this.SmallCamel.GetHashCode(); + if (this.CapitalCamel != null) + hash = hash * 59 + this.CapitalCamel.GetHashCode(); + if (this.SmallSnake != null) + hash = hash * 59 + this.SmallSnake.GetHashCode(); + if (this.CapitalSnake != null) + hash = hash * 59 + this.CapitalSnake.GetHashCode(); + if (this.SCAETHFlowPoints != null) + hash = hash * 59 + this.SCAETHFlowPoints.GetHashCode(); + if (this.ATT_NAME != null) + hash = hash * 59 + this.ATT_NAME.GetHashCode(); + return hash; + } + } + + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs index 577643ebce0a..d5de574aba4b 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs @@ -40,7 +40,7 @@ namespace IO.Swagger.Model /// ClassName (required). /// Color (default to "red"). /// Declawed. - public Cat(string ClassName = null, string Color = null, bool? Declawed = null) + public Cat(string ClassName = default(string), string Color = "red", bool? Declawed = default(bool?)) { // to ensure "ClassName" is required (not null) if (ClassName == null) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Category.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Category.cs index 427718eff0fa..d459fb8adeb1 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Category.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Category.cs @@ -34,7 +34,7 @@ namespace IO.Swagger.Model /// /// Id. /// Name. - public Category(long? Id = null, string Name = null) + public Category(long? Id = default(long?), string Name = default(string)) { this.Id = Id; this.Name = Name; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ClassModel.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ClassModel.cs index d7947c69aba5..1bddfb9efbca 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ClassModel.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ClassModel.cs @@ -33,7 +33,7 @@ namespace IO.Swagger.Model /// Initializes a new instance of the class. /// /// _Class. - public ClassModel(string _Class = null) + public ClassModel(string _Class = default(string)) { this._Class = _Class; } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs index b7b3e30c3ced..f2b4e1fbd656 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs @@ -40,7 +40,7 @@ namespace IO.Swagger.Model /// ClassName (required). /// Color (default to "red"). /// Breed. - public Dog(string ClassName = null, string Color = null, string Breed = null) + public Dog(string ClassName = default(string), string Color = "red", string Breed = default(string)) { // to ensure "ClassName" is required (not null) if (ClassName == null) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumArrays.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumArrays.cs index 075550ac040d..b280c80fcb18 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumArrays.cs @@ -85,7 +85,7 @@ namespace IO.Swagger.Model /// /// JustSymbol. /// ArrayEnum. - public EnumArrays(JustSymbolEnum? JustSymbol = null, List ArrayEnum = null) + public EnumArrays(JustSymbolEnum? JustSymbol = default(JustSymbolEnum?), List ArrayEnum = default(List)) { this.JustSymbol = JustSymbol; this.ArrayEnum = ArrayEnum; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumTest.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumTest.cs index 6d901c809997..832c3d7808b8 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumTest.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumTest.cs @@ -117,7 +117,7 @@ namespace IO.Swagger.Model /// EnumInteger. /// EnumNumber. /// OuterEnum. - public EnumTest(EnumStringEnum? EnumString = null, EnumIntegerEnum? EnumInteger = null, EnumNumberEnum? EnumNumber = null, OuterEnum? OuterEnum = null) + public EnumTest(EnumStringEnum? EnumString = default(EnumStringEnum?), EnumIntegerEnum? EnumInteger = default(EnumIntegerEnum?), EnumNumberEnum? EnumNumber = default(EnumNumberEnum?), OuterEnum OuterEnum = default(OuterEnum)) { this.EnumString = EnumString; this.EnumInteger = EnumInteger; @@ -129,7 +129,7 @@ namespace IO.Swagger.Model /// Gets or Sets OuterEnum /// [DataMember(Name="outerEnum", EmitDefaultValue=false)] - public OuterEnum? OuterEnum { get; set; } + public OuterEnum OuterEnum { get; set; } /// /// Returns the string presentation of the object /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs index de5cde208073..b7ff2effe527 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FormatTest.cs @@ -50,7 +50,7 @@ namespace IO.Swagger.Model /// DateTime. /// Uuid. /// Password (required). - public FormatTest(int? Integer = null, int? Int32 = null, long? Int64 = null, decimal? Number = null, float? _Float = null, double? _Double = null, string _String = null, byte[] _Byte = null, byte[] Binary = null, DateTime? Date = null, DateTime? DateTime = null, Guid? Uuid = null, string Password = null) + public FormatTest(int? Integer = default(int?), int? Int32 = default(int?), long? Int64 = default(long?), decimal? Number = default(decimal?), float? _Float = default(float?), double? _Double = default(double?), string _String = default(string), byte[] _Byte = default(byte[]), byte[] Binary = default(byte[]), DateTime? Date = default(DateTime?), DateTime? DateTime = default(DateTime?), Guid? Uuid = default(Guid?), string Password = default(string)) { // to ensure "Number" is required (not null) if (Number == null) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/List.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/List.cs index 7d4a145ee051..7eecb028ac37 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/List.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/List.cs @@ -33,7 +33,7 @@ namespace IO.Swagger.Model /// Initializes a new instance of the class. /// /// _123List. - public List(string _123List = null) + public List(string _123List = default(string)) { this._123List = _123List; } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/MapTest.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/MapTest.cs index c5ff9fe92b3e..6f5bc36ced61 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/MapTest.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/MapTest.cs @@ -60,7 +60,7 @@ namespace IO.Swagger.Model /// /// MapMapOfString. /// MapOfEnumString. - public MapTest(Dictionary> MapMapOfString = null, Dictionary MapOfEnumString = null) + public MapTest(Dictionary> MapMapOfString = default(Dictionary>), Dictionary MapOfEnumString = default(Dictionary)) { this.MapMapOfString = MapMapOfString; this.MapOfEnumString = MapOfEnumString; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 65bf2a60c4f6..f59f9e082e6b 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -35,7 +35,7 @@ namespace IO.Swagger.Model /// Uuid. /// DateTime. /// Map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid? Uuid = null, DateTime? DateTime = null, Dictionary Map = null) + public MixedPropertiesAndAdditionalPropertiesClass(Guid? Uuid = default(Guid?), DateTime? DateTime = default(DateTime?), Dictionary Map = default(Dictionary)) { this.Uuid = Uuid; this.DateTime = DateTime; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Model200Response.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Model200Response.cs index 05f3eaeec766..b436cae32a25 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Model200Response.cs @@ -34,7 +34,7 @@ namespace IO.Swagger.Model /// /// Name. /// _Class. - public Model200Response(int? Name = null, string _Class = null) + public Model200Response(int? Name = default(int?), string _Class = default(string)) { this.Name = Name; this._Class = _Class; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelClient.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelClient.cs index 43d0c8ecd645..64102139c556 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelClient.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelClient.cs @@ -33,7 +33,7 @@ namespace IO.Swagger.Model /// Initializes a new instance of the class. /// /// _Client. - public ModelClient(string _Client = null) + public ModelClient(string _Client = default(string)) { this._Client = _Client; } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelReturn.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelReturn.cs index 6f3d68cb756b..1169a11349cc 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelReturn.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelReturn.cs @@ -33,7 +33,7 @@ namespace IO.Swagger.Model /// Initializes a new instance of the class. /// /// _Return. - public ModelReturn(int? _Return = null) + public ModelReturn(int? _Return = default(int?)) { this._Return = _Return; } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Name.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Name.cs index dcf4010dcc63..db51691dcdb2 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Name.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Name.cs @@ -39,7 +39,7 @@ namespace IO.Swagger.Model /// /// _Name (required). /// Property. - public Name(int? _Name = null, string Property = null) + public Name(int? _Name = default(int?), string Property = default(string)) { // to ensure "_Name" is required (not null) if (_Name == null) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/NumberOnly.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/NumberOnly.cs index 9131b5b92603..ed8a5396cb2c 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/NumberOnly.cs @@ -33,7 +33,7 @@ namespace IO.Swagger.Model /// Initializes a new instance of the class. /// /// JustNumber. - public NumberOnly(decimal? JustNumber = null) + public NumberOnly(decimal? JustNumber = default(decimal?)) { this.JustNumber = JustNumber; } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Order.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Order.cs index 5beb95c11fda..0e98fc723a80 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Order.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Order.cs @@ -71,7 +71,7 @@ namespace IO.Swagger.Model /// ShipDate. /// Order Status. /// Complete (default to false). - public Order(long? Id = null, long? PetId = null, int? Quantity = null, DateTime? ShipDate = null, StatusEnum? Status = null, bool? Complete = null) + public Order(long? Id = default(long?), long? PetId = default(long?), int? Quantity = default(int?), DateTime? ShipDate = default(DateTime?), StatusEnum? Status = default(StatusEnum?), bool? Complete = false) { this.Id = Id; this.PetId = PetId; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Pet.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Pet.cs index 6c1fb0b05c35..eb2cc52194c9 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Pet.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Pet.cs @@ -76,7 +76,7 @@ namespace IO.Swagger.Model /// PhotoUrls (required). /// Tags. /// pet status in the store. - public Pet(long? Id = null, Category Category = null, string Name = null, List PhotoUrls = null, List Tags = null, StatusEnum? Status = null) + public Pet(long? Id = default(long?), Category Category = default(Category), string Name = default(string), List PhotoUrls = default(List), List Tags = default(List), StatusEnum? Status = default(StatusEnum?)) { // to ensure "Name" is required (not null) if (Name == null) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ReadOnlyFirst.cs index a64db248d662..07deb7f1fe3b 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ReadOnlyFirst.cs @@ -33,7 +33,7 @@ namespace IO.Swagger.Model /// Initializes a new instance of the class. /// /// Baz. - public ReadOnlyFirst(string Baz = null) + public ReadOnlyFirst(string Baz = default(string)) { this.Baz = Baz; } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/SpecialModelName.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/SpecialModelName.cs index 6b75943bff15..07eb8341294c 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/SpecialModelName.cs @@ -33,7 +33,7 @@ namespace IO.Swagger.Model /// Initializes a new instance of the class. /// /// SpecialPropertyName. - public SpecialModelName(long? SpecialPropertyName = null) + public SpecialModelName(long? SpecialPropertyName = default(long?)) { this.SpecialPropertyName = SpecialPropertyName; } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Tag.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Tag.cs index bc8b3c83a522..2820259d4559 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Tag.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Tag.cs @@ -34,7 +34,7 @@ namespace IO.Swagger.Model /// /// Id. /// Name. - public Tag(long? Id = null, string Name = null) + public Tag(long? Id = default(long?), string Name = default(string)) { this.Id = Id; this.Name = Name; diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/User.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/User.cs index f2cc6d8246eb..f0b4301a0754 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/User.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/User.cs @@ -40,7 +40,7 @@ namespace IO.Swagger.Model /// Password. /// Phone. /// User Status. - public User(long? Id = null, string Username = null, string FirstName = null, string LastName = null, string Email = null, string Password = null, string Phone = null, int? UserStatus = null) + public User(long? Id = default(long?), string Username = default(string), string FirstName = default(string), string LastName = default(string), string Email = default(string), string Password = default(string), string Phone = default(string), int? UserStatus = default(int?)) { this.Id = Id; this.Username = Username;