diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/JsonConverter.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/JsonConverter.mustache
index 2328f9ce1f2..fedb2f5a170 100644
--- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/JsonConverter.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/JsonConverter.mustache
@@ -179,7 +179,12 @@
{{^isMap}}
{{^isEnum}}
{{^isUuid}}
+ {{#isDecimal}}
+ {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetDecimal());
+ {{/isDecimal}}
+ {{^isDecimal}}
{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetString(){{^isNullable}}{{nrt!}}{{/isNullable}});
+ {{/isDecimal}}
{{/isUuid}}
{{/isEnum}}
{{/isMap}}
@@ -439,7 +444,12 @@
{{^isEnum}}
{{^isUuid}}
{{#lambda.copyText}}
+ {{#isDecimal}}
+ writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}.ToString());
+ {{/isDecimal}}
+ {{^isDecimal}}
writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}});
+ {{/isDecimal}}
{{/lambda.copyText}}
{{#lambda.indent3}}
{{>WriteProperty}}
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 0133dffade3..8837f52ee83 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
@@ -1673,6 +1673,7 @@ components:
- byte
- date
- password
+ - string_formatted_as_decimal_required
properties:
integer:
type: integer
@@ -1771,6 +1772,12 @@ components:
description: None
type: string
pattern: '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$'
+ string_formatted_as_decimal:
+ format: decimal
+ type: string
+ string_formatted_as_decimal_required:
+ format: decimal
+ type: string
EnumClass:
type: string
default: '-efg'
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 b48dbb1f448..7bfc0de5a41 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
@@ -1665,11 +1665,18 @@ components:
pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\\
/([0-9]|[1-2][0-9]|3[0-2]))$"
type: string
+ string_formatted_as_decimal:
+ format: decimal
+ type: string
+ string_formatted_as_decimal_required:
+ format: decimal
+ type: string
required:
- byte
- date
- number
- password
+ - string_formatted_as_decimal_required
type: object
EnumClass:
default: -efg
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 5983bc09690..950546c1812 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
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
**Date** | **DateTime** | |
**Number** | **decimal** | |
**Password** | **string** | |
+**StringFormattedAsDecimalRequired** | **decimal** | |
**Binary** | **System.IO.Stream** | | [optional]
**DateTime** | **DateTime** | | [optional]
**Decimal** | **decimal** | | [optional]
@@ -25,6 +26,7 @@ Name | Type | Description | Notes
**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
**PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
**String** | **string** | | [optional]
+**StringFormattedAsDecimal** | **decimal** | | [optional]
**UnsignedInteger** | **uint** | | [optional]
**UnsignedLong** | **ulong** | | [optional]
**Uuid** | **Guid** | | [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 7dad1b08bc0..fe89f7090c4 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
@@ -89,6 +89,15 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'Password'
}
+ ///
+ /// Test the property 'StringFormattedAsDecimalRequired'
+ ///
+ [Fact]
+ public void StringFormattedAsDecimalRequiredTest()
+ {
+ // TODO unit test for the property 'StringFormattedAsDecimalRequired'
+ }
+
///
/// Test the property 'Binary'
///
@@ -242,6 +251,15 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'String'
}
+ ///
+ /// Test the property 'StringFormattedAsDecimal'
+ ///
+ [Fact]
+ public void StringFormattedAsDecimalTest()
+ {
+ // TODO unit test for the property 'StringFormattedAsDecimal'
+ }
+
///
/// Test the property 'UnsignedInteger'
///
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 a4410d55b34..1887346c88b 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
@@ -36,6 +36,7 @@ namespace Org.OpenAPITools.Model
/// date
/// number
/// password
+ /// stringFormattedAsDecimalRequired
/// binary
/// dateTime
/// decimal
@@ -53,16 +54,18 @@ namespace Org.OpenAPITools.Model
/// A string that is a 10 digit number. Can have leading zeros.
/// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.
/// string
+ /// stringFormattedAsDecimal
/// unsignedInteger
/// 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 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)
+ public FormatTest(byte[] @byte, DateTime date, decimal number, string password, decimal stringFormattedAsDecimalRequired, 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 stringFormattedAsDecimal = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default)
{
Byte = @byte;
Date = date;
Number = number;
Password = password;
+ StringFormattedAsDecimalRequired = stringFormattedAsDecimalRequired;
BinaryOption = binary;
DateTimeOption = dateTime;
DecimalOption = @decimal;
@@ -80,6 +83,7 @@ namespace Org.OpenAPITools.Model
PatternWithDigitsOption = patternWithDigits;
PatternWithDigitsAndDelimiterOption = patternWithDigitsAndDelimiter;
StringOption = @string;
+ StringFormattedAsDecimalOption = stringFormattedAsDecimal;
UnsignedIntegerOption = unsignedInteger;
UnsignedLongOption = unsignedLong;
UuidOption = uuid;
@@ -113,6 +117,12 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("password")]
public string Password { get; set; }
+ ///
+ /// Gets or Sets StringFormattedAsDecimalRequired
+ ///
+ [JsonPropertyName("string_formatted_as_decimal_required")]
+ public decimal StringFormattedAsDecimalRequired { get; set; }
+
///
/// Used to track the state of Binary
///
@@ -338,6 +348,19 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("string")]
public string String { get { return this.StringOption; } set { this.StringOption = new Option(value); } }
+ ///
+ /// Used to track the state of StringFormattedAsDecimal
+ ///
+ [JsonIgnore]
+ [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
+ public Option StringFormattedAsDecimalOption { get; private set; }
+
+ ///
+ /// Gets or Sets StringFormattedAsDecimal
+ ///
+ [JsonPropertyName("string_formatted_as_decimal")]
+ public decimal? StringFormattedAsDecimal { get { return this.StringFormattedAsDecimalOption; } set { this.StringFormattedAsDecimalOption = new Option(value); } }
+
///
/// Used to track the state of UnsignedInteger
///
@@ -396,6 +419,7 @@ namespace Org.OpenAPITools.Model
sb.Append(" Date: ").Append(Date).Append("\n");
sb.Append(" Number: ").Append(Number).Append("\n");
sb.Append(" Password: ").Append(Password).Append("\n");
+ sb.Append(" StringFormattedAsDecimalRequired: ").Append(StringFormattedAsDecimalRequired).Append("\n");
sb.Append(" Binary: ").Append(Binary).Append("\n");
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
sb.Append(" Decimal: ").Append(Decimal).Append("\n");
@@ -413,6 +437,7 @@ namespace Org.OpenAPITools.Model
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n");
sb.Append(" String: ").Append(String).Append("\n");
+ sb.Append(" StringFormattedAsDecimal: ").Append(StringFormattedAsDecimal).Append("\n");
sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n");
sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n");
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
@@ -628,6 +653,7 @@ namespace Org.OpenAPITools.Model
Option date = default;
Option number = default;
Option password = default;
+ Option stringFormattedAsDecimalRequired = default;
Option binary = default;
Option dateTime = default;
Option varDecimal = default;
@@ -645,6 +671,7 @@ namespace Org.OpenAPITools.Model
Option patternWithDigits = default;
Option patternWithDigitsAndDelimiter = default;
Option varString = default;
+ Option stringFormattedAsDecimal = default;
Option unsignedInteger = default;
Option unsignedLong = default;
Option uuid = default;
@@ -676,6 +703,9 @@ namespace Org.OpenAPITools.Model
case "password":
password = new Option(utf8JsonReader.GetString());
break;
+ case "string_formatted_as_decimal_required":
+ stringFormattedAsDecimalRequired = new Option(utf8JsonReader.GetDecimal());
+ break;
case "binary":
binary = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions));
break;
@@ -727,6 +757,9 @@ namespace Org.OpenAPITools.Model
case "string":
varString = new Option(utf8JsonReader.GetString());
break;
+ case "string_formatted_as_decimal":
+ stringFormattedAsDecimal = new Option(utf8JsonReader.GetDecimal());
+ break;
case "unsigned_integer":
unsignedInteger = new Option(utf8JsonReader.TokenType == JsonTokenType.Null ? (uint?)null : utf8JsonReader.GetUInt32());
break;
@@ -754,6 +787,9 @@ namespace Org.OpenAPITools.Model
if (!password.IsSet)
throw new ArgumentException("Property is required for class FormatTest.", nameof(password));
+ if (!stringFormattedAsDecimalRequired.IsSet)
+ throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired));
+
if (varByte.IsSet && varByte.Value == null)
throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest.");
@@ -766,6 +802,9 @@ namespace Org.OpenAPITools.Model
if (password.IsSet && password.Value == null)
throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest.");
+ if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null)
+ throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest.");
+
if (binary.IsSet && binary.Value == null)
throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest.");
@@ -817,6 +856,9 @@ namespace Org.OpenAPITools.Model
if (varString.IsSet && varString.Value == null)
throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest.");
+ if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null)
+ throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest.");
+
if (unsignedInteger.IsSet && unsignedInteger.Value == null)
throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest.");
@@ -826,7 +868,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, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid);
+ return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, stringFormattedAsDecimalRequired.Value.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid);
}
///
@@ -882,6 +924,8 @@ namespace Org.OpenAPITools.Model
writer.WriteString("password", formatTest.Password);
+ writer.WriteString("string_formatted_as_decimal_required", formatTest.StringFormattedAsDecimalRequired.ToString());
+
if (formatTest.BinaryOption.IsSet)
{
writer.WritePropertyName("binary");
@@ -937,6 +981,9 @@ namespace Org.OpenAPITools.Model
if (formatTest.StringOption.IsSet)
writer.WriteString("string", formatTest.String);
+ if (formatTest.StringFormattedAsDecimalOption.IsSet)
+ writer.WriteString("string_formatted_as_decimal", formatTest.StringFormattedAsDecimal.ToString());
+
if (formatTest.UnsignedIntegerOption.IsSet)
writer.WriteNumber("unsigned_integer", formatTest.UnsignedIntegerOption.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 dfcb36db638..4f007819a1a 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
@@ -1706,11 +1706,18 @@ components:
pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\\
/([0-9]|[1-2][0-9]|3[0-2]))$"
type: string
+ string_formatted_as_decimal:
+ format: decimal
+ type: string
+ string_formatted_as_decimal_required:
+ format: decimal
+ type: string
required:
- byte
- date
- number
- password
+ - string_formatted_as_decimal_required
type: object
EnumClass:
default: -efg
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 5983bc09690..950546c1812 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
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
**Date** | **DateTime** | |
**Number** | **decimal** | |
**Password** | **string** | |
+**StringFormattedAsDecimalRequired** | **decimal** | |
**Binary** | **System.IO.Stream** | | [optional]
**DateTime** | **DateTime** | | [optional]
**Decimal** | **decimal** | | [optional]
@@ -25,6 +26,7 @@ Name | Type | Description | Notes
**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
**PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
**String** | **string** | | [optional]
+**StringFormattedAsDecimal** | **decimal** | | [optional]
**UnsignedInteger** | **uint** | | [optional]
**UnsignedLong** | **ulong** | | [optional]
**Uuid** | **Guid** | | [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 7dad1b08bc0..fe89f7090c4 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
@@ -89,6 +89,15 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'Password'
}
+ ///
+ /// Test the property 'StringFormattedAsDecimalRequired'
+ ///
+ [Fact]
+ public void StringFormattedAsDecimalRequiredTest()
+ {
+ // TODO unit test for the property 'StringFormattedAsDecimalRequired'
+ }
+
///
/// Test the property 'Binary'
///
@@ -242,6 +251,15 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'String'
}
+ ///
+ /// Test the property 'StringFormattedAsDecimal'
+ ///
+ [Fact]
+ public void StringFormattedAsDecimalTest()
+ {
+ // TODO unit test for the property 'StringFormattedAsDecimal'
+ }
+
///
/// Test the property 'UnsignedInteger'
///
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 a4410d55b34..1887346c88b 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
@@ -36,6 +36,7 @@ namespace Org.OpenAPITools.Model
/// date
/// number
/// password
+ /// stringFormattedAsDecimalRequired
/// binary
/// dateTime
/// decimal
@@ -53,16 +54,18 @@ namespace Org.OpenAPITools.Model
/// A string that is a 10 digit number. Can have leading zeros.
/// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.
/// string
+ /// stringFormattedAsDecimal
/// unsignedInteger
/// 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 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)
+ public FormatTest(byte[] @byte, DateTime date, decimal number, string password, decimal stringFormattedAsDecimalRequired, 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 stringFormattedAsDecimal = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default)
{
Byte = @byte;
Date = date;
Number = number;
Password = password;
+ StringFormattedAsDecimalRequired = stringFormattedAsDecimalRequired;
BinaryOption = binary;
DateTimeOption = dateTime;
DecimalOption = @decimal;
@@ -80,6 +83,7 @@ namespace Org.OpenAPITools.Model
PatternWithDigitsOption = patternWithDigits;
PatternWithDigitsAndDelimiterOption = patternWithDigitsAndDelimiter;
StringOption = @string;
+ StringFormattedAsDecimalOption = stringFormattedAsDecimal;
UnsignedIntegerOption = unsignedInteger;
UnsignedLongOption = unsignedLong;
UuidOption = uuid;
@@ -113,6 +117,12 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("password")]
public string Password { get; set; }
+ ///
+ /// Gets or Sets StringFormattedAsDecimalRequired
+ ///
+ [JsonPropertyName("string_formatted_as_decimal_required")]
+ public decimal StringFormattedAsDecimalRequired { get; set; }
+
///
/// Used to track the state of Binary
///
@@ -338,6 +348,19 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("string")]
public string String { get { return this.StringOption; } set { this.StringOption = new Option(value); } }
+ ///
+ /// Used to track the state of StringFormattedAsDecimal
+ ///
+ [JsonIgnore]
+ [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
+ public Option StringFormattedAsDecimalOption { get; private set; }
+
+ ///
+ /// Gets or Sets StringFormattedAsDecimal
+ ///
+ [JsonPropertyName("string_formatted_as_decimal")]
+ public decimal? StringFormattedAsDecimal { get { return this.StringFormattedAsDecimalOption; } set { this.StringFormattedAsDecimalOption = new Option(value); } }
+
///
/// Used to track the state of UnsignedInteger
///
@@ -396,6 +419,7 @@ namespace Org.OpenAPITools.Model
sb.Append(" Date: ").Append(Date).Append("\n");
sb.Append(" Number: ").Append(Number).Append("\n");
sb.Append(" Password: ").Append(Password).Append("\n");
+ sb.Append(" StringFormattedAsDecimalRequired: ").Append(StringFormattedAsDecimalRequired).Append("\n");
sb.Append(" Binary: ").Append(Binary).Append("\n");
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
sb.Append(" Decimal: ").Append(Decimal).Append("\n");
@@ -413,6 +437,7 @@ namespace Org.OpenAPITools.Model
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n");
sb.Append(" String: ").Append(String).Append("\n");
+ sb.Append(" StringFormattedAsDecimal: ").Append(StringFormattedAsDecimal).Append("\n");
sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n");
sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n");
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
@@ -628,6 +653,7 @@ namespace Org.OpenAPITools.Model
Option date = default;
Option number = default;
Option password = default;
+ Option stringFormattedAsDecimalRequired = default;
Option binary = default;
Option dateTime = default;
Option varDecimal = default;
@@ -645,6 +671,7 @@ namespace Org.OpenAPITools.Model
Option patternWithDigits = default;
Option patternWithDigitsAndDelimiter = default;
Option varString = default;
+ Option stringFormattedAsDecimal = default;
Option unsignedInteger = default;
Option unsignedLong = default;
Option uuid = default;
@@ -676,6 +703,9 @@ namespace Org.OpenAPITools.Model
case "password":
password = new Option(utf8JsonReader.GetString());
break;
+ case "string_formatted_as_decimal_required":
+ stringFormattedAsDecimalRequired = new Option(utf8JsonReader.GetDecimal());
+ break;
case "binary":
binary = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions));
break;
@@ -727,6 +757,9 @@ namespace Org.OpenAPITools.Model
case "string":
varString = new Option(utf8JsonReader.GetString());
break;
+ case "string_formatted_as_decimal":
+ stringFormattedAsDecimal = new Option(utf8JsonReader.GetDecimal());
+ break;
case "unsigned_integer":
unsignedInteger = new Option(utf8JsonReader.TokenType == JsonTokenType.Null ? (uint?)null : utf8JsonReader.GetUInt32());
break;
@@ -754,6 +787,9 @@ namespace Org.OpenAPITools.Model
if (!password.IsSet)
throw new ArgumentException("Property is required for class FormatTest.", nameof(password));
+ if (!stringFormattedAsDecimalRequired.IsSet)
+ throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired));
+
if (varByte.IsSet && varByte.Value == null)
throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest.");
@@ -766,6 +802,9 @@ namespace Org.OpenAPITools.Model
if (password.IsSet && password.Value == null)
throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest.");
+ if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null)
+ throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest.");
+
if (binary.IsSet && binary.Value == null)
throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest.");
@@ -817,6 +856,9 @@ namespace Org.OpenAPITools.Model
if (varString.IsSet && varString.Value == null)
throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest.");
+ if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null)
+ throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest.");
+
if (unsignedInteger.IsSet && unsignedInteger.Value == null)
throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest.");
@@ -826,7 +868,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, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid);
+ return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, stringFormattedAsDecimalRequired.Value.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid);
}
///
@@ -882,6 +924,8 @@ namespace Org.OpenAPITools.Model
writer.WriteString("password", formatTest.Password);
+ writer.WriteString("string_formatted_as_decimal_required", formatTest.StringFormattedAsDecimalRequired.ToString());
+
if (formatTest.BinaryOption.IsSet)
{
writer.WritePropertyName("binary");
@@ -937,6 +981,9 @@ namespace Org.OpenAPITools.Model
if (formatTest.StringOption.IsSet)
writer.WriteString("string", formatTest.String);
+ if (formatTest.StringFormattedAsDecimalOption.IsSet)
+ writer.WriteString("string_formatted_as_decimal", formatTest.StringFormattedAsDecimal.ToString());
+
if (formatTest.UnsignedIntegerOption.IsSet)
writer.WriteNumber("unsigned_integer", formatTest.UnsignedIntegerOption.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 b48dbb1f448..7bfc0de5a41 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
@@ -1665,11 +1665,18 @@ components:
pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\\
/([0-9]|[1-2][0-9]|3[0-2]))$"
type: string
+ string_formatted_as_decimal:
+ format: decimal
+ type: string
+ string_formatted_as_decimal_required:
+ format: decimal
+ type: string
required:
- byte
- date
- number
- password
+ - string_formatted_as_decimal_required
type: object
EnumClass:
default: -efg
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 5983bc09690..950546c1812 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
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
**Date** | **DateTime** | |
**Number** | **decimal** | |
**Password** | **string** | |
+**StringFormattedAsDecimalRequired** | **decimal** | |
**Binary** | **System.IO.Stream** | | [optional]
**DateTime** | **DateTime** | | [optional]
**Decimal** | **decimal** | | [optional]
@@ -25,6 +26,7 @@ Name | Type | Description | Notes
**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
**PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
**String** | **string** | | [optional]
+**StringFormattedAsDecimal** | **decimal** | | [optional]
**UnsignedInteger** | **uint** | | [optional]
**UnsignedLong** | **ulong** | | [optional]
**Uuid** | **Guid** | | [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 7dad1b08bc0..fe89f7090c4 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
@@ -89,6 +89,15 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'Password'
}
+ ///
+ /// Test the property 'StringFormattedAsDecimalRequired'
+ ///
+ [Fact]
+ public void StringFormattedAsDecimalRequiredTest()
+ {
+ // TODO unit test for the property 'StringFormattedAsDecimalRequired'
+ }
+
///
/// Test the property 'Binary'
///
@@ -242,6 +251,15 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'String'
}
+ ///
+ /// Test the property 'StringFormattedAsDecimal'
+ ///
+ [Fact]
+ public void StringFormattedAsDecimalTest()
+ {
+ // TODO unit test for the property 'StringFormattedAsDecimal'
+ }
+
///
/// Test the property 'UnsignedInteger'
///
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 a4410d55b34..1887346c88b 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
@@ -36,6 +36,7 @@ namespace Org.OpenAPITools.Model
/// date
/// number
/// password
+ /// stringFormattedAsDecimalRequired
/// binary
/// dateTime
/// decimal
@@ -53,16 +54,18 @@ namespace Org.OpenAPITools.Model
/// A string that is a 10 digit number. Can have leading zeros.
/// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.
/// string
+ /// stringFormattedAsDecimal
/// unsignedInteger
/// 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 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)
+ public FormatTest(byte[] @byte, DateTime date, decimal number, string password, decimal stringFormattedAsDecimalRequired, 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 stringFormattedAsDecimal = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default)
{
Byte = @byte;
Date = date;
Number = number;
Password = password;
+ StringFormattedAsDecimalRequired = stringFormattedAsDecimalRequired;
BinaryOption = binary;
DateTimeOption = dateTime;
DecimalOption = @decimal;
@@ -80,6 +83,7 @@ namespace Org.OpenAPITools.Model
PatternWithDigitsOption = patternWithDigits;
PatternWithDigitsAndDelimiterOption = patternWithDigitsAndDelimiter;
StringOption = @string;
+ StringFormattedAsDecimalOption = stringFormattedAsDecimal;
UnsignedIntegerOption = unsignedInteger;
UnsignedLongOption = unsignedLong;
UuidOption = uuid;
@@ -113,6 +117,12 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("password")]
public string Password { get; set; }
+ ///
+ /// Gets or Sets StringFormattedAsDecimalRequired
+ ///
+ [JsonPropertyName("string_formatted_as_decimal_required")]
+ public decimal StringFormattedAsDecimalRequired { get; set; }
+
///
/// Used to track the state of Binary
///
@@ -338,6 +348,19 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("string")]
public string String { get { return this.StringOption; } set { this.StringOption = new Option(value); } }
+ ///
+ /// Used to track the state of StringFormattedAsDecimal
+ ///
+ [JsonIgnore]
+ [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
+ public Option StringFormattedAsDecimalOption { get; private set; }
+
+ ///
+ /// Gets or Sets StringFormattedAsDecimal
+ ///
+ [JsonPropertyName("string_formatted_as_decimal")]
+ public decimal? StringFormattedAsDecimal { get { return this.StringFormattedAsDecimalOption; } set { this.StringFormattedAsDecimalOption = new Option(value); } }
+
///
/// Used to track the state of UnsignedInteger
///
@@ -396,6 +419,7 @@ namespace Org.OpenAPITools.Model
sb.Append(" Date: ").Append(Date).Append("\n");
sb.Append(" Number: ").Append(Number).Append("\n");
sb.Append(" Password: ").Append(Password).Append("\n");
+ sb.Append(" StringFormattedAsDecimalRequired: ").Append(StringFormattedAsDecimalRequired).Append("\n");
sb.Append(" Binary: ").Append(Binary).Append("\n");
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
sb.Append(" Decimal: ").Append(Decimal).Append("\n");
@@ -413,6 +437,7 @@ namespace Org.OpenAPITools.Model
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n");
sb.Append(" String: ").Append(String).Append("\n");
+ sb.Append(" StringFormattedAsDecimal: ").Append(StringFormattedAsDecimal).Append("\n");
sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n");
sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n");
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
@@ -628,6 +653,7 @@ namespace Org.OpenAPITools.Model
Option date = default;
Option number = default;
Option password = default;
+ Option stringFormattedAsDecimalRequired = default;
Option binary = default;
Option dateTime = default;
Option varDecimal = default;
@@ -645,6 +671,7 @@ namespace Org.OpenAPITools.Model
Option patternWithDigits = default;
Option patternWithDigitsAndDelimiter = default;
Option varString = default;
+ Option stringFormattedAsDecimal = default;
Option unsignedInteger = default;
Option unsignedLong = default;
Option uuid = default;
@@ -676,6 +703,9 @@ namespace Org.OpenAPITools.Model
case "password":
password = new Option(utf8JsonReader.GetString());
break;
+ case "string_formatted_as_decimal_required":
+ stringFormattedAsDecimalRequired = new Option(utf8JsonReader.GetDecimal());
+ break;
case "binary":
binary = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions));
break;
@@ -727,6 +757,9 @@ namespace Org.OpenAPITools.Model
case "string":
varString = new Option(utf8JsonReader.GetString());
break;
+ case "string_formatted_as_decimal":
+ stringFormattedAsDecimal = new Option(utf8JsonReader.GetDecimal());
+ break;
case "unsigned_integer":
unsignedInteger = new Option(utf8JsonReader.TokenType == JsonTokenType.Null ? (uint?)null : utf8JsonReader.GetUInt32());
break;
@@ -754,6 +787,9 @@ namespace Org.OpenAPITools.Model
if (!password.IsSet)
throw new ArgumentException("Property is required for class FormatTest.", nameof(password));
+ if (!stringFormattedAsDecimalRequired.IsSet)
+ throw new ArgumentException("Property is required for class FormatTest.", nameof(stringFormattedAsDecimalRequired));
+
if (varByte.IsSet && varByte.Value == null)
throw new ArgumentNullException(nameof(varByte), "Property is not nullable for class FormatTest.");
@@ -766,6 +802,9 @@ namespace Org.OpenAPITools.Model
if (password.IsSet && password.Value == null)
throw new ArgumentNullException(nameof(password), "Property is not nullable for class FormatTest.");
+ if (stringFormattedAsDecimalRequired.IsSet && stringFormattedAsDecimalRequired.Value == null)
+ throw new ArgumentNullException(nameof(stringFormattedAsDecimalRequired), "Property is not nullable for class FormatTest.");
+
if (binary.IsSet && binary.Value == null)
throw new ArgumentNullException(nameof(binary), "Property is not nullable for class FormatTest.");
@@ -817,6 +856,9 @@ namespace Org.OpenAPITools.Model
if (varString.IsSet && varString.Value == null)
throw new ArgumentNullException(nameof(varString), "Property is not nullable for class FormatTest.");
+ if (stringFormattedAsDecimal.IsSet && stringFormattedAsDecimal.Value == null)
+ throw new ArgumentNullException(nameof(stringFormattedAsDecimal), "Property is not nullable for class FormatTest.");
+
if (unsignedInteger.IsSet && unsignedInteger.Value == null)
throw new ArgumentNullException(nameof(unsignedInteger), "Property is not nullable for class FormatTest.");
@@ -826,7 +868,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, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, unsignedInteger, unsignedLong, uuid);
+ return new FormatTest(varByte.Value, date.Value.Value, number.Value.Value, password.Value, stringFormattedAsDecimalRequired.Value.Value, binary, dateTime, varDecimal, varDouble, varFloat, int32, int32Range, int64, int64Negative, int64NegativeExclusive, int64Positive, int64PositiveExclusive, integer, patternWithBackslash, patternWithDigits, patternWithDigitsAndDelimiter, varString, stringFormattedAsDecimal, unsignedInteger, unsignedLong, uuid);
}
///
@@ -882,6 +924,8 @@ namespace Org.OpenAPITools.Model
writer.WriteString("password", formatTest.Password);
+ writer.WriteString("string_formatted_as_decimal_required", formatTest.StringFormattedAsDecimalRequired.ToString());
+
if (formatTest.BinaryOption.IsSet)
{
writer.WritePropertyName("binary");
@@ -937,6 +981,9 @@ namespace Org.OpenAPITools.Model
if (formatTest.StringOption.IsSet)
writer.WriteString("string", formatTest.String);
+ if (formatTest.StringFormattedAsDecimalOption.IsSet)
+ writer.WriteString("string_formatted_as_decimal", formatTest.StringFormattedAsDecimal.ToString());
+
if (formatTest.UnsignedIntegerOption.IsSet)
writer.WriteNumber("unsigned_integer", formatTest.UnsignedIntegerOption.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 dfcb36db638..4f007819a1a 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
@@ -1706,11 +1706,18 @@ components:
pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\\
/([0-9]|[1-2][0-9]|3[0-2]))$"
type: string
+ string_formatted_as_decimal:
+ format: decimal
+ type: string
+ string_formatted_as_decimal_required:
+ format: decimal
+ type: string
required:
- byte
- date
- number
- password
+ - string_formatted_as_decimal_required
type: object
EnumClass:
default: -efg
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 5983bc09690..950546c1812 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
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
**Date** | **DateTime** | |
**Number** | **decimal** | |
**Password** | **string** | |
+**StringFormattedAsDecimalRequired** | **decimal** | |
**Binary** | **System.IO.Stream** | | [optional]
**DateTime** | **DateTime** | | [optional]
**Decimal** | **decimal** | | [optional]
@@ -25,6 +26,7 @@ Name | Type | Description | Notes
**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
**PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
**String** | **string** | | [optional]
+**StringFormattedAsDecimal** | **decimal** | | [optional]
**UnsignedInteger** | **uint** | | [optional]
**UnsignedLong** | **ulong** | | [optional]
**Uuid** | **Guid** | | [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 7dad1b08bc0..fe89f7090c4 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
@@ -89,6 +89,15 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'Password'
}
+ ///
+ /// Test the property 'StringFormattedAsDecimalRequired'
+ ///
+ [Fact]
+ public void StringFormattedAsDecimalRequiredTest()
+ {
+ // TODO unit test for the property 'StringFormattedAsDecimalRequired'
+ }
+
///
/// Test the property 'Binary'
///
@@ -242,6 +251,15 @@ namespace Org.OpenAPITools.Test.Model
// TODO unit test for the property 'String'
}
+ ///
+ /// Test the property 'StringFormattedAsDecimal'
+ ///
+ [Fact]
+ public void StringFormattedAsDecimalTest()
+ {
+ // TODO unit test for the property 'StringFormattedAsDecimal'
+ }
+
///
/// Test the property 'UnsignedInteger'
///
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 a4410d55b34..1887346c88b 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
@@ -36,6 +36,7 @@ namespace Org.OpenAPITools.Model
/// date
/// number
/// password
+ /// stringFormattedAsDecimalRequired
/// binary
/// dateTime
/// decimal
@@ -53,16 +54,18 @@ namespace Org.OpenAPITools.Model
/// A string that is a 10 digit number. Can have leading zeros.
/// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.
/// string
+ /// stringFormattedAsDecimal
/// unsignedInteger
/// 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 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)
+ public FormatTest(byte[] @byte, DateTime date, decimal number, string password, decimal stringFormattedAsDecimalRequired, 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 stringFormattedAsDecimal = default, Option unsignedInteger = default, Option unsignedLong = default, Option uuid = default)
{
Byte = @byte;
Date = date;
Number = number;
Password = password;
+ StringFormattedAsDecimalRequired = stringFormattedAsDecimalRequired;
BinaryOption = binary;
DateTimeOption = dateTime;
DecimalOption = @decimal;
@@ -80,6 +83,7 @@ namespace Org.OpenAPITools.Model
PatternWithDigitsOption = patternWithDigits;
PatternWithDigitsAndDelimiterOption = patternWithDigitsAndDelimiter;
StringOption = @string;
+ StringFormattedAsDecimalOption = stringFormattedAsDecimal;
UnsignedIntegerOption = unsignedInteger;
UnsignedLongOption = unsignedLong;
UuidOption = uuid;
@@ -113,6 +117,12 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("password")]
public string Password { get; set; }
+ ///
+ /// Gets or Sets StringFormattedAsDecimalRequired
+ ///
+ [JsonPropertyName("string_formatted_as_decimal_required")]
+ public decimal StringFormattedAsDecimalRequired { get; set; }
+
///
/// Used to track the state of Binary
///
@@ -338,6 +348,19 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("string")]
public string String { get { return this.StringOption; } set { this.StringOption = new Option(value); } }
+ ///
+ /// Used to track the state of StringFormattedAsDecimal
+ ///
+ [JsonIgnore]
+ [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
+ public Option StringFormattedAsDecimalOption { get; private set; }
+
+ ///
+ /// Gets or Sets StringFormattedAsDecimal
+ ///
+ [JsonPropertyName("string_formatted_as_decimal")]
+ public decimal? StringFormattedAsDecimal { get { return this.StringFormattedAsDecimalOption; } set { this.StringFormattedAsDecimalOption = new Option(value); } }
+
///
/// Used to track the state of UnsignedInteger
///
@@ -396,6 +419,7 @@ namespace Org.OpenAPITools.Model
sb.Append(" Date: ").Append(Date).Append("\n");
sb.Append(" Number: ").Append(Number).Append("\n");
sb.Append(" Password: ").Append(Password).Append("\n");
+ sb.Append(" StringFormattedAsDecimalRequired: ").Append(StringFormattedAsDecimalRequired).Append("\n");
sb.Append(" Binary: ").Append(Binary).Append("\n");
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
sb.Append(" Decimal: ").Append(Decimal).Append("\n");
@@ -413,6 +437,7 @@ namespace Org.OpenAPITools.Model
sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n");
sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n");
sb.Append(" String: ").Append(String).Append("\n");
+ sb.Append(" StringFormattedAsDecimal: ").Append(StringFormattedAsDecimal).Append("\n");
sb.Append(" UnsignedInteger: ").Append(UnsignedInteger).Append("\n");
sb.Append(" UnsignedLong: ").Append(UnsignedLong).Append("\n");
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
@@ -628,6 +653,7 @@ namespace Org.OpenAPITools.Model
Option date = default;
Option number = default;
Option password = default;
+ Option stringFormattedAsDecimalRequired = default;
Option binary = default;
Option dateTime = default;
Option varDecimal = default;
@@ -645,6 +671,7 @@ namespace Org.OpenAPITools.Model
Option patternWithDigits = default;
Option patternWithDigitsAndDelimiter = default;
Option varString = default;
+ Option stringFormattedAsDecimal = default;
Option unsignedInteger = default;
Option