jscheam
Values
pub fn array(item_type: property.Type) -> property.Type
Creates an array type with the specified item type
pub fn description(
property: property.Property,
desc: String,
) -> property.Property
Adds a description to a property for documentation purposes
pub fn object(
properties: List(property.Property),
additional_properties: Bool,
) -> property.Type
Creates an object type with the specified properties Set additional_properties to True to allow additional properties beyond those defined
pub fn optional(property: property.Property) -> property.Property
Makes a property optional (not required in the schema)
pub fn prop(
name: String,
property_type: property.Type,
) -> property.Property
Creates a property with the specified name and type Properties are required by default
pub fn to_json(object_type: property.Type) -> json.Json
Converts a Type to a JSON Schema document This is the main function to generate JSON Schema from your type definitions