{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://analyzeapi.com/assets/samples/report.schema.json",
  "title": "AnalyzeAPI sample report",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "report_id",
    "sample",
    "analysis_type",
    "status",
    "target",
    "summary",
    "findings",
    "not_measured"
  ],
  "properties": {
    "schema_version": {
      "const": "1.0"
    },
    "report_id": {
      "type": "string",
      "minLength": 1
    },
    "sample": {
      "type": "boolean"
    },
    "analysis_type": {
      "enum": [
        "ai-analysis",
        "llm-analysis",
        "seo-analysis",
        "website-geo",
        "serp-analysis",
        "keyword-analysis",
        "git-repo-analysis",
        "website-analysis"
      ]
    },
    "status": {
      "enum": [
        "complete",
        "partial",
        "failed"
      ]
    },
    "target": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "label",
        "input_kind"
      ],
      "properties": {
        "label": {
          "type": "string"
        },
        "input_kind": {
          "type": "string"
        }
      }
    },
    "summary": {
      "type": "string"
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "outcome",
          "title",
          "evidence",
          "action"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "outcome": {
            "enum": [
              "pass",
              "review",
              "note"
            ]
          },
          "title": {
            "type": "string"
          },
          "evidence": {
            "type": "string"
          },
          "action": {
            "type": "string"
          }
        }
      }
    },
    "not_measured": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
