Home SchemaGeneratorConfiguration Class
SchemaGeneratorConfiguration Class
Cancel

SchemaGeneratorConfiguration Class

Namespace: Json.Schema.Generation

Inheritance: SchemaGeneratorConfiguration 🡒 object

Provides additional configuration for the generator.

Properties

NameTypeSummary
CurrentSchemaGeneratorConfigurationThread-static storage of the current configuration. Only to be used for reading the configuration. Setting values on this object will be overwritten when starting generation.
ExternalReferencesDictionary<Type, Uri>Allows mapping of types to external schema $ids. When encountering one of these types, a $ref keyword will be generated instead of a full schema.
GeneratorsList<ISchemaGenerator>A collection of generators in addition to the global set.
NullabilityNullabilityGets or sets whether to include null in the type keyword. Default is Json.Schema.Generation.Nullability.Disabled which means that it will not ever be included.
OptimizeboolGets or sets whether optimizations (moving common subschemas into $defs) will be performed. Default is true.
PropertyNameResolverPropertyNameResolverGets or sets the property name resolving method. Default is Json.Schema.Generation.PropertyNameResolvers.AsDeclared.
PropertyOrderPropertyOrderGets or sets the order in which properties will be listed in the schema.
RefinersList<ISchemaRefiner>A collection of refiners.
StrictConditionalsboolGets or sets whether properties that are affected by conditionals are defined globally or only within their respective then subschemas. True restricts those property definitions to then subschemas and adds a top-level unevaluatedProperties: false; false (default) defines them globally.

Constructors

SchemaGeneratorConfiguration()

Creates a new Json.Schema.Generation.SchemaGeneratorConfiguration.

Declaration

1
public SchemaGeneratorConfiguration()

Methods

RegisterXmlCommentFile(string filename)

Registers an assembly’s XML comment file.

Declaration

1
public void RegisterXmlCommentFile(string filename)
ParameterTypeDescription
filenamestringThe file name of the XML file.
Contents