{
  "$defs": {
    "IssueSeverity": {
      "enum": [
        "info",
        "warning",
        "error"
      ],
      "title": "IssueSeverity",
      "type": "string"
    }
  },
  "$id": "urn:sindri:contracts:1.0.0:issue-record",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "action_hint": {
      "anyOf": [
        {
          "maxLength": 1000,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Action Hint"
    },
    "code": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Code",
      "type": "string"
    },
    "issue_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Issue Id",
      "type": "string"
    },
    "message": {
      "maxLength": 2000,
      "minLength": 1,
      "title": "Message",
      "type": "string"
    },
    "severity": {
      "$ref": "#/$defs/IssueSeverity"
    },
    "source_path": {
      "anyOf": [
        {
          "maxLength": 512,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Source Path"
    },
    "statement_ids": {
      "default": [],
      "items": {
        "maxLength": 128,
        "minLength": 1,
        "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
        "type": "string"
      },
      "title": "Statement Ids",
      "type": "array"
    }
  },
  "required": [
    "issue_id",
    "code",
    "severity",
    "message"
  ],
  "title": "IssueRecord",
  "type": "object",
  "x-sindri-contract-suite": "sindri.contracts",
  "x-sindri-contract-version": "1.0.0"
}
