Skip to content
Margo dev

Diagnostic schema

#

This schema describes one stable diagnostic object: its code, severity, location, message, and remediation hint.

Margo diagnostic output v1

One structured diagnostic emitted by a Margo command failure or compatibility report.

  • code string required

    Stable machine-readable diagnostic code.

    Constraints
    minLength=1
  • column integer

    One-based source column.

    Constraints
    minimum=1
  • hint string

    Actionable remediation hint.

  • line integer

    One-based source line.

    Constraints
    minimum=1
  • message string required

    Human-readable diagnostic message.

    Constraints
    minLength=1
  • pointer string

    JSON Pointer identifying the affected field.

  • severity string

    Diagnostic severity when present.

    Constraints
    enum=["info","warning","error"]
  • source string

    Source path associated with the diagnostic.

Used by

  • JSON command failures and compatibility findings.
  • The margo check and margo doctor reports.
  • margo schema diagnostic, which emits the exact embedded bytes.