JsonSchemaGenerator
Generates a JsonSchema4 object for a given type.
Gets the settings.
Initializes a new instance of the JsonSchemaGenerator class.
public void ApplyDataAnnotations(JsonSchema4 schema, JsonTypeDescription typeDescription, IEnumerable<Attribute> parentAttributes)
Applies the property annotations to the JSON property.
Generates a JsonSchema4 object for the given type and adds the mapping to the given resolver.
Generates a JsonSchema4 object for the given type and adds the mapping to the given resolver.
public Task<TSchemaType> GenerateAsync<TSchemaType>(Type type, JsonSchemaResolver schemaResolver) where TSchemaType : JsonSchema4
Generates a JsonSchema4 object for the given type and adds the mapping to the given resolver.
public Task<JsonSchema4> GenerateAsync(Type type, IEnumerable<Attribute> parentAttributes, JsonSchemaResolver schemaResolver)
Generates a JsonSchema4 object for the given type and adds the mapping to the given resolver.
public Task<TSchemaType> GenerateAsync<TSchemaType>(Type type, IEnumerable<Attribute> parentAttributes, JsonSchemaResolver schemaResolver) where TSchemaType : JsonSchema4
Generates a JsonSchema4 object for the given type and adds the mapping to the given resolver.
public virtual Task GenerateAsync<TSchemaType>(Type type, IEnumerable<Attribute> parentAttributes, TSchemaType schema, JsonSchemaResolver schemaResolver) where TSchemaType : JsonSchema4
Generates a JsonSchema4 object for the given type and adds the mapping to the given resolver.
protected virtual Task GenerateObjectAsync<TSchemaType>(Type type, TSchemaType schema, JsonSchemaResolver schemaResolver) where TSchemaType : JsonSchema4
Generates the properties for the given type and schema.
public Task<TSchemaType> GenerateWithReference<TSchemaType>(Type type, IEnumerable<Attribute> parentAttributes, JsonSchemaResolver schemaResolver, Func<TSchemaType, JsonSchema4, Task> transformation = null) where TSchemaType : JsonSchema4
Generetes a schema directly or referenced for the requested schema type;
does NOT change nullability.
public Task<TSchemaType> GenerateWithReferenceAndNullability<TSchemaType>(Type type, IEnumerable<Attribute> parentAttributes, JsonSchemaResolver schemaResolver, Func<TSchemaType, JsonSchema4, Task> transformation = null) where TSchemaType : JsonSchema4
Generetes a schema directly or referenced for the requested schema type;
also adds nullability if required by looking at the type's JsonTypeDescription.
public virtual Task<TSchemaType> GenerateWithReferenceAndNullability<TSchemaType>(Type type, IEnumerable<Attribute> parentAttributes, bool isNullable, JsonSchemaResolver schemaResolver, Func<TSchemaType, JsonSchema4, Task> transformation = null) where TSchemaType : JsonSchema4
Generetes a schema directly or referenced for the requested schema type; also adds nullability if required.
Gets the converted property name.
Gets the properties of the given type or null to take all properties.