Boxic.DMN.Diagnostic (boxic_dmn v0.3.0)

Copy Markdown View Source

A stable diagnostic returned by DMN validation, preflight, and execution.

to_map/1 converts the diagnostic into a persistence-safe representation for downstream consumers. Boxic intentionally does not assign lifecycle severity.

Summary

Functions

Returns a stable map containing only JSON-compatible values.

Types

category()

@type category() ::
  :xml_schema
  | :dmn_model
  | :feel
  | :executable_profile
  | :import
  | :serialization
  | :evaluation_preflight
  | :evaluation

json_scalar()

@type json_scalar() :: nil | boolean() | number() | String.t()

json_value()

@type json_value() ::
  json_scalar() | [json_value()] | %{optional(String.t()) => json_value()}

path_segment()

@type path_segment() :: atom() | String.t() | non_neg_integer()

t()

@type t() :: %Boxic.DMN.Diagnostic{
  category: category(),
  cause: term(),
  clause: String.t() | nil,
  code: atom(),
  details: term(),
  message: String.t(),
  path: [path_segment()],
  source_profile: term(),
  specification: String.t() | nil
}

Functions

to_map(diagnostic)

@spec to_map(t()) :: %{required(String.t()) => json_value()}

Returns a stable map containing only JSON-compatible values.