diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
index 53665ab2750..ceaa772307f 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
@@ -480,6 +480,46 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen {
property.isInnerEnum = false;
property.isString = false;
}
+
+ Double maximum = asDouble(property.maximum);
+ if (property.dataType.equals("int") && maximum != null) {
+ if ((!property.exclusiveMaximum && asInteger(property.maximum) == null) || (property.exclusiveMaximum && asInteger((maximum + 1) + "") == null)) {
+ property.dataType = "long";
+ property.datatypeWithEnum = "long";
+ }
+ }
+
+ Double minimum = asDouble(property.minimum);
+ if (property.dataType.equals("int") && minimum != null) {
+ if ((!property.exclusiveMinimum && asInteger(property.minimum) == null) || (property.exclusiveMinimum && asInteger((minimum - 1) + "") == null)) {
+ property.dataType = "long";
+ property.datatypeWithEnum = "long";
+ }
+ }
+ }
+
+ /** If the value can be parsed as a double, returns the value, otherwise returns null */
+ public static Double asDouble(String strNum) {
+ if (strNum == null) {
+ return null;
+ }
+ try {
+ return Double.parseDouble(strNum);
+ } catch (NumberFormatException nfe) {
+ return null;
+ }
+ }
+
+ /** If the value can be parsed as an integer, returns the value, otherwise returns null */
+ public static Integer asInteger(String strNum) {
+ if (strNum == null) {
+ return null;
+ }
+ try {
+ return Integer.parseInt(strNum);
+ } catch (NumberFormatException nfe) {
+ return null;
+ }
}
@Override
diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/api.mustache
index eff9ec9313f..9331beec688 100644
--- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/api.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/api.mustache
@@ -436,7 +436,6 @@ namespace {{packageName}}.{{apiPackage}}
{{#queryParams}}
{{^required}}
if ({{paramName}}.IsSet)
- // here too
parseQueryStringLocalVar["{{baseName}}"] = ClientUtils.ParameterToString({{paramName}}.Value);
{{/required}}
diff --git a/modules/openapi-generator/src/main/resources/csharp/validatable.mustache b/modules/openapi-generator/src/main/resources/csharp/validatable.mustache
index a79db1a641a..429eed118e1 100644
--- a/modules/openapi-generator/src/main/resources/csharp/validatable.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/validatable.mustache
@@ -78,17 +78,17 @@
{{/minLength}}
{{#maximum}}
// {{{name}}} ({{{dataType}}}) maximum
- if ({{#useGenericHost}}{{^required}}this.{{{name}}}Option.IsSet && {{/required}}{{/useGenericHost}}this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} > ({{{dataType}}}){{maximum}})
+ if ({{#useGenericHost}}{{^required}}this.{{{name}}}Option.IsSet && {{/required}}{{/useGenericHost}}this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} {{#exclusiveMaximum}}<={{/exclusiveMaximum}}{{^exclusiveMaximum}}>{{/exclusiveMaximum}} ({{{dataType}}}){{maximum}})
{
- yield return new ValidationResult("Invalid value for {{{name}}}, must be a value less than or equal to {{maximum}}.", new [] { "{{{name}}}" });
+ yield return new ValidationResult("Invalid value for {{{name}}}, must be a value less than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}.", new [] { "{{{name}}}" });
}
{{/maximum}}
{{#minimum}}
// {{{name}}} ({{{dataType}}}) minimum
- if ({{#useGenericHost}}{{^required}}this.{{{name}}}Option.IsSet && {{/required}}{{/useGenericHost}}this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} < ({{{dataType}}}){{minimum}})
+ if ({{#useGenericHost}}{{^required}}this.{{{name}}}Option.IsSet && {{/required}}{{/useGenericHost}}this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} {{#exclusiveMaximum}}>={{/exclusiveMaximum}}{{^exclusiveMaximum}}<{{/exclusiveMaximum}} ({{{dataType}}}){{minimum}})
{
- yield return new ValidationResult("Invalid value for {{{name}}}, must be a value greater than or equal to {{minimum}}.", new [] { "{{{name}}}" });
+ yield return new ValidationResult("Invalid value for {{{name}}}, must be a value greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}.", new [] { "{{{name}}}" });
}
{{/minimum}}
diff --git a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
index 985ef28a398..51c27299631 100644
--- a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+++ b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
@@ -1684,6 +1684,24 @@ components:
format: int32
maximum: 200
minimum: 20
+ int32Range:
+ type: integer
+ maximum: 2147483647
+ minimum: -2147483648
+ int64Positive:
+ type: integer
+ minimum: 2147483648 # int.MaxValue + 1
+ int64Negative:
+ type: integer
+ maximum: -2147483649 # int.MinValue - 1
+ int64PositiveExclusive:
+ type: integer
+ minimum: 2147483647
+ exclusiveMinimum: true
+ int64NegativeExclusive:
+ type: integer
+ maximum: -2147483648
+ exclusiveMaximum: true
unsigned_integer:
type: integer
format: int32
diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml
index 0143839cb66..915be7ae8ba 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml
+++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml
@@ -1576,6 +1576,24 @@ components:
maximum: 200
minimum: 20
type: integer
+ int32Range:
+ maximum: 2147483647
+ minimum: -2147483648
+ type: integer
+ int64Positive:
+ minimum: 2147483648
+ type: integer
+ int64Negative:
+ maximum: -2147483649
+ type: integer
+ int64PositiveExclusive:
+ exclusiveMinimum: true
+ minimum: 2147483647
+ type: integer
+ int64NegativeExclusive:
+ exclusiveMaximum: true
+ maximum: -2147483648
+ type: integer
unsigned_integer:
format: int32
maximum: 200
diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/FormatTest.md
index 0983002c5da..5983bc09690 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/FormatTest.md
+++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/FormatTest.md
@@ -14,7 +14,12 @@ Name | Type | Description | Notes
**Double** | **double** | | [optional]
**Float** | **float** | | [optional]
**Int32** | **int** | | [optional]
+**Int32Range** | **int** | | [optional]
**Int64** | **long** | | [optional]
+**Int64Negative** | **long** | | [optional]
+**Int64NegativeExclusive** | **long** | | [optional]
+**Int64Positive** | **long** | | [optional]
+**Int64PositiveExclusive** | **long** | | [optional]
**Integer** | **int** | | [optional]
**PatternWithBackslash** | **string** | None | [optional]
**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs
index b658f317f1c..7dad1b08bc0 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs
+++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs
@@ -143,6 +143,15 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'Int32'
}
+ ///
+ /// Test the property 'Int32Range'
+ ///
+ [Fact]
+ public void Int32RangeTest()
+ {
+ // TODO unit test for the property 'Int32Range'
+ }
+
///
/// Test the property 'Int64'
///
@@ -152,6 +161,42 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'Int64'
}
+ ///
+ /// Test the property 'Int64Negative'
+ ///
+ [Fact]
+ public void Int64NegativeTest()
+ {
+ // TODO unit test for the property 'Int64Negative'
+ }
+
+ ///
+ /// Test the property 'Int64NegativeExclusive'
+ ///
+ [Fact]
+ public void Int64NegativeExclusiveTest()
+ {
+ // TODO unit test for the property 'Int64NegativeExclusive'
+ }
+
+ ///
+ /// Test the property 'Int64Positive'
+ ///
+ [Fact]
+ public void Int64PositiveTest()
+ {
+ // TODO unit test for the property 'Int64Positive'
+ }
+
+ ///
+ /// Test the property 'Int64PositiveExclusive'
+ ///
+ [Fact]
+ public void Int64PositiveExclusiveTest()
+ {
+ // TODO unit test for the property 'Int64PositiveExclusive'
+ }
+
///
/// Test the property 'Integer'
///
diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs
index 01eeeb00511..6ad90eba93c 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs
+++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs
@@ -4281,19 +4281,15 @@ namespace Org.OpenAPITools.Api
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
if (enumQueryStringArray.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value);
if (enumQueryString.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value);
if (enumQueryDouble.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value);
if (enumQueryInteger.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_integer"] = ClientUtils.ParameterToString(enumQueryInteger.Value);
uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString();
@@ -4530,11 +4526,9 @@ namespace Org.OpenAPITools.Api
parseQueryStringLocalVar["required_int64_group"] = ClientUtils.ParameterToString(requiredInt64Group);
if (stringGroup.IsSet)
- // here too
parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value);
if (int64Group.IsSet)
- // here too
parseQueryStringLocalVar["int64_group"] = ClientUtils.ParameterToString(int64Group.Value);
uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString();
@@ -5398,11 +5392,9 @@ namespace Org.OpenAPITools.Api
parseQueryStringLocalVar["requiredNullable"] = ClientUtils.ParameterToString(requiredNullable);
if (notRequiredNotNullable.IsSet)
- // here too
parseQueryStringLocalVar["notRequiredNotNullable"] = ClientUtils.ParameterToString(notRequiredNotNullable.Value);
if (notRequiredNullable.IsSet)
- // here too
parseQueryStringLocalVar["notRequiredNullable"] = ClientUtils.ParameterToString(notRequiredNullable.Value);
uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString();
diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs
index 3fc88d4d403..9aa5ea7d327 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs
+++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs
@@ -42,7 +42,12 @@ namespace Org.OpenAPITools.Model
/// double
/// float
/// int32
+ /// int32Range
/// int64
+ /// int64Negative
+ /// int64NegativeExclusive
+ /// int64Positive
+ /// int64PositiveExclusive
/// integer
/// None
/// A string that is a 10 digit number. Can have leading zeros.
@@ -52,7 +57,7 @@ namespace Org.OpenAPITools.Model
/// unsignedLong
/// uuid
[JsonConstructor]
- public FormatTest(byte[] @byte, DateTime date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int64 = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default)
+ public FormatTest(byte[] @byte, DateTime date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default)
{
Byte = @byte;
Date = date;
@@ -64,7 +69,12 @@ namespace Org.OpenAPITools.Model
DoubleOption = @double;
FloatOption = @float;
Int32Option = int32;
+ Int32RangeOption = int32Range;
Int64Option = int64;
+ Int64NegativeOption = int64Negative;
+ Int64NegativeExclusiveOption = int64NegativeExclusive;
+ Int64PositiveOption = int64Positive;
+ Int64PositiveExclusiveOption = int64PositiveExclusive;
IntegerOption = integer;
PatternWithBackslashOption = patternWithBackslash;
PatternWithDigitsOption = patternWithDigits;
@@ -182,6 +192,19 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("int32")]
public int? Int32 { get { return this.Int32Option; } set { this.Int32Option = new Option(value); } }
+ ///
+ /// Used to track the state of Int32Range
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int32RangeOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int32Range
+ ///
+ [JsonPropertyName("int32Range")]
+ public int? Int32Range { get { return this.Int32RangeOption; } set { this.Int32RangeOption = new Option(value); } }
+
///
/// Used to track the state of Int64
///
@@ -195,6 +218,58 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("int64")]
public long? Int64 { get { return this.Int64Option; } set { this.Int64Option = new Option(value); } }
+ ///
+ /// Used to track the state of Int64Negative
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64NegativeOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64Negative
+ ///
+ [JsonPropertyName("int64Negative")]
+ public long? Int64Negative { get { return this.Int64NegativeOption; } set { this.Int64NegativeOption = new Option(value); } }
+
+ ///
+ /// Used to track the state of Int64NegativeExclusive
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64NegativeExclusiveOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64NegativeExclusive
+ ///
+ [JsonPropertyName("int64NegativeExclusive")]
+ public long? Int64NegativeExclusive { get { return this.Int64NegativeExclusiveOption; } set { this.Int64NegativeExclusiveOption = new Option(value); } }
+
+ ///
+ /// Used to track the state of Int64Positive
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64PositiveOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64Positive
+ ///
+ [JsonPropertyName("int64Positive")]
+ public long? Int64Positive { get { return this.Int64PositiveOption; } set { this.Int64PositiveOption = new Option(value); } }
+
+ ///
+ /// Used to track the state of Int64PositiveExclusive
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64PositiveExclusiveOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64PositiveExclusive
+ ///
+ [JsonPropertyName("int64PositiveExclusive")]
+ public long? Int64PositiveExclusive { get { return this.Int64PositiveExclusiveOption; } set { this.Int64PositiveExclusiveOption = new Option(value); } }
+
///
/// Used to track the state of Integer
///
@@ -327,7 +402,12 @@ namespace Org.OpenAPITools.Model
sb.Append(" Double: ").Append(Double).Append("\n");
sb.Append(" Float: ").Append(Float).Append("\n");
sb.Append(" Int32: ").Append(Int32).Append("\n");
+ sb.Append(" Int32Range: ").Append(Int32Range).Append("\n");
sb.Append(" Int64: ").Append(Int64).Append("\n");
+ sb.Append(" Int64Negative: ").Append(Int64Negative).Append("\n");
+ sb.Append(" Int64NegativeExclusive: ").Append(Int64NegativeExclusive).Append("\n");
+ sb.Append(" Int64Positive: ").Append(Int64Positive).Append("\n");
+ sb.Append(" Int64PositiveExclusive: ").Append(Int64PositiveExclusive).Append("\n");
sb.Append(" Integer: ").Append(Integer).Append("\n");
sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n");
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
@@ -408,6 +488,42 @@ namespace Org.OpenAPITools.Model
yield return new ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
}
+ // Int32Range (int) maximum
+ if (this.Int32RangeOption.IsSet && this.Int32RangeOption.Value > (int)2147483647)
+ {
+ yield return new ValidationResult("Invalid value for Int32Range, must be a value less than or equal to 2147483647.", new [] { "Int32Range" });
+ }
+
+ // Int32Range (int) minimum
+ if (this.Int32RangeOption.IsSet && this.Int32RangeOption.Value < (int)-2147483648)
+ {
+ yield return new ValidationResult("Invalid value for Int32Range, must be a value greater than or equal to -2147483648.", new [] { "Int32Range" });
+ }
+
+ // Int64Negative (long) maximum
+ if (this.Int64NegativeOption.IsSet && this.Int64NegativeOption.Value > (long)-2147483649)
+ {
+ yield return new ValidationResult("Invalid value for Int64Negative, must be a value less than or equal to -2147483649.", new [] { "Int64Negative" });
+ }
+
+ // Int64NegativeExclusive (long) maximum
+ if (this.Int64NegativeExclusiveOption.IsSet && this.Int64NegativeExclusiveOption.Value <= (long)-2147483648)
+ {
+ yield return new ValidationResult("Invalid value for Int64NegativeExclusive, must be a value less than -2147483648.", new [] { "Int64NegativeExclusive" });
+ }
+
+ // Int64Positive (long) minimum
+ if (this.Int64PositiveOption.IsSet && this.Int64PositiveOption.Value < (long)2147483648)
+ {
+ yield return new ValidationResult("Invalid value for Int64Positive, must be a value greater than or equal to 2147483648.", new [] { "Int64Positive" });
+ }
+
+ // Int64PositiveExclusive (long) minimum
+ if (this.Int64PositiveExclusiveOption.IsSet && this.Int64PositiveExclusiveOption.Value < (long)2147483647)
+ {
+ yield return new ValidationResult("Invalid value for Int64PositiveExclusive, must be a value greater than 2147483647.", new [] { "Int64PositiveExclusive" });
+ }
+
// Integer (int) maximum
if (this.IntegerOption.IsSet && this.IntegerOption.Value > (int)100)
{
@@ -518,7 +634,12 @@ namespace Org.OpenAPITools.Model
Option varDouble = default;
Option varFloat = default;
Option int32 = default;
+ Option int32Range = default;
Option int64 = default;
+ Option int64Negative = default;
+ Option int64NegativeExclusive = default;
+ Option int64Positive = default;
+ Option int64PositiveExclusive = default;
Option integer = default;
Option patternWithBackslash = default;
Option patternWithDigits = default;
@@ -582,10 +703,30 @@ namespace Org.OpenAPITools.Model
if (utf8JsonReader.TokenType != JsonTokenType.Null)
int32 = new Option(utf8JsonReader.GetInt32());
break;
+ case "int32Range":
+ if (utf8JsonReader.TokenType != JsonTokenType.Null)
+ int32Range = new Option(utf8JsonReader.GetInt32());
+ break;
case "int64":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
int64 = new Option(utf8JsonReader.GetInt64());
break;
+ case "int64Negative":
+ if (utf8JsonReader.TokenType != JsonTokenType.Null)
+ int64Negative = new Option(utf8JsonReader.GetInt32());
+ break;
+ case "int64NegativeExclusive":
+ if (utf8JsonReader.TokenType != JsonTokenType.Null)
+ int64NegativeExclusive = new Option(utf8JsonReader.GetInt32());
+ break;
+ case "int64Positive":
+ if (utf8JsonReader.TokenType != JsonTokenType.Null)
+ int64Positive = new Option(utf8JsonReader.GetInt32());
+ break;
+ case "int64PositiveExclusive":
+ if (utf8JsonReader.TokenType != JsonTokenType.Null)
+ int64PositiveExclusive = new Option(utf8JsonReader.GetInt32());
+ break;
case "integer":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
integer = new Option(utf8JsonReader.GetInt32());
@@ -662,9 +803,24 @@ namespace Org.OpenAPITools.Model
if (int32.IsSet && int32.Value == null)
throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest.");
+ if (int32Range.IsSet && int32Range.Value == null)
+ throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest.");
+
if (int64.IsSet && int64.Value == null)
throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest.");
+ if (int64Negative.IsSet && int64Negative.Value == null)
+ throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest.");
+
+ if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null)
+ throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest.");
+
+ if (int64Positive.IsSet && int64Positive.Value == null)
+ throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest.");
+
+ if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null)
+ throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest.");
+
if (integer.IsSet && integer.Value == null)
throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest.");
@@ -689,7 +845,7 @@ namespace Org.OpenAPITools.Model
if (uuid.IsSet && uuid.Value == null)
throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest.");
- return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int64, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid);
+ return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid);
}
///
@@ -767,9 +923,24 @@ namespace Org.OpenAPITools.Model
if (formatTest.Int32Option.IsSet)
writer.WriteNumber("int32", formatTest.Int32Option.Value.Value);
+ if (formatTest.Int32RangeOption.IsSet)
+ writer.WriteNumber("int32Range", formatTest.Int32RangeOption.Value.Value);
+
if (formatTest.Int64Option.IsSet)
writer.WriteNumber("int64", formatTest.Int64Option.Value.Value);
+ if (formatTest.Int64NegativeOption.IsSet)
+ writer.WriteNumber("int64Negative", formatTest.Int64NegativeOption.Value.Value);
+
+ if (formatTest.Int64NegativeExclusiveOption.IsSet)
+ writer.WriteNumber("int64NegativeExclusive", formatTest.Int64NegativeExclusiveOption.Value.Value);
+
+ if (formatTest.Int64PositiveOption.IsSet)
+ writer.WriteNumber("int64Positive", formatTest.Int64PositiveOption.Value.Value);
+
+ if (formatTest.Int64PositiveExclusiveOption.IsSet)
+ writer.WriteNumber("int64PositiveExclusive", formatTest.Int64PositiveExclusiveOption.Value.Value);
+
if (formatTest.IntegerOption.IsSet)
writer.WriteNumber("integer", formatTest.IntegerOption.Value.Value);
diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml
index 95cd969e02c..ced7c2c5db9 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml
+++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml
@@ -1617,6 +1617,24 @@ components:
maximum: 200
minimum: 20
type: integer
+ int32Range:
+ maximum: 2147483647
+ minimum: -2147483648
+ type: integer
+ int64Positive:
+ minimum: 2147483648
+ type: integer
+ int64Negative:
+ maximum: -2147483649
+ type: integer
+ int64PositiveExclusive:
+ exclusiveMinimum: true
+ minimum: 2147483647
+ type: integer
+ int64NegativeExclusive:
+ exclusiveMaximum: true
+ maximum: -2147483648
+ type: integer
unsigned_integer:
format: int32
maximum: 200
diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/models/FormatTest.md
index 0983002c5da..5983bc09690 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/models/FormatTest.md
+++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/docs/models/FormatTest.md
@@ -14,7 +14,12 @@ Name | Type | Description | Notes
**Double** | **double** | | [optional]
**Float** | **float** | | [optional]
**Int32** | **int** | | [optional]
+**Int32Range** | **int** | | [optional]
**Int64** | **long** | | [optional]
+**Int64Negative** | **long** | | [optional]
+**Int64NegativeExclusive** | **long** | | [optional]
+**Int64Positive** | **long** | | [optional]
+**Int64PositiveExclusive** | **long** | | [optional]
**Integer** | **int** | | [optional]
**PatternWithBackslash** | **string** | None | [optional]
**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs
index b658f317f1c..7dad1b08bc0 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs
+++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs
@@ -143,6 +143,15 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'Int32'
}
+ ///
+ /// Test the property 'Int32Range'
+ ///
+ [Fact]
+ public void Int32RangeTest()
+ {
+ // TODO unit test for the property 'Int32Range'
+ }
+
///
/// Test the property 'Int64'
///
@@ -152,6 +161,42 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'Int64'
}
+ ///
+ /// Test the property 'Int64Negative'
+ ///
+ [Fact]
+ public void Int64NegativeTest()
+ {
+ // TODO unit test for the property 'Int64Negative'
+ }
+
+ ///
+ /// Test the property 'Int64NegativeExclusive'
+ ///
+ [Fact]
+ public void Int64NegativeExclusiveTest()
+ {
+ // TODO unit test for the property 'Int64NegativeExclusive'
+ }
+
+ ///
+ /// Test the property 'Int64Positive'
+ ///
+ [Fact]
+ public void Int64PositiveTest()
+ {
+ // TODO unit test for the property 'Int64Positive'
+ }
+
+ ///
+ /// Test the property 'Int64PositiveExclusive'
+ ///
+ [Fact]
+ public void Int64PositiveExclusiveTest()
+ {
+ // TODO unit test for the property 'Int64PositiveExclusive'
+ }
+
///
/// Test the property 'Integer'
///
diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs
index f0ab0b4ca0a..2303d5e4cc1 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs
+++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs
@@ -4293,19 +4293,15 @@ namespace Org.OpenAPITools.Api
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
if (enumQueryStringArray.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value);
if (enumQueryDouble.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value);
if (enumQueryInteger.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_integer"] = ClientUtils.ParameterToString(enumQueryInteger.Value);
if (enumQueryString.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value);
uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString();
@@ -4542,11 +4538,9 @@ namespace Org.OpenAPITools.Api
parseQueryStringLocalVar["required_int64_group"] = ClientUtils.ParameterToString(requiredInt64Group);
if (stringGroup.IsSet)
- // here too
parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value);
if (int64Group.IsSet)
- // here too
parseQueryStringLocalVar["int64_group"] = ClientUtils.ParameterToString(int64Group.Value);
uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString();
@@ -5410,11 +5404,9 @@ namespace Org.OpenAPITools.Api
parseQueryStringLocalVar["requiredNullable"] = ClientUtils.ParameterToString(requiredNullable);
if (notRequiredNotNullable.IsSet)
- // here too
parseQueryStringLocalVar["notRequiredNotNullable"] = ClientUtils.ParameterToString(notRequiredNotNullable.Value);
if (notRequiredNullable.IsSet)
- // here too
parseQueryStringLocalVar["notRequiredNullable"] = ClientUtils.ParameterToString(notRequiredNullable.Value);
uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString();
diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs
index 3fc88d4d403..9aa5ea7d327 100644
--- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs
+++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs
@@ -42,7 +42,12 @@ namespace Org.OpenAPITools.Model
/// double
/// float
/// int32
+ /// int32Range
/// int64
+ /// int64Negative
+ /// int64NegativeExclusive
+ /// int64Positive
+ /// int64PositiveExclusive
/// integer
/// None
/// A string that is a 10 digit number. Can have leading zeros.
@@ -52,7 +57,7 @@ namespace Org.OpenAPITools.Model
/// unsignedLong
/// uuid
[JsonConstructor]
- public FormatTest(byte[] @byte, DateTime date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int64 = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default)
+ public FormatTest(byte[] @byte, DateTime date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default)
{
Byte = @byte;
Date = date;
@@ -64,7 +69,12 @@ namespace Org.OpenAPITools.Model
DoubleOption = @double;
FloatOption = @float;
Int32Option = int32;
+ Int32RangeOption = int32Range;
Int64Option = int64;
+ Int64NegativeOption = int64Negative;
+ Int64NegativeExclusiveOption = int64NegativeExclusive;
+ Int64PositiveOption = int64Positive;
+ Int64PositiveExclusiveOption = int64PositiveExclusive;
IntegerOption = integer;
PatternWithBackslashOption = patternWithBackslash;
PatternWithDigitsOption = patternWithDigits;
@@ -182,6 +192,19 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("int32")]
public int? Int32 { get { return this.Int32Option; } set { this.Int32Option = new Option(value); } }
+ ///
+ /// Used to track the state of Int32Range
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int32RangeOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int32Range
+ ///
+ [JsonPropertyName("int32Range")]
+ public int? Int32Range { get { return this.Int32RangeOption; } set { this.Int32RangeOption = new Option(value); } }
+
///
/// Used to track the state of Int64
///
@@ -195,6 +218,58 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("int64")]
public long? Int64 { get { return this.Int64Option; } set { this.Int64Option = new Option(value); } }
+ ///
+ /// Used to track the state of Int64Negative
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64NegativeOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64Negative
+ ///
+ [JsonPropertyName("int64Negative")]
+ public long? Int64Negative { get { return this.Int64NegativeOption; } set { this.Int64NegativeOption = new Option(value); } }
+
+ ///
+ /// Used to track the state of Int64NegativeExclusive
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64NegativeExclusiveOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64NegativeExclusive
+ ///
+ [JsonPropertyName("int64NegativeExclusive")]
+ public long? Int64NegativeExclusive { get { return this.Int64NegativeExclusiveOption; } set { this.Int64NegativeExclusiveOption = new Option(value); } }
+
+ ///
+ /// Used to track the state of Int64Positive
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64PositiveOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64Positive
+ ///
+ [JsonPropertyName("int64Positive")]
+ public long? Int64Positive { get { return this.Int64PositiveOption; } set { this.Int64PositiveOption = new Option(value); } }
+
+ ///
+ /// Used to track the state of Int64PositiveExclusive
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64PositiveExclusiveOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64PositiveExclusive
+ ///
+ [JsonPropertyName("int64PositiveExclusive")]
+ public long? Int64PositiveExclusive { get { return this.Int64PositiveExclusiveOption; } set { this.Int64PositiveExclusiveOption = new Option(value); } }
+
///
/// Used to track the state of Integer
///
@@ -327,7 +402,12 @@ namespace Org.OpenAPITools.Model
sb.Append(" Double: ").Append(Double).Append("\n");
sb.Append(" Float: ").Append(Float).Append("\n");
sb.Append(" Int32: ").Append(Int32).Append("\n");
+ sb.Append(" Int32Range: ").Append(Int32Range).Append("\n");
sb.Append(" Int64: ").Append(Int64).Append("\n");
+ sb.Append(" Int64Negative: ").Append(Int64Negative).Append("\n");
+ sb.Append(" Int64NegativeExclusive: ").Append(Int64NegativeExclusive).Append("\n");
+ sb.Append(" Int64Positive: ").Append(Int64Positive).Append("\n");
+ sb.Append(" Int64PositiveExclusive: ").Append(Int64PositiveExclusive).Append("\n");
sb.Append(" Integer: ").Append(Integer).Append("\n");
sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n");
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
@@ -408,6 +488,42 @@ namespace Org.OpenAPITools.Model
yield return new ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
}
+ // Int32Range (int) maximum
+ if (this.Int32RangeOption.IsSet && this.Int32RangeOption.Value > (int)2147483647)
+ {
+ yield return new ValidationResult("Invalid value for Int32Range, must be a value less than or equal to 2147483647.", new [] { "Int32Range" });
+ }
+
+ // Int32Range (int) minimum
+ if (this.Int32RangeOption.IsSet && this.Int32RangeOption.Value < (int)-2147483648)
+ {
+ yield return new ValidationResult("Invalid value for Int32Range, must be a value greater than or equal to -2147483648.", new [] { "Int32Range" });
+ }
+
+ // Int64Negative (long) maximum
+ if (this.Int64NegativeOption.IsSet && this.Int64NegativeOption.Value > (long)-2147483649)
+ {
+ yield return new ValidationResult("Invalid value for Int64Negative, must be a value less than or equal to -2147483649.", new [] { "Int64Negative" });
+ }
+
+ // Int64NegativeExclusive (long) maximum
+ if (this.Int64NegativeExclusiveOption.IsSet && this.Int64NegativeExclusiveOption.Value <= (long)-2147483648)
+ {
+ yield return new ValidationResult("Invalid value for Int64NegativeExclusive, must be a value less than -2147483648.", new [] { "Int64NegativeExclusive" });
+ }
+
+ // Int64Positive (long) minimum
+ if (this.Int64PositiveOption.IsSet && this.Int64PositiveOption.Value < (long)2147483648)
+ {
+ yield return new ValidationResult("Invalid value for Int64Positive, must be a value greater than or equal to 2147483648.", new [] { "Int64Positive" });
+ }
+
+ // Int64PositiveExclusive (long) minimum
+ if (this.Int64PositiveExclusiveOption.IsSet && this.Int64PositiveExclusiveOption.Value < (long)2147483647)
+ {
+ yield return new ValidationResult("Invalid value for Int64PositiveExclusive, must be a value greater than 2147483647.", new [] { "Int64PositiveExclusive" });
+ }
+
// Integer (int) maximum
if (this.IntegerOption.IsSet && this.IntegerOption.Value > (int)100)
{
@@ -518,7 +634,12 @@ namespace Org.OpenAPITools.Model
Option varDouble = default;
Option varFloat = default;
Option int32 = default;
+ Option int32Range = default;
Option int64 = default;
+ Option int64Negative = default;
+ Option int64NegativeExclusive = default;
+ Option int64Positive = default;
+ Option int64PositiveExclusive = default;
Option integer = default;
Option patternWithBackslash = default;
Option patternWithDigits = default;
@@ -582,10 +703,30 @@ namespace Org.OpenAPITools.Model
if (utf8JsonReader.TokenType != JsonTokenType.Null)
int32 = new Option(utf8JsonReader.GetInt32());
break;
+ case "int32Range":
+ if (utf8JsonReader.TokenType != JsonTokenType.Null)
+ int32Range = new Option(utf8JsonReader.GetInt32());
+ break;
case "int64":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
int64 = new Option(utf8JsonReader.GetInt64());
break;
+ case "int64Negative":
+ if (utf8JsonReader.TokenType != JsonTokenType.Null)
+ int64Negative = new Option(utf8JsonReader.GetInt32());
+ break;
+ case "int64NegativeExclusive":
+ if (utf8JsonReader.TokenType != JsonTokenType.Null)
+ int64NegativeExclusive = new Option(utf8JsonReader.GetInt32());
+ break;
+ case "int64Positive":
+ if (utf8JsonReader.TokenType != JsonTokenType.Null)
+ int64Positive = new Option(utf8JsonReader.GetInt32());
+ break;
+ case "int64PositiveExclusive":
+ if (utf8JsonReader.TokenType != JsonTokenType.Null)
+ int64PositiveExclusive = new Option(utf8JsonReader.GetInt32());
+ break;
case "integer":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
integer = new Option(utf8JsonReader.GetInt32());
@@ -662,9 +803,24 @@ namespace Org.OpenAPITools.Model
if (int32.IsSet && int32.Value == null)
throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest.");
+ if (int32Range.IsSet && int32Range.Value == null)
+ throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest.");
+
if (int64.IsSet && int64.Value == null)
throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest.");
+ if (int64Negative.IsSet && int64Negative.Value == null)
+ throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest.");
+
+ if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null)
+ throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest.");
+
+ if (int64Positive.IsSet && int64Positive.Value == null)
+ throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest.");
+
+ if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null)
+ throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest.");
+
if (integer.IsSet && integer.Value == null)
throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest.");
@@ -689,7 +845,7 @@ namespace Org.OpenAPITools.Model
if (uuid.IsSet && uuid.Value == null)
throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest.");
- return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int64, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid);
+ return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid);
}
///
@@ -767,9 +923,24 @@ namespace Org.OpenAPITools.Model
if (formatTest.Int32Option.IsSet)
writer.WriteNumber("int32", formatTest.Int32Option.Value.Value);
+ if (formatTest.Int32RangeOption.IsSet)
+ writer.WriteNumber("int32Range", formatTest.Int32RangeOption.Value.Value);
+
if (formatTest.Int64Option.IsSet)
writer.WriteNumber("int64", formatTest.Int64Option.Value.Value);
+ if (formatTest.Int64NegativeOption.IsSet)
+ writer.WriteNumber("int64Negative", formatTest.Int64NegativeOption.Value.Value);
+
+ if (formatTest.Int64NegativeExclusiveOption.IsSet)
+ writer.WriteNumber("int64NegativeExclusive", formatTest.Int64NegativeExclusiveOption.Value.Value);
+
+ if (formatTest.Int64PositiveOption.IsSet)
+ writer.WriteNumber("int64Positive", formatTest.Int64PositiveOption.Value.Value);
+
+ if (formatTest.Int64PositiveExclusiveOption.IsSet)
+ writer.WriteNumber("int64PositiveExclusive", formatTest.Int64PositiveExclusiveOption.Value.Value);
+
if (formatTest.IntegerOption.IsSet)
writer.WriteNumber("integer", formatTest.IntegerOption.Value.Value);
diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml
index 0143839cb66..915be7ae8ba 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml
+++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml
@@ -1576,6 +1576,24 @@ components:
maximum: 200
minimum: 20
type: integer
+ int32Range:
+ maximum: 2147483647
+ minimum: -2147483648
+ type: integer
+ int64Positive:
+ minimum: 2147483648
+ type: integer
+ int64Negative:
+ maximum: -2147483649
+ type: integer
+ int64PositiveExclusive:
+ exclusiveMinimum: true
+ minimum: 2147483647
+ type: integer
+ int64NegativeExclusive:
+ exclusiveMaximum: true
+ maximum: -2147483648
+ type: integer
unsigned_integer:
format: int32
maximum: 200
diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/FormatTest.md
index 0983002c5da..5983bc09690 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/FormatTest.md
+++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/docs/models/FormatTest.md
@@ -14,7 +14,12 @@ Name | Type | Description | Notes
**Double** | **double** | | [optional]
**Float** | **float** | | [optional]
**Int32** | **int** | | [optional]
+**Int32Range** | **int** | | [optional]
**Int64** | **long** | | [optional]
+**Int64Negative** | **long** | | [optional]
+**Int64NegativeExclusive** | **long** | | [optional]
+**Int64Positive** | **long** | | [optional]
+**Int64PositiveExclusive** | **long** | | [optional]
**Integer** | **int** | | [optional]
**PatternWithBackslash** | **string** | None | [optional]
**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs
index b658f317f1c..7dad1b08bc0 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs
+++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs
@@ -143,6 +143,15 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'Int32'
}
+ ///
+ /// Test the property 'Int32Range'
+ ///
+ [Fact]
+ public void Int32RangeTest()
+ {
+ // TODO unit test for the property 'Int32Range'
+ }
+
///
/// Test the property 'Int64'
///
@@ -152,6 +161,42 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'Int64'
}
+ ///
+ /// Test the property 'Int64Negative'
+ ///
+ [Fact]
+ public void Int64NegativeTest()
+ {
+ // TODO unit test for the property 'Int64Negative'
+ }
+
+ ///
+ /// Test the property 'Int64NegativeExclusive'
+ ///
+ [Fact]
+ public void Int64NegativeExclusiveTest()
+ {
+ // TODO unit test for the property 'Int64NegativeExclusive'
+ }
+
+ ///
+ /// Test the property 'Int64Positive'
+ ///
+ [Fact]
+ public void Int64PositiveTest()
+ {
+ // TODO unit test for the property 'Int64Positive'
+ }
+
+ ///
+ /// Test the property 'Int64PositiveExclusive'
+ ///
+ [Fact]
+ public void Int64PositiveExclusiveTest()
+ {
+ // TODO unit test for the property 'Int64PositiveExclusive'
+ }
+
///
/// Test the property 'Integer'
///
diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs
index 01eeeb00511..6ad90eba93c 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs
+++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Api/FakeApi.cs
@@ -4281,19 +4281,15 @@ namespace Org.OpenAPITools.Api
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
if (enumQueryStringArray.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value);
if (enumQueryString.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value);
if (enumQueryDouble.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value);
if (enumQueryInteger.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_integer"] = ClientUtils.ParameterToString(enumQueryInteger.Value);
uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString();
@@ -4530,11 +4526,9 @@ namespace Org.OpenAPITools.Api
parseQueryStringLocalVar["required_int64_group"] = ClientUtils.ParameterToString(requiredInt64Group);
if (stringGroup.IsSet)
- // here too
parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value);
if (int64Group.IsSet)
- // here too
parseQueryStringLocalVar["int64_group"] = ClientUtils.ParameterToString(int64Group.Value);
uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString();
@@ -5398,11 +5392,9 @@ namespace Org.OpenAPITools.Api
parseQueryStringLocalVar["requiredNullable"] = ClientUtils.ParameterToString(requiredNullable);
if (notRequiredNotNullable.IsSet)
- // here too
parseQueryStringLocalVar["notRequiredNotNullable"] = ClientUtils.ParameterToString(notRequiredNotNullable.Value);
if (notRequiredNullable.IsSet)
- // here too
parseQueryStringLocalVar["notRequiredNullable"] = ClientUtils.ParameterToString(notRequiredNullable.Value);
uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString();
diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs
index 3fc88d4d403..9aa5ea7d327 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs
+++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/src/Org.OpenAPITools/Model/FormatTest.cs
@@ -42,7 +42,12 @@ namespace Org.OpenAPITools.Model
/// double
/// float
/// int32
+ /// int32Range
/// int64
+ /// int64Negative
+ /// int64NegativeExclusive
+ /// int64Positive
+ /// int64PositiveExclusive
/// integer
/// None
/// A string that is a 10 digit number. Can have leading zeros.
@@ -52,7 +57,7 @@ namespace Org.OpenAPITools.Model
/// unsignedLong
/// uuid
[JsonConstructor]
- public FormatTest(byte[] @byte, DateTime date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int64 = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default)
+ public FormatTest(byte[] @byte, DateTime date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default)
{
Byte = @byte;
Date = date;
@@ -64,7 +69,12 @@ namespace Org.OpenAPITools.Model
DoubleOption = @double;
FloatOption = @float;
Int32Option = int32;
+ Int32RangeOption = int32Range;
Int64Option = int64;
+ Int64NegativeOption = int64Negative;
+ Int64NegativeExclusiveOption = int64NegativeExclusive;
+ Int64PositiveOption = int64Positive;
+ Int64PositiveExclusiveOption = int64PositiveExclusive;
IntegerOption = integer;
PatternWithBackslashOption = patternWithBackslash;
PatternWithDigitsOption = patternWithDigits;
@@ -182,6 +192,19 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("int32")]
public int? Int32 { get { return this.Int32Option; } set { this.Int32Option = new Option(value); } }
+ ///
+ /// Used to track the state of Int32Range
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int32RangeOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int32Range
+ ///
+ [JsonPropertyName("int32Range")]
+ public int? Int32Range { get { return this.Int32RangeOption; } set { this.Int32RangeOption = new Option(value); } }
+
///
/// Used to track the state of Int64
///
@@ -195,6 +218,58 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("int64")]
public long? Int64 { get { return this.Int64Option; } set { this.Int64Option = new Option(value); } }
+ ///
+ /// Used to track the state of Int64Negative
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64NegativeOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64Negative
+ ///
+ [JsonPropertyName("int64Negative")]
+ public long? Int64Negative { get { return this.Int64NegativeOption; } set { this.Int64NegativeOption = new Option(value); } }
+
+ ///
+ /// Used to track the state of Int64NegativeExclusive
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64NegativeExclusiveOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64NegativeExclusive
+ ///
+ [JsonPropertyName("int64NegativeExclusive")]
+ public long? Int64NegativeExclusive { get { return this.Int64NegativeExclusiveOption; } set { this.Int64NegativeExclusiveOption = new Option(value); } }
+
+ ///
+ /// Used to track the state of Int64Positive
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64PositiveOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64Positive
+ ///
+ [JsonPropertyName("int64Positive")]
+ public long? Int64Positive { get { return this.Int64PositiveOption; } set { this.Int64PositiveOption = new Option(value); } }
+
+ ///
+ /// Used to track the state of Int64PositiveExclusive
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64PositiveExclusiveOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64PositiveExclusive
+ ///
+ [JsonPropertyName("int64PositiveExclusive")]
+ public long? Int64PositiveExclusive { get { return this.Int64PositiveExclusiveOption; } set { this.Int64PositiveExclusiveOption = new Option(value); } }
+
///
/// Used to track the state of Integer
///
@@ -327,7 +402,12 @@ namespace Org.OpenAPITools.Model
sb.Append(" Double: ").Append(Double).Append("\n");
sb.Append(" Float: ").Append(Float).Append("\n");
sb.Append(" Int32: ").Append(Int32).Append("\n");
+ sb.Append(" Int32Range: ").Append(Int32Range).Append("\n");
sb.Append(" Int64: ").Append(Int64).Append("\n");
+ sb.Append(" Int64Negative: ").Append(Int64Negative).Append("\n");
+ sb.Append(" Int64NegativeExclusive: ").Append(Int64NegativeExclusive).Append("\n");
+ sb.Append(" Int64Positive: ").Append(Int64Positive).Append("\n");
+ sb.Append(" Int64PositiveExclusive: ").Append(Int64PositiveExclusive).Append("\n");
sb.Append(" Integer: ").Append(Integer).Append("\n");
sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n");
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
@@ -408,6 +488,42 @@ namespace Org.OpenAPITools.Model
yield return new ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
}
+ // Int32Range (int) maximum
+ if (this.Int32RangeOption.IsSet && this.Int32RangeOption.Value > (int)2147483647)
+ {
+ yield return new ValidationResult("Invalid value for Int32Range, must be a value less than or equal to 2147483647.", new [] { "Int32Range" });
+ }
+
+ // Int32Range (int) minimum
+ if (this.Int32RangeOption.IsSet && this.Int32RangeOption.Value < (int)-2147483648)
+ {
+ yield return new ValidationResult("Invalid value for Int32Range, must be a value greater than or equal to -2147483648.", new [] { "Int32Range" });
+ }
+
+ // Int64Negative (long) maximum
+ if (this.Int64NegativeOption.IsSet && this.Int64NegativeOption.Value > (long)-2147483649)
+ {
+ yield return new ValidationResult("Invalid value for Int64Negative, must be a value less than or equal to -2147483649.", new [] { "Int64Negative" });
+ }
+
+ // Int64NegativeExclusive (long) maximum
+ if (this.Int64NegativeExclusiveOption.IsSet && this.Int64NegativeExclusiveOption.Value <= (long)-2147483648)
+ {
+ yield return new ValidationResult("Invalid value for Int64NegativeExclusive, must be a value less than -2147483648.", new [] { "Int64NegativeExclusive" });
+ }
+
+ // Int64Positive (long) minimum
+ if (this.Int64PositiveOption.IsSet && this.Int64PositiveOption.Value < (long)2147483648)
+ {
+ yield return new ValidationResult("Invalid value for Int64Positive, must be a value greater than or equal to 2147483648.", new [] { "Int64Positive" });
+ }
+
+ // Int64PositiveExclusive (long) minimum
+ if (this.Int64PositiveExclusiveOption.IsSet && this.Int64PositiveExclusiveOption.Value < (long)2147483647)
+ {
+ yield return new ValidationResult("Invalid value for Int64PositiveExclusive, must be a value greater than 2147483647.", new [] { "Int64PositiveExclusive" });
+ }
+
// Integer (int) maximum
if (this.IntegerOption.IsSet && this.IntegerOption.Value > (int)100)
{
@@ -518,7 +634,12 @@ namespace Org.OpenAPITools.Model
Option varDouble = default;
Option varFloat = default;
Option int32 = default;
+ Option int32Range = default;
Option int64 = default;
+ Option int64Negative = default;
+ Option int64NegativeExclusive = default;
+ Option int64Positive = default;
+ Option int64PositiveExclusive = default;
Option integer = default;
Option patternWithBackslash = default;
Option patternWithDigits = default;
@@ -582,10 +703,30 @@ namespace Org.OpenAPITools.Model
if (utf8JsonReader.TokenType != JsonTokenType.Null)
int32 = new Option(utf8JsonReader.GetInt32());
break;
+ case "int32Range":
+ if (utf8JsonReader.TokenType != JsonTokenType.Null)
+ int32Range = new Option(utf8JsonReader.GetInt32());
+ break;
case "int64":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
int64 = new Option(utf8JsonReader.GetInt64());
break;
+ case "int64Negative":
+ if (utf8JsonReader.TokenType != JsonTokenType.Null)
+ int64Negative = new Option(utf8JsonReader.GetInt32());
+ break;
+ case "int64NegativeExclusive":
+ if (utf8JsonReader.TokenType != JsonTokenType.Null)
+ int64NegativeExclusive = new Option(utf8JsonReader.GetInt32());
+ break;
+ case "int64Positive":
+ if (utf8JsonReader.TokenType != JsonTokenType.Null)
+ int64Positive = new Option(utf8JsonReader.GetInt32());
+ break;
+ case "int64PositiveExclusive":
+ if (utf8JsonReader.TokenType != JsonTokenType.Null)
+ int64PositiveExclusive = new Option(utf8JsonReader.GetInt32());
+ break;
case "integer":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
integer = new Option(utf8JsonReader.GetInt32());
@@ -662,9 +803,24 @@ namespace Org.OpenAPITools.Model
if (int32.IsSet && int32.Value == null)
throw new ArgumentNullException(nameof(int32), "Property is not nullable for class FormatTest.");
+ if (int32Range.IsSet && int32Range.Value == null)
+ throw new ArgumentNullException(nameof(int32Range), "Property is not nullable for class FormatTest.");
+
if (int64.IsSet && int64.Value == null)
throw new ArgumentNullException(nameof(int64), "Property is not nullable for class FormatTest.");
+ if (int64Negative.IsSet && int64Negative.Value == null)
+ throw new ArgumentNullException(nameof(int64Negative), "Property is not nullable for class FormatTest.");
+
+ if (int64NegativeExclusive.IsSet && int64NegativeExclusive.Value == null)
+ throw new ArgumentNullException(nameof(int64NegativeExclusive), "Property is not nullable for class FormatTest.");
+
+ if (int64Positive.IsSet && int64Positive.Value == null)
+ throw new ArgumentNullException(nameof(int64Positive), "Property is not nullable for class FormatTest.");
+
+ if (int64PositiveExclusive.IsSet && int64PositiveExclusive.Value == null)
+ throw new ArgumentNullException(nameof(int64PositiveExclusive), "Property is not nullable for class FormatTest.");
+
if (integer.IsSet && integer.Value == null)
throw new ArgumentNullException(nameof(integer), "Property is not nullable for class FormatTest.");
@@ -689,7 +845,7 @@ namespace Org.OpenAPITools.Model
if (uuid.IsSet && uuid.Value == null)
throw new ArgumentNullException(nameof(uuid), "Property is not nullable for class FormatTest.");
- return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int64, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid);
+ return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid);
}
///
@@ -767,9 +923,24 @@ namespace Org.OpenAPITools.Model
if (formatTest.Int32Option.IsSet)
writer.WriteNumber("int32", formatTest.Int32Option.Value.Value);
+ if (formatTest.Int32RangeOption.IsSet)
+ writer.WriteNumber("int32Range", formatTest.Int32RangeOption.Value.Value);
+
if (formatTest.Int64Option.IsSet)
writer.WriteNumber("int64", formatTest.Int64Option.Value.Value);
+ if (formatTest.Int64NegativeOption.IsSet)
+ writer.WriteNumber("int64Negative", formatTest.Int64NegativeOption.Value.Value);
+
+ if (formatTest.Int64NegativeExclusiveOption.IsSet)
+ writer.WriteNumber("int64NegativeExclusive", formatTest.Int64NegativeExclusiveOption.Value.Value);
+
+ if (formatTest.Int64PositiveOption.IsSet)
+ writer.WriteNumber("int64Positive", formatTest.Int64PositiveOption.Value.Value);
+
+ if (formatTest.Int64PositiveExclusiveOption.IsSet)
+ writer.WriteNumber("int64PositiveExclusive", formatTest.Int64PositiveExclusiveOption.Value.Value);
+
if (formatTest.IntegerOption.IsSet)
writer.WriteNumber("integer", formatTest.IntegerOption.Value.Value);
diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml
index 95cd969e02c..ced7c2c5db9 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml
+++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml
@@ -1617,6 +1617,24 @@ components:
maximum: 200
minimum: 20
type: integer
+ int32Range:
+ maximum: 2147483647
+ minimum: -2147483648
+ type: integer
+ int64Positive:
+ minimum: 2147483648
+ type: integer
+ int64Negative:
+ maximum: -2147483649
+ type: integer
+ int64PositiveExclusive:
+ exclusiveMinimum: true
+ minimum: 2147483647
+ type: integer
+ int64NegativeExclusive:
+ exclusiveMaximum: true
+ maximum: -2147483648
+ type: integer
unsigned_integer:
format: int32
maximum: 200
diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/models/FormatTest.md b/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/models/FormatTest.md
index 0983002c5da..5983bc09690 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/models/FormatTest.md
+++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/docs/models/FormatTest.md
@@ -14,7 +14,12 @@ Name | Type | Description | Notes
**Double** | **double** | | [optional]
**Float** | **float** | | [optional]
**Int32** | **int** | | [optional]
+**Int32Range** | **int** | | [optional]
**Int64** | **long** | | [optional]
+**Int64Negative** | **long** | | [optional]
+**Int64NegativeExclusive** | **long** | | [optional]
+**Int64Positive** | **long** | | [optional]
+**Int64PositiveExclusive** | **long** | | [optional]
**Integer** | **int** | | [optional]
**PatternWithBackslash** | **string** | None | [optional]
**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs
index b658f317f1c..7dad1b08bc0 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs
+++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs
@@ -143,6 +143,15 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'Int32'
}
+ ///
+ /// Test the property 'Int32Range'
+ ///
+ [Fact]
+ public void Int32RangeTest()
+ {
+ // TODO unit test for the property 'Int32Range'
+ }
+
///
/// Test the property 'Int64'
///
@@ -152,6 +161,42 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'Int64'
}
+ ///
+ /// Test the property 'Int64Negative'
+ ///
+ [Fact]
+ public void Int64NegativeTest()
+ {
+ // TODO unit test for the property 'Int64Negative'
+ }
+
+ ///
+ /// Test the property 'Int64NegativeExclusive'
+ ///
+ [Fact]
+ public void Int64NegativeExclusiveTest()
+ {
+ // TODO unit test for the property 'Int64NegativeExclusive'
+ }
+
+ ///
+ /// Test the property 'Int64Positive'
+ ///
+ [Fact]
+ public void Int64PositiveTest()
+ {
+ // TODO unit test for the property 'Int64Positive'
+ }
+
+ ///
+ /// Test the property 'Int64PositiveExclusive'
+ ///
+ [Fact]
+ public void Int64PositiveExclusiveTest()
+ {
+ // TODO unit test for the property 'Int64PositiveExclusive'
+ }
+
///
/// Test the property 'Integer'
///
diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs
index f0ab0b4ca0a..2303d5e4cc1 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs
+++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Api/FakeApi.cs
@@ -4293,19 +4293,15 @@ namespace Org.OpenAPITools.Api
System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty);
if (enumQueryStringArray.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_string_array"] = ClientUtils.ParameterToString(enumQueryStringArray.Value);
if (enumQueryDouble.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_double"] = ClientUtils.ParameterToString(enumQueryDouble.Value);
if (enumQueryInteger.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_integer"] = ClientUtils.ParameterToString(enumQueryInteger.Value);
if (enumQueryString.IsSet)
- // here too
parseQueryStringLocalVar["enum_query_string"] = ClientUtils.ParameterToString(enumQueryString.Value);
uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString();
@@ -4542,11 +4538,9 @@ namespace Org.OpenAPITools.Api
parseQueryStringLocalVar["required_int64_group"] = ClientUtils.ParameterToString(requiredInt64Group);
if (stringGroup.IsSet)
- // here too
parseQueryStringLocalVar["string_group"] = ClientUtils.ParameterToString(stringGroup.Value);
if (int64Group.IsSet)
- // here too
parseQueryStringLocalVar["int64_group"] = ClientUtils.ParameterToString(int64Group.Value);
uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString();
@@ -5410,11 +5404,9 @@ namespace Org.OpenAPITools.Api
parseQueryStringLocalVar["requiredNullable"] = ClientUtils.ParameterToString(requiredNullable);
if (notRequiredNotNullable.IsSet)
- // here too
parseQueryStringLocalVar["notRequiredNotNullable"] = ClientUtils.ParameterToString(notRequiredNotNullable.Value);
if (notRequiredNullable.IsSet)
- // here too
parseQueryStringLocalVar["notRequiredNullable"] = ClientUtils.ParameterToString(notRequiredNullable.Value);
uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString();
diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs
index 3fc88d4d403..9aa5ea7d327 100644
--- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs
+++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/src/Org.OpenAPITools/Model/FormatTest.cs
@@ -42,7 +42,12 @@ namespace Org.OpenAPITools.Model
/// double
/// float
/// int32
+ /// int32Range
/// int64
+ /// int64Negative
+ /// int64NegativeExclusive
+ /// int64Positive
+ /// int64PositiveExclusive
/// integer
/// None
/// A string that is a 10 digit number. Can have leading zeros.
@@ -52,7 +57,7 @@ namespace Org.OpenAPITools.Model
/// unsignedLong
/// uuid
[JsonConstructor]
- public FormatTest(byte[] @byte, DateTime date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int64 = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default)
+ public FormatTest(byte[] @byte, DateTime date, decimal number, string password, Option binary = default, Option dateTime = default, Option @decimal = default, Option @double = default, Option @float = default, Option int32 = default, Option int32Range = default, Option int64 = default, Option int64Negative = default, Option int64NegativeExclusive = default, Option int64Positive = default, Option int64PositiveExclusive = default, Option integer = default, Option patternWithBackslash = default, Option patternWithDigits = default, Option patternWithDigitsAndDelimiter = default, Option @string = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default)
{
Byte = @byte;
Date = date;
@@ -64,7 +69,12 @@ namespace Org.OpenAPITools.Model
DoubleOption = @double;
FloatOption = @float;
Int32Option = int32;
+ Int32RangeOption = int32Range;
Int64Option = int64;
+ Int64NegativeOption = int64Negative;
+ Int64NegativeExclusiveOption = int64NegativeExclusive;
+ Int64PositiveOption = int64Positive;
+ Int64PositiveExclusiveOption = int64PositiveExclusive;
IntegerOption = integer;
PatternWithBackslashOption = patternWithBackslash;
PatternWithDigitsOption = patternWithDigits;
@@ -182,6 +192,19 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("int32")]
public int? Int32 { get { return this.Int32Option; } set { this.Int32Option = new Option(value); } }
+ ///
+ /// Used to track the state of Int32Range
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int32RangeOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int32Range
+ ///
+ [JsonPropertyName("int32Range")]
+ public int? Int32Range { get { return this.Int32RangeOption; } set { this.Int32RangeOption = new Option(value); } }
+
///
/// Used to track the state of Int64
///
@@ -195,6 +218,58 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("int64")]
public long? Int64 { get { return this.Int64Option; } set { this.Int64Option = new Option(value); } }
+ ///
+ /// Used to track the state of Int64Negative
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64NegativeOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64Negative
+ ///
+ [JsonPropertyName("int64Negative")]
+ public long? Int64Negative { get { return this.Int64NegativeOption; } set { this.Int64NegativeOption = new Option(value); } }
+
+ ///
+ /// Used to track the state of Int64NegativeExclusive
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64NegativeExclusiveOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64NegativeExclusive
+ ///
+ [JsonPropertyName("int64NegativeExclusive")]
+ public long? Int64NegativeExclusive { get { return this.Int64NegativeExclusiveOption; } set { this.Int64NegativeExclusiveOption = new Option(value); } }
+
+ ///
+ /// Used to track the state of Int64Positive
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64PositiveOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64Positive
+ ///
+ [JsonPropertyName("int64Positive")]
+ public long? Int64Positive { get { return this.Int64PositiveOption; } set { this.Int64PositiveOption = new Option(value); } }
+
+ ///
+ /// Used to track the state of Int64PositiveExclusive
+ ///
+ [JsonIgnore]
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ public Option Int64PositiveExclusiveOption { get; private set; }
+
+ ///
+ /// Gets or Sets Int64PositiveExclusive
+ ///
+ [JsonPropertyName("int64PositiveExclusive")]
+ public long? Int64PositiveExclusive { get { return this.Int64PositiveExclusiveOption; } set { this.Int64PositiveExclusiveOption = new Option(value); } }
+
///
/// Used to track the state of Integer
///
@@ -327,7 +402,12 @@ namespace Org.OpenAPITools.Model
sb.Append(" Double: ").Append(Double).Append("\n");
sb.Append(" Float: ").Append(Float).Append("\n");
sb.Append(" Int32: ").Append(Int32).Append("\n");
+ sb.Append(" Int32Range: ").Append(Int32Range).Append("\n");
sb.Append(" Int64: ").Append(Int64).Append("\n");
+ sb.Append(" Int64Negative: ").Append(Int64Negative).Append("\n");
+ sb.Append(" Int64NegativeExclusive: ").Append(Int64NegativeExclusive).Append("\n");
+ sb.Append(" Int64Positive: ").Append(Int64Positive).Append("\n");
+ sb.Append(" Int64PositiveExclusive: ").Append(Int64PositiveExclusive).Append("\n");
sb.Append(" Integer: ").Append(Integer).Append("\n");
sb.Append(" PatternWithBackslash: ").Append(PatternWithBackslash).Append("\n");
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
@@ -408,6 +488,42 @@ namespace Org.OpenAPITools.Model
yield return new ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
}
+ // Int32Range (int) maximum
+ if (this.Int32RangeOption.IsSet && this.Int32RangeOption.Value > (int)2147483647)
+ {
+ yield return new ValidationResult("Invalid value for Int32Range, must be a value less than or equal to 2147483647.", new [] { "Int32Range" });
+ }
+
+ // Int32Range (int) minimum
+ if (this.Int32RangeOption.IsSet && this.Int32RangeOption.Value < (int)-2147483648)
+ {
+ yield return new ValidationResult("Invalid value for Int32Range, must be a value greater than or equal to -2147483648.", new [] { "Int32Range" });
+ }
+
+ // Int64Negative (long) maximum
+ if (this.Int64NegativeOption.IsSet && this.Int64NegativeOption.Value > (long)-2147483649)
+ {
+ yield return new ValidationResult("Invalid value for Int64Negative, must be a value less than or equal to -2147483649.", new [] { "Int64Negative" });
+ }
+
+ // Int64NegativeExclusive (long) maximum
+ if (this.Int64NegativeExclusiveOption.IsSet && this.Int64NegativeExclusiveOption.Value <= (long)-2147483648)
+ {
+ yield return new ValidationResult("Invalid value for Int64NegativeExclusive, must be a value less than -2147483648.", new [] { "Int64NegativeExclusive" });
+ }
+
+ // Int64Positive (long) minimum
+ if (this.Int64PositiveOption.IsSet && this.Int64PositiveOption.Value < (long)2147483648)
+ {
+ yield return new ValidationResult("Invalid value for Int64Positive, must be a value greater than or equal to 2147483648.", new [] { "Int64Positive" });
+ }
+
+ // Int64PositiveExclusive (long) minimum
+ if (this.Int64PositiveExclusiveOption.IsSet && this.Int64PositiveExclusiveOption.Value < (long)2147483647)
+ {
+ yield return new ValidationResult("Invalid value for Int64PositiveExclusive, must be a value greater than 2147483647.", new [] { "Int64PositiveExclusive" });
+ }
+
// Integer (int) maximum
if (this.IntegerOption.IsSet && this.IntegerOption.Value > (int)100)
{
@@ -518,7 +634,12 @@ namespace Org.OpenAPITools.Model
Option varDouble = default;
Option varFloat = default;
Option int32 = default;
+ Option