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

JsonTypeDescription

public class JsonTypeDescription
Gets JSON information about a .NET type.
public string Format { get; }

Gets the format string.

public bool IsAny { get; }

Gets a value indicating whether this is an any type (e.g. object).

public bool IsComplexType { get; }

Gets a value indicating whether this is a complex type (i.e. object, dictionary or array).

public bool IsDictionary { get; }

Gets a value indicating whether the object is a generic dictionary.

public bool IsEnum { get; }

Gets a value indicating whether the type is an enum.

public bool IsNullable { get; set; }

Gets or sets a value indicating whether the type is nullable.

public JsonObjectType Type { get; }

Gets the type.

public static JsonTypeDescription Create(Type type, JsonObjectType jsonType, bool isNullable, string format)

Creates a description for a primitive type or object.

public static JsonTypeDescription CreateForDictionary(Type type, JsonObjectType jsonType, bool isNullable)

Creates a description for a dictionary.

public static JsonTypeDescription CreateForEnumeration(Type type, JsonObjectType jsonType, bool isNullable)

Creates a description for an enumeration.

public void ApplyType(JsonSchema4 schema)

Applies the type and format to the given schema.

Specifices whether the type requires a reference.