{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/forecall-dev/json-schema/forecall-dev-latest-lint-schema.json",
  "title": "LatestLint",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/forecall-dev-openapi.json#/components/schemas/LatestLint",
  "type": "object",
  "properties": {
    "server": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "slug",
        "name"
      ]
    },
    "version": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "capturedAt": {
          "type": "string",
          "format": "date-time"
        },
        "label": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "capturedAt",
        "label"
      ]
    },
    "lint": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "source": {
          "type": "string",
          "enum": [
            "server",
            "ci"
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "report": {
          "$ref": "#/$defs/LintReport"
        }
      },
      "required": [
        "id",
        "source",
        "createdAt",
        "report"
      ]
    }
  },
  "required": [
    "server",
    "version",
    "lint"
  ],
  "$defs": {
    "LintReport": {
      "type": "object",
      "properties": {
        "lintVersion": {
          "type": "integer",
          "description": "The scoring rules' version"
        },
        "toolCount": {
          "type": "integer"
        },
        "scoreAvg": {
          "type": "number",
          "description": "Out of 100, one decimal"
        },
        "confusablePairsTotal": {
          "type": "integer"
        },
        "tools": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "score": {
                "type": "integer"
              },
              "components": {
                "type": "object",
                "description": "Points of each of the six items"
              },
              "issues": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            },
            "required": [
              "name",
              "score",
              "components",
              "issues"
            ]
          }
        },
        "serverIssues": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      },
      "required": [
        "lintVersion",
        "toolCount",
        "scoreAvg",
        "confusablePairsTotal",
        "tools",
        "serverIssues"
      ],
      "description": "The same report as the web linter's (scores and issue codes: forecall.dev/en/docs/reading-scores)"
    }
  }
}