File tree 3 files changed +0
-191
lines changed
NJsonSchema.CodeGeneration.CSharp
NJsonSchema.CodeGeneration.CSharp.Tests
3 files changed +0
-191
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -66,17 +66,6 @@ public PropertyModel(
66
66
( _property . ActualTypeSchema . IsDictionary && _settings . GenerateImmutableDictionaryProperties )
67
67
) ) == false ;
68
68
69
- /// <summary>Indicates whether or not this property has a <see cref="JsonIgnoreCondition"/>.</summary>
70
- public bool HasJsonIgnoreCondition => JsonIgnoreCondition != null ;
71
-
72
- /// <summary>Returns the System.Text.Json.Serialization.JsonIgnoreCondition value to be applied to the property.</summary>
73
- public string ? JsonIgnoreCondition => _property switch
74
- {
75
- { IsRequired : false } => "System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault" ,
76
- { IsRequired : true } when _settings . RequiredPropertiesMustBeDefined => "System.Text.Json.Serialization.JsonIgnoreCondition.Never" ,
77
- _ => null
78
- } ;
79
-
80
69
/// <summary>Gets the json property required.</summary>
81
70
public string JsonPropertyRequiredCode
82
71
{
Original file line number Diff line number Diff line change 53
53
{%- endif -%}
54
54
{%- if UseSystemTextJson %}
55
55
[System.Text.Json.Serialization.JsonPropertyName("{{ property .Name }}")]
56
- {%- if property .HasJsonIgnoreCondition %}
57
- [System.Text.Json.Serialization.JsonIgnore(Condition = {{ property .JsonIgnoreCondition }})]
58
- {%- endif -%}
59
56
{%- if property .IsStringEnumArray %}
60
57
// TODO(system.text.json): Add string enum item converter
61
58
{%- endif -%}
You can’t perform that action at this time.
0 commit comments