Skip to content

Commit

Permalink
Merge branch 'fix_issue18541' of https://github.com/jpduchon/openapi-…
Browse files Browse the repository at this point in the history
…generator into jpduchon-fix_issue18541
  • Loading branch information
wing328 committed Jun 19, 2024
2 parents 9919c23 + 319b3cc commit bae9226
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@
{{^conditionalSerialization}}
[DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})]
{{#isDate}}
{{^supportsDateOnly}}
[JsonConverter(typeof(OpenAPIDateConverter))]
{{/supportsDateOnly}}
{{/isDate}}
{{#deprecated}}
[Obsolete]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public DateOnlyClass(DateOnly dateOnlyProperty = default(DateOnly))
/// </summary>
/// <example>Fri Jul 21 00:00:00 UTC 2017</example>
[DataMember(Name = "dateOnlyProperty", EmitDefaultValue = false)]
[JsonConverter(typeof(OpenAPIDateConverter))]
public DateOnly DateOnlyProperty { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ public FormatTest(int integer = default(int), int int32 = default(int), uint uns
/// </summary>
/// <example>Sun Feb 02 00:00:00 UTC 2020</example>
[DataMember(Name = "date", IsRequired = true, EmitDefaultValue = true)]
[JsonConverter(typeof(OpenAPIDateConverter))]
public DateOnly Date { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ public NullableClass(int? integerProp = default(int?), decimal? numberProp = def
/// Gets or Sets DateProp
/// </summary>
[DataMember(Name = "date_prop", EmitDefaultValue = true)]
[JsonConverter(typeof(OpenAPIDateConverter))]
public DateOnly DateProp { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -708,28 +708,24 @@ public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requi
/// Gets or Sets RequiredNullableDateProp
/// </summary>
[DataMember(Name = "required_nullable_date_prop", IsRequired = true, EmitDefaultValue = true)]
[JsonConverter(typeof(OpenAPIDateConverter))]
public DateOnly RequiredNullableDateProp { get; set; }

/// <summary>
/// Gets or Sets RequiredNotNullableDateProp
/// </summary>
[DataMember(Name = "required_not_nullable_date_prop", IsRequired = true, EmitDefaultValue = true)]
[JsonConverter(typeof(OpenAPIDateConverter))]
public DateOnly RequiredNotNullableDateProp { get; set; }

/// <summary>
/// Gets or Sets NotRequiredNullableDateProp
/// </summary>
[DataMember(Name = "not_required_nullable_date_prop", EmitDefaultValue = true)]
[JsonConverter(typeof(OpenAPIDateConverter))]
public DateOnly NotRequiredNullableDateProp { get; set; }

/// <summary>
/// Gets or Sets NotRequiredNotnullableDateProp
/// </summary>
[DataMember(Name = "not_required_notnullable_date_prop", EmitDefaultValue = false)]
[JsonConverter(typeof(OpenAPIDateConverter))]
public DateOnly NotRequiredNotnullableDateProp { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public DateOnlyClass(DateOnly dateOnlyProperty = default(DateOnly))
/// </summary>
/// <example>Fri Jul 21 00:00:00 UTC 2017</example>
[DataMember(Name = "dateOnlyProperty", EmitDefaultValue = false)]
[JsonConverter(typeof(OpenAPIDateConverter))]
public DateOnly DateOnlyProperty { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ public FormatTest(int integer = default(int), int int32 = default(int), uint uns
/// </summary>
/// <example>Sun Feb 02 00:00:00 UTC 2020</example>
[DataMember(Name = "date", IsRequired = true, EmitDefaultValue = true)]
[JsonConverter(typeof(OpenAPIDateConverter))]
public DateOnly Date { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ public NullableClass(int? integerProp = default(int?), decimal? numberProp = def
/// Gets or Sets DateProp
/// </summary>
[DataMember(Name = "date_prop", EmitDefaultValue = true)]
[JsonConverter(typeof(OpenAPIDateConverter))]
public DateOnly DateProp { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,28 +704,24 @@ public RequiredClass(int? requiredNullableIntegerProp = default(int?), int requi
/// Gets or Sets RequiredNullableDateProp
/// </summary>
[DataMember(Name = "required_nullable_date_prop", IsRequired = true, EmitDefaultValue = true)]
[JsonConverter(typeof(OpenAPIDateConverter))]
public DateOnly RequiredNullableDateProp { get; set; }

/// <summary>
/// Gets or Sets RequiredNotNullableDateProp
/// </summary>
[DataMember(Name = "required_not_nullable_date_prop", IsRequired = true, EmitDefaultValue = true)]
[JsonConverter(typeof(OpenAPIDateConverter))]
public DateOnly RequiredNotNullableDateProp { get; set; }

/// <summary>
/// Gets or Sets NotRequiredNullableDateProp
/// </summary>
[DataMember(Name = "not_required_nullable_date_prop", EmitDefaultValue = true)]
[JsonConverter(typeof(OpenAPIDateConverter))]
public DateOnly NotRequiredNullableDateProp { get; set; }

/// <summary>
/// Gets or Sets NotRequiredNotnullableDateProp
/// </summary>
[DataMember(Name = "not_required_notnullable_date_prop", EmitDefaultValue = false)]
[JsonConverter(typeof(OpenAPIDateConverter))]
public DateOnly NotRequiredNotnullableDateProp { get; set; }

/// <summary>
Expand Down

0 comments on commit bae9226

Please sign in to comment.