Skip to content

Commit d4cdaea

Browse files
committed
Add UseSystemTextJson to EnumTemplateModel, closes #1860
1 parent a42438e commit d4cdaea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/NJsonSchema.CodeGeneration.CSharp/Models/EnumTemplateModel.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@ public EnumTemplateModel(string typeName, JsonSchema schema, CSharpGeneratorSett
5151

5252
/// <summary>Gets or sets if we output as Bit Flags.</summary>
5353
public bool IsEnumAsBitFlags => _settings.EnforceFlagEnums || _schema.IsFlagEnumerable;
54+
55+
/// <summary>Gets a value indicating whether to use System.Text.Json</summary>
56+
public bool UseSystemTextJson => _settings.JsonLibrary == CSharpJsonLibrary.SystemTextJson;
5457

55-
/// <summary>Gets a value indicating whether the enum needs an other base type to representing an extended value range.</summary>
58+
/// <summary>Gets a value indicating whether the enum needs another base type to representing an extended value range.</summary>
5659
public bool HasExtendedValueRange => _schema.Format == JsonFormatStrings.Long;
5760

5861
/// <summary>Gets the enum values.</summary>

0 commit comments

Comments
 (0)