{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://apigenie.pl/schemas/apigenie-lint-report.json",
  "title": "apigenie lint --formatter json",
  "description": "The issues of `apigenie lint --formatter json`, for every linted file. Adding members keeps formatVersion; removing a member or changing its meaning or type increments it.",
  "type": "object",
  "required": ["formatVersion", "results"],
  "properties": {
    "formatVersion": {
      "description": "The version of this format.",
      "const": 1
    },
    "results": {
      "description": "One item per file with issues, sorted by path.",
      "type": "array",
      "items": { "$ref": "#/$defs/file" }
    }
  },
  "$defs": {
    "file": {
      "type": "object",
      "required": ["filePath", "messages"],
      "properties": {
        "filePath": { "type": "string" },
        "messages": {
          "type": "array",
          "items": { "$ref": "#/$defs/message" }
        }
      }
    },
    "message": {
      "type": "object",
      "required": ["column", "line", "message", "ruleId", "severity"],
      "properties": {
        "column": { "description": "1-based column.", "type": "integer", "minimum": 0 },
        "line": { "description": "1-based line.", "type": "integer", "minimum": 0 },
        "message": { "type": "string" },
        "ruleId": { "type": "string" },
        "severity": { "enum": ["error", "warning"] }
      }
    }
  }
}
