JsonSchemaGenerator
Generates a JsonSchema object for a given type.
Gets the settings.
Initializes a new instance of the JsonSchemaGenerator class.
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>(TSchemaType schema, Type type, JsonSchemaResolver schemaResolver) where TSchemaType : JsonSchema
Generates into the given JsonSchema object for the given type and adds the mapping to the given resolver.
public virtual void Generate<TSchemaType>(TSchemaType schema, ContextualType contextualType, JsonSchemaResolver schemaResolver) where TSchemaType : JsonSchema
Generates into the given JsonSchema object for the given type and adds the mapping to the given resolver.
protected virtual void GenerateArray<TSchemaType>(TSchemaType schema, JsonTypeDescription typeDescription, JsonSchemaResolver schemaResolver) where TSchemaType : JsonSchema
Generates an array in the given schema.
protected virtual void GenerateDictionary<TSchemaType>(TSchemaType schema, JsonTypeDescription typeDescription, JsonSchemaResolver schemaResolver) where TSchemaType : JsonSchema
Generates an array in the given schema.
Generates an enumeration in the given schema.
Generates the example from the type's xml docs.
protected virtual void GenerateObject(JsonSchema schema, JsonTypeDescription typeDescription, 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.
public virtual string GetPropertyName(JsonProperty jsonProperty, ContextualMemberInfo contextualMember)
Gets the converted property name.
Gets the properties of the given type or null to take all properties.
Checks whether a property is ignored.