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 9402afea736..f1b43088b23 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
@@ -4,6 +4,7 @@ import com.google.common.collect.ImmutableMap;
import io.swagger.codegen.CodegenConstants;
import io.swagger.codegen.CodegenType;
import io.swagger.codegen.CodegenModel;
+import io.swagger.codegen.CodegenParameter;
import io.swagger.codegen.SupportingFile;
import io.swagger.codegen.CodegenProperty;
import io.swagger.codegen.CodegenOperation;
@@ -11,8 +12,10 @@ import io.swagger.codegen.CliOption;
import io.swagger.models.Model;
import java.io.File;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
+import java.util.HashMap;
import java.util.Iterator;
import org.slf4j.Logger;
diff --git a/modules/swagger-codegen/src/main/resources/csharp/compile-mono.sh.mustache b/modules/swagger-codegen/src/main/resources/csharp/compile-mono.sh.mustache
index 7aab3657090..91b2e83a311 100644
--- a/modules/swagger-codegen/src/main/resources/csharp/compile-mono.sh.mustache
+++ b/modules/swagger-codegen/src/main/resources/csharp/compile-mono.sh.mustache
@@ -32,6 +32,7 @@ cp packages/RestSharp.105.1.0/lib/{{targetFrameworkNuget}}/RestSharp.dll bin/Res
echo "[INFO] Run 'mcs' to build bin/{{{packageName}}}.dll"
mcs -sdk:${netfx} -r:bin/Newtonsoft.Json.dll,\
bin/RestSharp.dll,\
+System.ComponentModel.DataAnnotations.dll,\
System.Runtime.Serialization.dll \
-target:library \
-out:bin/{{packageName}}.dll \
diff --git a/modules/swagger-codegen/src/main/resources/csharp/compile.mustache b/modules/swagger-codegen/src/main/resources/csharp/compile.mustache
index 5da333f4e72..f359175e125 100644
--- a/modules/swagger-codegen/src/main/resources/csharp/compile.mustache
+++ b/modules/swagger-codegen/src/main/resources/csharp/compile.mustache
@@ -14,8 +14,12 @@
@echo off
-{{#supportsAsync}}SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319{{/supportsAsync}}
-{{^supportsAsync}}SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v3.5{{/supportsAsync}}
+{{#supportsAsync}}
+SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319
+{{/supportsAsync}}
+{{^supportsAsync}}
+SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v3.5
+{{/supportsAsync}}
if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://nuget.org/nuget.exe', '.\nuget.exe')"
.\nuget.exe install src\{{packageName}}\packages.config -o packages
diff --git a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln
index 54825705405..e6247e2a679 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", "{CD8F9D95-6AFF-40BD-B8E6-58AF86348EC2}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{473916C4-D026-4063-8A3D-34BC255A0E7A}"
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
-{CD8F9D95-6AFF-40BD-B8E6-58AF86348EC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-{CD8F9D95-6AFF-40BD-B8E6-58AF86348EC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
-{CD8F9D95-6AFF-40BD-B8E6-58AF86348EC2}.Release|Any CPU.ActiveCfg = Release|Any CPU
-{CD8F9D95-6AFF-40BD-B8E6-58AF86348EC2}.Release|Any CPU.Build.0 = Release|Any CPU
+{473916C4-D026-4063-8A3D-34BC255A0E7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+{473916C4-D026-4063-8A3D-34BC255A0E7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+{473916C4-D026-4063-8A3D-34BC255A0E7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+{473916C4-D026-4063-8A3D-34BC255A0E7A}.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/build.sh b/samples/client/petstore/csharp/SwaggerClient/build.sh
index 25228f3cc36..b09ce1673fd 100644
--- a/samples/client/petstore/csharp/SwaggerClient/build.sh
+++ b/samples/client/petstore/csharp/SwaggerClient/build.sh
@@ -32,6 +32,7 @@ cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll;
echo "[INFO] Run 'mcs' to build bin/IO.Swagger.dll"
mcs -sdk:${netfx} -r:bin/Newtonsoft.Json.dll,\
bin/RestSharp.dll,\
+System.ComponentModel.DataAnnotations.dll,\
System.Runtime.Serialization.dll \
-target:library \
-out:bin/IO.Swagger.dll \
diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj
index c92b1ab1663..72b7a3fc044 100644
--- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj
+++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj
@@ -54,6 +54,7 @@ limitations under the License.
+
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 36ad1fd16df..51cfaa98df0 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
- {CD8F9D95-6AFF-40BD-B8E6-58AF86348EC2}
+ {473916C4-D026-4063-8A3D-34BC255A0E7A}
Library
Properties
IO.Swagger
@@ -54,6 +54,7 @@ limitations under the License.
+
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 ab9b3cdbb22..09c20983ac2 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// AdditionalPropertiesClass
///
[DataContract]
- public partial class AdditionalPropertiesClass : IEquatable
+ public partial class AdditionalPropertiesClass : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -136,6 +138,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 f9fea0bc269..e4103de6352 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// Animal
///
[DataContract]
- public partial class Animal : IEquatable
+ public partial class Animal : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -157,6 +159,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AnimalFarm.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AnimalFarm.cs
index 402fbba0198..d8c31bf2580 100644
--- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AnimalFarm.cs
+++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AnimalFarm.cs
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// AnimalFarm
///
[DataContract]
- public partial class AnimalFarm : List, IEquatable
+ public partial class AnimalFarm : List, IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -107,6 +109,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 fbafd4e33ed..b0d282e4e04 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// ApiResponse
///
[DataContract]
- public partial class ApiResponse : IEquatable
+ public partial class ApiResponse : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -151,6 +153,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 6b833d74a46..0cbce813193 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// ArrayOfArrayOfNumberOnly
///
[DataContract]
- public partial class ArrayOfArrayOfNumberOnly : IEquatable
+ public partial class ArrayOfArrayOfNumberOnly : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -121,6 +123,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 131e369271b..a9c77b686e0 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// ArrayOfNumberOnly
///
[DataContract]
- public partial class ArrayOfNumberOnly : IEquatable
+ public partial class ArrayOfNumberOnly : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -121,6 +123,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 579e6764285..3c6c3304a60 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// ArrayTest
///
[DataContract]
- public partial class ArrayTest : IEquatable
+ public partial class ArrayTest : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -151,6 +153,11 @@ namespace IO.Swagger.Model
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 cd9b90c4b05..eb3cbf6ce12 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// Cat
///
[DataContract]
- public partial class Cat : Animal, IEquatable
+ public partial class Cat : Animal, IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -172,6 +174,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 4de778cc723..d5d9f5fe7b4 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// Category
///
[DataContract]
- public partial class Category : IEquatable
+ public partial class Category : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -136,6 +138,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 aafdfb73fd3..f3836d55ca8 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// Dog
///
[DataContract]
- public partial class Dog : Animal, IEquatable
+ public partial class Dog : Animal, IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -172,6 +174,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 a33ee389531..7f65865b5b7 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// EnumArrays
///
[DataContract]
- public partial class EnumArrays : IEquatable
+ public partial class EnumArrays : IEquatable, IValidatableObject
{
///
/// Gets or Sets JustSymbol
@@ -177,6 +179,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumClass.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumClass.cs
index 7f63ebe77c0..9f1708fb759 100644
--- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumClass.cs
+++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumClass.cs
@@ -24,12 +24,14 @@ 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
{
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 34500e76598..32651e7b7df 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// EnumTest
///
[DataContract]
- public partial class EnumTest : IEquatable
+ public partial class EnumTest : IEquatable, IValidatableObject
{
///
/// Gets or Sets EnumString
@@ -211,6 +213,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 059bc85ffa9..e4487722ec6 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// FormatTest
///
[DataContract]
- public partial class FormatTest : IEquatable
+ public partial class FormatTest : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -338,6 +340,90 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ // Integer (int?) maximum
+ if(this.Integer > (int?)100.0)
+ {
+ yield return new ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.0.", new [] { "Integer" });
+ }
+
+ // Integer (int?) minimum
+ if(this.Integer < (int?)10.0)
+ {
+ yield return new ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.0.", new [] { "Integer" });
+ }
+
+ // Int32 (int?) maximum
+ if(this.Int32 > (int?)200.0)
+ {
+ yield return new ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.0.", new [] { "Int32" });
+ }
+
+ // Int32 (int?) minimum
+ if(this.Int32 < (int?)20.0)
+ {
+ yield return new ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.0.", new [] { "Int32" });
+ }
+
+ // Number (decimal?) maximum
+ if(this.Number > (decimal?)543.2)
+ {
+ yield return new ValidationResult("Invalid value for Number, must be a value less than or equal to 543.2.", new [] { "Number" });
+ }
+
+ // Number (decimal?) minimum
+ if(this.Number < (decimal?)32.1)
+ {
+ yield return new ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
+ }
+
+ // _Float (float?) maximum
+ if(this._Float > (float?)987.6)
+ {
+ yield return new ValidationResult("Invalid value for _Float, must be a value less than or equal to 987.6.", new [] { "_Float" });
+ }
+
+ // _Float (float?) minimum
+ if(this._Float < (float?)54.3)
+ {
+ yield return new ValidationResult("Invalid value for _Float, must be a value greater than or equal to 54.3.", new [] { "_Float" });
+ }
+
+ // _Double (double?) maximum
+ if(this._Double > (double?)123.4)
+ {
+ yield return new ValidationResult("Invalid value for _Double, must be a value less than or equal to 123.4.", new [] { "_Double" });
+ }
+
+ // _Double (double?) minimum
+ if(this._Double < (double?)67.8)
+ {
+ yield return new ValidationResult("Invalid value for _Double, must be a value greater than or equal to 67.8.", new [] { "_Double" });
+ }
+
+ // _String (string) pattern
+ Regex regex_String = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
+ if (false == regex_String.Match(this._String).Success)
+ {
+ yield return new ValidationResult("Invalid value for _String, must match a pattern of /[a-z]/i.", new [] { "_String" });
+ }
+
+ // Password (string) maxLength
+ if(this.Password != null && this.Password.Length > 64)
+ {
+ yield return new ValidationResult("Invalid value for Password, length must be less than 64.", new [] { "Password" });
+ }
+
+ // Password (string) minLength
+ if(this.Password != null && this.Password.Length < 10)
+ {
+ yield return new ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
+ }
+
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/HasOnlyReadOnly.cs
index 56f2b636fe8..7fb81bb8bbd 100644
--- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/HasOnlyReadOnly.cs
+++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/HasOnlyReadOnly.cs
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// HasOnlyReadOnly
///
[DataContract]
- public partial class HasOnlyReadOnly : IEquatable
+ public partial class HasOnlyReadOnly : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -133,6 +135,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 bab8dae979c..36469b57a17 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// List
///
[DataContract]
- public partial class List : IEquatable
+ public partial class List : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -121,6 +123,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 7a5bc483802..8b7354f4832 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// MapTest
///
[DataContract]
- public partial class MapTest : IEquatable
+ public partial class MapTest : IEquatable, IValidatableObject
{
///
@@ -157,6 +159,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 e3d262a1a25..1ab2576c70f 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// MixedPropertiesAndAdditionalPropertiesClass
///
[DataContract]
- public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable
+ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -151,6 +153,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 cffabe7a904..08a7bf38329 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// Model for testing model name starting with number
///
[DataContract]
- public partial class Model200Response : IEquatable
+ public partial class Model200Response : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -136,6 +138,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 a3aeb7531b5..68da8446668 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// ModelClient
///
[DataContract]
- public partial class ModelClient : IEquatable
+ public partial class ModelClient : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -121,6 +123,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 7670fb112df..da5f4c7748a 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// Model for testing reserved words
///
[DataContract]
- public partial class ModelReturn : IEquatable
+ public partial class ModelReturn : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -121,6 +123,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 f511bafe6b8..7de18426014 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// Model for testing model name same as property name
///
[DataContract]
- public partial class Name : IEquatable
+ public partial class Name : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -175,6 +177,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 d77099357fc..797dd1e0df4 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// NumberOnly
///
[DataContract]
- public partial class NumberOnly : IEquatable
+ public partial class NumberOnly : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -121,6 +123,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 0b7e559181f..899341a8d44 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// Order
///
[DataContract]
- public partial class Order : IEquatable
+ public partial class Order : IEquatable, IValidatableObject
{
///
/// Order Status
@@ -232,6 +234,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 84b797a4548..d0c9509a136 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// Pet
///
[DataContract]
- public partial class Pet : IEquatable
+ public partial class Pet : IEquatable, IValidatableObject
{
///
/// pet status in the store
@@ -245,6 +247,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 4b96322739d..24b683789b0 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// ReadOnlyFirst
///
[DataContract]
- public partial class ReadOnlyFirst : IEquatable
+ public partial class ReadOnlyFirst : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -134,6 +136,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 4d8865432b5..7ce56370dda 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// SpecialModelName
///
[DataContract]
- public partial class SpecialModelName : IEquatable
+ public partial class SpecialModelName : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -121,6 +123,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 41f5a6794b6..b814e119dd8 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// Tag
///
[DataContract]
- public partial class Tag : IEquatable
+ public partial class Tag : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -136,6 +138,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
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 3d8e1c041a7..0a980864230 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
@@ -24,12 +24,14 @@ 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
{
@@ -37,7 +39,7 @@ namespace IO.Swagger.Model
/// User
///
[DataContract]
- public partial class User : IEquatable
+ public partial class User : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -227,6 +229,11 @@ namespace IO.Swagger.Model
return hash;
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/IO.Swagger.sln b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/IO.Swagger.sln
index b9a399895c3..f5367f2ba9d 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/IO.Swagger.sln
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/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", "{54B7162B-7A0F-44B6-AF09-8ECBA3A2436D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{2A56AF87-B694-4558-9CBC-D85E740D4BFD}"
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
-{54B7162B-7A0F-44B6-AF09-8ECBA3A2436D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-{54B7162B-7A0F-44B6-AF09-8ECBA3A2436D}.Debug|Any CPU.Build.0 = Debug|Any CPU
-{54B7162B-7A0F-44B6-AF09-8ECBA3A2436D}.Release|Any CPU.ActiveCfg = Release|Any CPU
-{54B7162B-7A0F-44B6-AF09-8ECBA3A2436D}.Release|Any CPU.Build.0 = Release|Any CPU
+{2A56AF87-B694-4558-9CBC-D85E740D4BFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+{2A56AF87-B694-4558-9CBC-D85E740D4BFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+{2A56AF87-B694-4558-9CBC-D85E740D4BFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+{2A56AF87-B694-4558-9CBC-D85E740D4BFD}.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/SwaggerClientWithPropertyChanged/build.sh b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/build.sh
index 25228f3cc36..b09ce1673fd 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/build.sh
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/build.sh
@@ -32,6 +32,7 @@ cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll;
echo "[INFO] Run 'mcs' to build bin/IO.Swagger.dll"
mcs -sdk:${netfx} -r:bin/Newtonsoft.Json.dll,\
bin/RestSharp.dll,\
+System.ComponentModel.DataAnnotations.dll,\
System.Runtime.Serialization.dll \
-target:library \
-out:bin/IO.Swagger.dll \
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/IO.Swagger.Test.csproj b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/IO.Swagger.Test.csproj
index e34e29234a8..3a17bc59a9d 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/IO.Swagger.Test.csproj
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/IO.Swagger.Test.csproj
@@ -54,6 +54,7 @@ limitations under the License.
+
@@ -86,7 +87,7 @@ limitations under the License.
- {54B7162B-7A0F-44B6-AF09-8ECBA3A2436D}
+ {2A56AF87-B694-4558-9CBC-D85E740D4BFD}
IO.Swagger
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.csproj b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.csproj
index 4e561a37137..7827cb719dc 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.csproj
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.csproj
@@ -24,7 +24,7 @@ limitations under the License.
Debug
AnyCPU
- {54B7162B-7A0F-44B6-AF09-8ECBA3A2436D}
+ {2A56AF87-B694-4558-9CBC-D85E740D4BFD}
Library
Properties
IO.Swagger
@@ -54,6 +54,7 @@ limitations under the License.
+
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AdditionalPropertiesClass.cs
index 3bd6d7fa945..875e2eed2ce 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AdditionalPropertiesClass.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AdditionalPropertiesClass.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class AdditionalPropertiesClass : IEquatable
+ public partial class AdditionalPropertiesClass : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -139,7 +141,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -150,6 +154,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Animal.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Animal.cs
index 188393dad0a..97fee42a3a4 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Animal.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Animal.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class Animal : IEquatable
+ public partial class Animal : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -160,7 +162,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -171,6 +175,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AnimalFarm.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AnimalFarm.cs
index 0fe6f923722..6febf5ed135 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AnimalFarm.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AnimalFarm.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class AnimalFarm : List, IEquatable
+ public partial class AnimalFarm : List, IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -110,7 +112,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -121,6 +125,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ApiResponse.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ApiResponse.cs
index 37f48632be6..ebbcad265c4 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ApiResponse.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ApiResponse.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class ApiResponse : IEquatable
+ public partial class ApiResponse : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -154,7 +156,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -165,6 +169,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ArrayOfArrayOfNumberOnly.cs
index 90bbc6d47c6..ac5ac025933 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ArrayOfArrayOfNumberOnly.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ArrayOfArrayOfNumberOnly.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class ArrayOfArrayOfNumberOnly : IEquatable
+ public partial class ArrayOfArrayOfNumberOnly : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -124,7 +126,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -135,6 +139,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ArrayOfNumberOnly.cs
index 5bb2e3b6a9c..7aa16298467 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ArrayOfNumberOnly.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ArrayOfNumberOnly.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class ArrayOfNumberOnly : IEquatable
+ public partial class ArrayOfNumberOnly : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -124,7 +126,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -135,6 +139,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ArrayTest.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ArrayTest.cs
index 86964efef98..b13880edacd 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ArrayTest.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ArrayTest.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class ArrayTest : IEquatable
+ public partial class ArrayTest : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -154,7 +156,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -165,6 +169,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Cat.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Cat.cs
index 9d3e2cd6dee..1120e2faf92 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Cat.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Cat.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class Cat : Animal, IEquatable
+ public partial class Cat : Animal, IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -175,7 +177,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -186,6 +190,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Category.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Category.cs
index 188a5917e24..27e980bc721 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Category.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Category.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class Category : IEquatable
+ public partial class Category : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -139,7 +141,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -150,6 +154,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Dog.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Dog.cs
index 1c7fa83c618..8e834c85e6a 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Dog.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Dog.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class Dog : Animal, IEquatable
+ public partial class Dog : Animal, IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -175,7 +177,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -186,6 +190,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/EnumArrays.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/EnumArrays.cs
index 4c67279c5a5..faa2f74a1c6 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/EnumArrays.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/EnumArrays.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class EnumArrays : IEquatable
+ public partial class EnumArrays : IEquatable, IValidatableObject
{
///
/// Gets or Sets JustSymbol
@@ -180,7 +182,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -191,6 +195,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/EnumClass.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/EnumClass.cs
index 37817100c20..60432e1d3bf 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/EnumClass.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/EnumClass.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/EnumTest.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/EnumTest.cs
index 4d9ff8c1f91..b2c9e8e8e2e 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/EnumTest.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/EnumTest.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class EnumTest : IEquatable
+ public partial class EnumTest : IEquatable, IValidatableObject
{
///
/// Gets or Sets EnumString
@@ -214,7 +216,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -225,6 +229,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs
index 13bc450ec5b..e00fdf2f745 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FormatTest.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class FormatTest : IEquatable
+ public partial class FormatTest : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -341,7 +343,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -352,6 +356,90 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ // Integer (int?) maximum
+ if(this.Integer > (int?)100.0)
+ {
+ yield return new ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.0.", new [] { "Integer" });
+ }
+
+ // Integer (int?) minimum
+ if(this.Integer < (int?)10.0)
+ {
+ yield return new ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.0.", new [] { "Integer" });
+ }
+
+ // Int32 (int?) maximum
+ if(this.Int32 > (int?)200.0)
+ {
+ yield return new ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.0.", new [] { "Int32" });
+ }
+
+ // Int32 (int?) minimum
+ if(this.Int32 < (int?)20.0)
+ {
+ yield return new ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.0.", new [] { "Int32" });
+ }
+
+ // Number (decimal?) maximum
+ if(this.Number > (decimal?)543.2)
+ {
+ yield return new ValidationResult("Invalid value for Number, must be a value less than or equal to 543.2.", new [] { "Number" });
+ }
+
+ // Number (decimal?) minimum
+ if(this.Number < (decimal?)32.1)
+ {
+ yield return new ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
+ }
+
+ // _Float (float?) maximum
+ if(this._Float > (float?)987.6)
+ {
+ yield return new ValidationResult("Invalid value for _Float, must be a value less than or equal to 987.6.", new [] { "_Float" });
+ }
+
+ // _Float (float?) minimum
+ if(this._Float < (float?)54.3)
+ {
+ yield return new ValidationResult("Invalid value for _Float, must be a value greater than or equal to 54.3.", new [] { "_Float" });
+ }
+
+ // _Double (double?) maximum
+ if(this._Double > (double?)123.4)
+ {
+ yield return new ValidationResult("Invalid value for _Double, must be a value less than or equal to 123.4.", new [] { "_Double" });
+ }
+
+ // _Double (double?) minimum
+ if(this._Double < (double?)67.8)
+ {
+ yield return new ValidationResult("Invalid value for _Double, must be a value greater than or equal to 67.8.", new [] { "_Double" });
+ }
+
+ // _String (string) pattern
+ Regex regex_String = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
+ if (false == regex_String.Match(this._String).Success)
+ {
+ yield return new ValidationResult("Invalid value for _String, must match a pattern of /[a-z]/i.", new [] { "_String" });
+ }
+
+ // Password (string) maxLength
+ if(this.Password != null && this.Password.Length > 64)
+ {
+ yield return new ValidationResult("Invalid value for Password, length must be less than 64.", new [] { "Password" });
+ }
+
+ // Password (string) minLength
+ if(this.Password != null && this.Password.Length < 10)
+ {
+ yield return new ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
+ }
+
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/HasOnlyReadOnly.cs
index 0fcd7a3e451..4fc798b7e70 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/HasOnlyReadOnly.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/HasOnlyReadOnly.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class HasOnlyReadOnly : IEquatable
+ public partial class HasOnlyReadOnly : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -136,7 +138,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -147,6 +151,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/List.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/List.cs
index a20a417a436..c9f6b6be4f9 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/List.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/List.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class List : IEquatable
+ public partial class List : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -124,7 +126,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -135,6 +139,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/MapTest.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/MapTest.cs
index ae8ee7bb4a4..243c855b4fd 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/MapTest.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/MapTest.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class MapTest : IEquatable
+ public partial class MapTest : IEquatable, IValidatableObject
{
///
@@ -160,7 +162,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -171,6 +175,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/MixedPropertiesAndAdditionalPropertiesClass.cs
index bf0365e174f..61adb990383 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/MixedPropertiesAndAdditionalPropertiesClass.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/MixedPropertiesAndAdditionalPropertiesClass.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable
+ public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -154,7 +156,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -165,6 +169,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Model200Response.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Model200Response.cs
index 4e29b8d9723..0e6db28041e 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Model200Response.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Model200Response.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class Model200Response : IEquatable
+ public partial class Model200Response : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -139,7 +141,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -150,6 +154,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ModelClient.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ModelClient.cs
index c485e913fc1..3d0f1af2ab7 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ModelClient.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ModelClient.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class ModelClient : IEquatable
+ public partial class ModelClient : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -124,7 +126,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -135,6 +139,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ModelReturn.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ModelReturn.cs
index b08ae782cdf..a092e681b5c 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ModelReturn.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ModelReturn.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class ModelReturn : IEquatable
+ public partial class ModelReturn : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -124,7 +126,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -135,6 +139,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Name.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Name.cs
index 4c389d7d9b2..31ebcde8efa 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Name.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Name.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class Name : IEquatable
+ public partial class Name : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -178,7 +180,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -189,6 +193,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/NumberOnly.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/NumberOnly.cs
index 29c8075c7e6..d3d5e5d3090 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/NumberOnly.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/NumberOnly.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class NumberOnly : IEquatable
+ public partial class NumberOnly : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -124,7 +126,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -135,6 +139,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Order.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Order.cs
index 6b8286be4c7..1bf61b11df8 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Order.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Order.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class Order : IEquatable
+ public partial class Order : IEquatable, IValidatableObject
{
///
/// Order Status
@@ -235,7 +237,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -246,6 +250,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Pet.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Pet.cs
index 51b3768d72d..c20ec7c1106 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Pet.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Pet.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class Pet : IEquatable
+ public partial class Pet : IEquatable, IValidatableObject
{
///
/// pet status in the store
@@ -248,7 +250,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -259,6 +263,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ReadOnlyFirst.cs
index 5af77d4a835..4039c2bd3ee 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ReadOnlyFirst.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ReadOnlyFirst.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class ReadOnlyFirst : IEquatable
+ public partial class ReadOnlyFirst : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -137,7 +139,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -148,6 +152,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/SpecialModelName.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/SpecialModelName.cs
index 7671993eb1d..7545aa5fa36 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/SpecialModelName.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/SpecialModelName.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class SpecialModelName : IEquatable
+ public partial class SpecialModelName : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -124,7 +126,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -135,6 +139,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Tag.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Tag.cs
index 5bb920ad9fe..54c13750f91 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Tag.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Tag.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class Tag : IEquatable
+ public partial class Tag : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -139,7 +141,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -150,6 +154,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}
diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/User.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/User.cs
index d1be8c78f86..988ec591edf 100644
--- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/User.cs
+++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/User.cs
@@ -24,6 +24,7 @@ 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;
@@ -32,6 +33,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PropertyChanged;
using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
namespace IO.Swagger.Model
{
@@ -40,7 +42,7 @@ namespace IO.Swagger.Model
///
[DataContract]
[ImplementPropertyChanged]
- public partial class User : IEquatable
+ public partial class User : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
@@ -230,7 +232,9 @@ namespace IO.Swagger.Model
return hash;
}
}
+
public event PropertyChangedEventHandler PropertyChanged;
+
public virtual void OnPropertyChanged(string propertyName)
{
// NOTE: property changed is handled via "code weaving" using Fody.
@@ -241,6 +245,11 @@ namespace IO.Swagger.Model
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ public IEnumerable Validate(ValidationContext validationContext)
+ {
+ yield break;
+ }
}
}