WPL.Validator.Error (WPL Validator v1.6.7)

Copy Markdown View Source

A single validation finding.

Fields:

  • :path — RFC 6901 JSON Pointer to the offending node (string).
  • :code — atom, e.g. :duplicate_id or :schema_violation.
  • :message — human-readable description.
  • :severity:error or :warning.
  • :meta — code-specific extra fields (map, may be empty).

Summary

Types

code()

@type code() ::
  :schema_violation
  | :duplicate_id
  | :unresolved_ref
  | :empty_phases_for_type
  | :invalid_prescription
  | :invalid_personalization_rule
  | :invalid_points_rule
  | :phase_duration_mismatch
  | :cyclic_subplan
  | :activity_block_mismatch

severity()

@type severity() :: :error | :warning

t()

@type t() :: %WPL.Validator.Error{
  code: code(),
  message: String.t(),
  meta: map(),
  path: String.t(),
  severity: severity()
}