Dextrin.Schema.Field (Dextrin v0.1.0)

Copy Markdown View Source

One compiled field spec inside a Dextrin.Schema.Compiled struct. required comes from the ?-suffixed key convention (a field key ending in ? is optional; no separate flag exists in .dxns itself — reusing DXN's own identifier grammar rather than adding one); default/description only ever come from the %field{...} escape hatch, since optionality is already fully covered by the key suffix.

Summary

Types

t()

@type t() :: %Dextrin.Schema.Field{
  default: term() | :none,
  description: String.t() | nil,
  name: String.t(),
  required: boolean(),
  type: Dextrin.Schema.TypeExpr.t()
}