Skema.JsonSchema.Converter.ToSkema (Skema v1.5.0)

Copy Markdown View Source

Converts JSON Schema format to Skema schema maps.

Summary

Functions

Converts a single JSON Schema field to Skema field definition.

Converts JSON Schema properties to a Skema schema map.

Functions

convert_json_field_to_skema(field_schema, is_required, opts)

Converts a single JSON Schema field to Skema field definition.

convert_properties_to_schema(properties, required_fields, opts \\ [])

Converts JSON Schema properties to a Skema schema map.

Options

  • atom_keys - Convert field names to atoms (default: false, uses strings for security)
  • strict - When false, skip unsupported features instead of raising (default: false)
  • default_type - Default type when type is not specified (default: :any)
  • per_field_required - When true, check for per-field required property instead of required array (default: false)