<PackageReference Include="NJsonSchema" Version="7.10.6235.25398" />

JsonSchemaGeneratorSettings

The JSON Schema generator settings.
using Newtonsoft.Json; using NJsonSchema.Generation.TypeMappers; using System.Collections.Generic; using System.Collections.ObjectModel; namespace NJsonSchema.Generation { public class JsonSchemaGeneratorSettings { public EnumHandling DefaultEnumHandling { get; set; } public PropertyNameHandling DefaultPropertyNameHandling { get; set; } public bool FlattenInheritanceHierarchy { get; set; } public bool GenerateKnownTypes { get; set; } = true; public bool GenerateXmlObjects { get; set; } public NullHandling NullHandling { get; set; } [JsonIgnore] public ITypeNameGenerator TypeNameGenerator { get; set; } [JsonIgnore] public ISchemaNameGenerator SchemaNameGenerator { get; set; } [JsonIgnore] public ICollection<ITypeMapper> TypeMappers { get; set; } = new Collection<ITypeMapper>(); public JsonSchemaGeneratorSettings() { DefaultEnumHandling = EnumHandling.Integer; NullHandling = NullHandling.JsonSchema; DefaultPropertyNameHandling = PropertyNameHandling.Default; TypeNameGenerator = new DefaultTypeNameGenerator(); SchemaNameGenerator = new DefaultSchemaNameGenerator(); } } }