Home ISchemaGenerator Interface
ISchemaGenerator Interface
Cancel

ISchemaGenerator Interface

Namespace: Json.Schema.Generation.Generators

Inheritance: ISchemaGenerator

Defines a generator.

Remarks

Generators are the first stage of schema generation. These will add keyword intents to the context, which then are translated into keywords after optimization.

Methods

AddConstraints(SchemaGenerationContextBase context)

Processes the type and any attributes (present on the context), and adds intents to the context.

Declaration

1
public abstract void AddConstraints(SchemaGenerationContextBase context)
ParameterTypeDescription
contextSchemaGenerationContextBaseThe generation context.

Handles(Type type)

Determines whether the generator can be used to generate a schema for this type.

Declaration

1
public abstract bool Handles(Type type)
ParameterTypeDescription
typeTypeThe type.

Returns

true if the generator can be used; false otherwise.

Contents