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

JsonSchemaGenerator

public class JsonSchemaGenerator
Generates a JsonSchema4 object for a given type.

Gets the settings.

Initializes a new instance of the JsonSchemaGenerator class.

public JsonSchema4 Generate(Type type, ISchemaResolver schemaResolver)

Generates a JsonSchema4 object for the given type and adds the mapping to the given resolver.

public TSchemaType Generate<TSchemaType>(Type type, ISchemaResolver schemaResolver) where TSchemaType : JsonSchema4

Generates a JsonSchema4 object for the given type and adds the mapping to the given resolver.

public TSchemaType Generate<TSchemaType>(Type type, IEnumerable<Attribute> parentAttributes, ISchemaResolver schemaResolver) where TSchemaType : JsonSchema4

Generates a JsonSchema4 object for the given type and adds the mapping to the given resolver.

protected virtual void GenerateObject<TSchemaType>(Type type, TSchemaType schema, ISchemaResolver schemaResolver) where TSchemaType : JsonSchema4

Generates the properties for the given type and schema.

Gets the generic type arguments of a type.

protected virtual string[] GetTypeProperties(Type type)

Gets the properties of the given type or null to take all properties.

protected bool IsIntegerEnumeration(IEnumerable<Attribute> attributes)

Checks whether the property is an integer enumeration.