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 9402afea73..f1b43088b2 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 7aab365709..91b2e83a31 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 5da333f4e7..f359175e12 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 5482570540..e6247e2a67 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 25228f3cc3..b09ce1673f 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 c92b1ab166..72b7a3fc04 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 36ad1fd16d..51cfaa98df 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 ab9b3cdbb2..09c20983ac 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 f9fea0bc26..e4103de635 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 402fbba019..d8c31bf258 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 fbafd4e33e..b0d282e4e0 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 6b833d74a4..0cbce81319 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 131e369271..a9c77b686e 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 579e676428..3c6c3304a6 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 cd9b90c4b0..eb3cbf6ce1 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 4de778cc72..d5d9f5fe7b 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 aafdfb73fd..f3836d55ca 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 a33ee38953..7f65865b5b 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 7f63ebe77c..9f1708fb75 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 34500e7659..32651e7b7d 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 059bc85ffa..e4487722ec 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 56f2b636fe..7fb81bb8bb 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 bab8dae979..36469b57a1 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 7a5bc48380..8b7354f483 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 e3d262a1a2..1ab2576c70 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 cffabe7a90..08a7bf3832 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 a3aeb7531b..68da844666 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 7670fb112d..da5f4c7748 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 f511bafe6b..7de1842601 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 d77099357f..797dd1e0df 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 0b7e559181..899341a8d4 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 84b797a454..d0c9509a13 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 4b96322739..24b683789b 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 4d8865432b..7ce56370dd 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 41f5a6794b..b814e119dd 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 3d8e1c041a..0a98086423 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 b9a399895c..f5367f2ba9 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 25228f3cc3..b09ce1673f 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 e34e29234a..3a17bc59a9 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 4e561a3713..7827cb719d 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 3bd6d7fa94..875e2eed2c 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 188393dad0..97fee42a3a 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 0fe6f92372..6febf5ed13 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 37f48632be..ebbcad265c 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 90bbc6d47c..ac5ac02593 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 5bb2e3b6a9..7aa1629846 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 86964efef9..b13880edac 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 9d3e2cd6de..1120e2faf9 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 188a5917e2..27e980bc72 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 1c7fa83c61..8e834c85e6 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 4c67279c5a..faa2f74a1c 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 37817100c2..60432e1d3b 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 4d9ff8c1f9..b2c9e8e8e2 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 13bc450ec5..e00fdf2f74 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 0fcd7a3e45..4fc798b7e7 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 a20a417a43..c9f6b6be4f 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 ae8ee7bb4a..243c855b4f 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 bf0365e174..61adb99038 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 4e29b8d972..0e6db28041 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 c485e913fc..3d0f1af2ab 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 b08ae782cd..a092e681b5 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 4c389d7d9b..31ebcde8ef 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 29c8075c7e..d3d5e5d309 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 6b8286be4c..1bf61b11df 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 51b3768d72..c20ec7c110 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 5af77d4a83..4039c2bd3e 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 7671993eb1..7545aa5fa3 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 5bb920ad9f..54c13750f9 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 d1be8c78f8..988ec591ed 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;
+ }
}
}