forked from loafle/openapi-generator-original
update more samples
This commit is contained in:
parent
5a9b0fcf9e
commit
fc7dda8db9
@ -1,5 +1 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
5.0.0-SNAPSHOT
|
5.0.0-SNAPSHOT
|
||||||
=======
|
|
||||||
4.3.1-SNAPSHOT
|
|
||||||
>>>>>>> origin/master
|
|
||||||
|
@ -1,5 +1 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
5.0.0-SNAPSHOT
|
5.0.0-SNAPSHOT
|
||||||
=======
|
|
||||||
4.3.1-SNAPSHOT
|
|
||||||
>>>>>>> origin/master
|
|
||||||
|
@ -367,6 +367,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <returns>Validation Result</returns>
|
/// <returns>Validation Result</returns>
|
||||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
// Integer (int) maximum
|
// Integer (int) maximum
|
||||||
if(this.Integer > (int)100)
|
if(this.Integer > (int)100)
|
||||||
{
|
{
|
||||||
@ -379,6 +381,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Int32 (int) maximum
|
// Int32 (int) maximum
|
||||||
if(this.Int32 > (int)200)
|
if(this.Int32 > (int)200)
|
||||||
{
|
{
|
||||||
@ -391,6 +395,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Number (decimal) maximum
|
// Number (decimal) maximum
|
||||||
if(this.Number > (decimal)543.2)
|
if(this.Number > (decimal)543.2)
|
||||||
{
|
{
|
||||||
@ -403,6 +409,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Float (float) maximum
|
// Float (float) maximum
|
||||||
if(this.Float > (float)987.6)
|
if(this.Float > (float)987.6)
|
||||||
{
|
{
|
||||||
@ -415,6 +423,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Double (double) maximum
|
// Double (double) maximum
|
||||||
if(this.Double > (double)123.4)
|
if(this.Double > (double)123.4)
|
||||||
{
|
{
|
||||||
@ -427,6 +437,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// String (string) pattern
|
// String (string) pattern
|
||||||
Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||||
if (false == regexString.Match(this.String).Success)
|
if (false == regexString.Match(this.String).Success)
|
||||||
@ -434,6 +446,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Password (string) maxLength
|
// Password (string) maxLength
|
||||||
if(this.Password != null && this.Password.Length > 64)
|
if(this.Password != null && this.Password.Length > 64)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
5.0.0-SNAPSHOT
|
5.0.0-SNAPSHOT
|
||||||
=======
|
|
||||||
4.3.1-SNAPSHOT
|
|
||||||
>>>>>>> origin/master
|
|
||||||
|
@ -1,5 +1 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
5.0.0-SNAPSHOT
|
5.0.0-SNAPSHOT
|
||||||
=======
|
|
||||||
4.3.1-SNAPSHOT
|
|
||||||
>>>>>>> origin/master
|
|
||||||
|
@ -390,6 +390,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <returns>Validation Result</returns>
|
/// <returns>Validation Result</returns>
|
||||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
// Integer (int) maximum
|
// Integer (int) maximum
|
||||||
if(this.Integer > (int)100)
|
if(this.Integer > (int)100)
|
||||||
{
|
{
|
||||||
@ -402,6 +404,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Int32 (int) maximum
|
// Int32 (int) maximum
|
||||||
if(this.Int32 > (int)200)
|
if(this.Int32 > (int)200)
|
||||||
{
|
{
|
||||||
@ -414,6 +418,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Number (decimal) maximum
|
// Number (decimal) maximum
|
||||||
if(this.Number > (decimal)543.2)
|
if(this.Number > (decimal)543.2)
|
||||||
{
|
{
|
||||||
@ -426,6 +432,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Float (float) maximum
|
// Float (float) maximum
|
||||||
if(this.Float > (float)987.6)
|
if(this.Float > (float)987.6)
|
||||||
{
|
{
|
||||||
@ -438,6 +446,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Double (double) maximum
|
// Double (double) maximum
|
||||||
if(this.Double > (double)123.4)
|
if(this.Double > (double)123.4)
|
||||||
{
|
{
|
||||||
@ -450,6 +460,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// String (string) pattern
|
// String (string) pattern
|
||||||
Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||||
if (false == regexString.Match(this.String).Success)
|
if (false == regexString.Match(this.String).Success)
|
||||||
@ -457,6 +469,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" });
|
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Password (string) maxLength
|
// Password (string) maxLength
|
||||||
if(this.Password != null && this.Password.Length > 64)
|
if(this.Password != null && this.Password.Length > 64)
|
||||||
{
|
{
|
||||||
|
@ -1 +1 @@
|
|||||||
4.3.0-SNAPSHOT
|
5.0.0-SNAPSHOT
|
@ -121,11 +121,7 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<<<<<<< HEAD
|
|
||||||
<openapi-generator-version>5.0.0-SNAPSHOT</openapi-generator-version>
|
<openapi-generator-version>5.0.0-SNAPSHOT</openapi-generator-version>
|
||||||
=======
|
|
||||||
<openapi-generator-version>4.3.1-SNAPSHOT</openapi-generator-version>
|
|
||||||
>>>>>>> origin/master
|
|
||||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||||
<junit-version>4.8.1</junit-version>
|
<junit-version>4.8.1</junit-version>
|
||||||
</properties>
|
</properties>
|
||||||
|
@ -1,5 +1 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
5.0.0-SNAPSHOT
|
5.0.0-SNAPSHOT
|
||||||
=======
|
|
||||||
4.3.1-SNAPSHOT
|
|
||||||
>>>>>>> origin/master
|
|
||||||
|
@ -1,5 +1 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
5.0.0-SNAPSHOT
|
5.0.0-SNAPSHOT
|
||||||
=======
|
|
||||||
4.3.1-SNAPSHOT
|
|
||||||
>>>>>>> origin/master
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user