JsonSchemaGenerator
Generates a JsonSchema object for a given type.
Gets the settings.
Initializes a new instance of the JsonSchemaGenerator class.
public virtual void ApplyDataAnnotations(JsonSchema schema, JsonTypeDescription typeDescription, IEnumerable<Attribute> parentAttributes)
Applies the property annotations to the JSON property.
Gets the actual default value for the given object (e.g. correctly converts enums).
Generates a JsonSchema object for the given type and adds the mapping to the given resolver.
Generates a JsonSchema object for the given type and adds the mapping to the given resolver.
public TSchemaType Generate<TSchemaType>(Type type, JsonSchemaResolver schemaResolver) where TSchemaType : JsonSchema
Generates a JsonSchema object for the given type and adds the mapping to the given resolver.
Generates a JsonSchema object for the given type and adds the mapping to the given resolver.
public TSchemaType Generate<TSchemaType>(ContextualType contextualType, JsonSchemaResolver schemaResolver) where TSchemaType : JsonSchema
Generates a JsonSchema object for the given type and adds the mapping to the given resolver.
public void Generate<TSchemaType>(Type type, TSchemaType schema, JsonSchemaResolver schemaResolver) where TSchemaType : JsonSchema
Generates a JsonSchema object for the given type and adds the mapping to the given resolver.
public virtual void Generate<TSchemaType>(ContextualType contextualType, TSchemaType schema, JsonSchemaResolver schemaResolver) where TSchemaType : JsonSchema
Generates a JsonSchema object for the given type and adds the mapping to the given resolver.
protected virtual void GenerateObject(Type type, JsonTypeDescription typeDescription, JsonSchema schema, JsonSchemaResolver schemaResolver)
Generates the properties for the given type and schema.
public TSchemaType GenerateWithReference<TSchemaType>(ContextualType contextualType, JsonSchemaResolver schemaResolver, Action<TSchemaType, JsonSchema> transformation = null) where TSchemaType : JsonSchema
Generetes a schema directly or referenced for the requested schema type;
does NOT change nullability.
public TSchemaType GenerateWithReferenceAndNullability<TSchemaType>(ContextualType contextualType, JsonSchemaResolver schemaResolver, Action<TSchemaType, JsonSchema> transformation = null) where TSchemaType : JsonSchema
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 TSchemaType GenerateWithReferenceAndNullability<TSchemaType>(ContextualType contextualType, bool isNullable, JsonSchemaResolver schemaResolver, Action<TSchemaType, JsonSchema> transformation = null) where TSchemaType : JsonSchema
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.