Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Rico Suter committed Sep 26, 2023
2 parents 07efd7d + e4f8001 commit dbc1d05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NJsonSchema.CodeGeneration.CSharp/Models/PropertyModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public string JsonPropertyRequiredCode
{
if (_settings.RequiredPropertiesMustBeDefined && _property.IsRequired)
{
if (!_property.IsNullable(_settings.SchemaType))
if (!IsNullable)
{
return "Newtonsoft.Json.Required.Always";
}
Expand All @@ -94,7 +94,7 @@ public string JsonPropertyRequiredCode
}
else
{
if (!_property.IsNullable(_settings.SchemaType))
if (!IsNullable)
{
return "Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore";
}
Expand Down

0 comments on commit dbc1d05

Please sign in to comment.