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

JsonSchemaGenerator

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

Gets the settings.

Initializes a new instance of the JsonSchemaGenerator class.

public void ApplyPropertyAnnotations(JsonSchema4 jsonProperty, Type parentType, IList<Attribute> attributes, JsonObjectTypeDescription propertyTypeDescription)

Applies the property annotations to the JSON property.

public JsonSchema4 Generate(Type type, ISchemaResolver schemaResolver)

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

public JsonSchema4 Generate(Type type, JsonSchema4 rootSchema, IEnumerable<Attribute> parentAttributes, ISchemaDefinitionAppender schemaDefinitionAppender, ISchemaResolver schemaResolver)

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

public TSchemaType Generate<TSchemaType>(Type type, JsonSchema4 rootSchema, IEnumerable<Attribute> parentAttributes, ISchemaDefinitionAppender schemaDefinitionAppender, 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, JsonSchema4 rootSchema, ISchemaDefinitionAppender schemaDefinitionAppender, 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.