Selecto.Domain.Diagnostics (Selecto v0.4.6)

Copy Markdown

Structured diagnostics returned by Selecto.Domain.normalize/1.

Diagnostics are intentionally non-fatal for recognized compatibility cases. They let callers inspect inferred versions, projection/proposed sections, and unknown top-level keys before any runtime behavior moves to the normalized contract.

Summary

Functions

Builds a diagnostics struct.

Types

t()

@type t() :: %Selecto.Domain.Diagnostics{
  canonical_sections: [term()],
  errors: [map()],
  projection_sections: [term()],
  proposed_sections: [term()],
  schema_version: pos_integer() | term() | nil,
  schema_version_inferred: boolean(),
  sections: map(),
  unknown_sections: [term()],
  warnings: [warning()]
}

warning()

@type warning() :: %{
  :code => atom(),
  :message => String.t(),
  optional(:sections) => [term()],
  optional(:schema_version) => pos_integer()
}

Functions

new(attrs \\ [])

@spec new(keyword()) :: t()

Builds a diagnostics struct.