{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/astraverify-com/json-schema/astraverify-com-report-schema.json",
  "title": "Report",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/astraverify-com-openapi.json#/components/schemas/Report",
  "properties": {
    "discoverability": {
      "$ref": "#/$defs/Score"
    },
    "discoverability_cache_age_seconds": {
      "type": "integer"
    },
    "discoverability_error": {
      "type": [
        "string",
        "null"
      ]
    },
    "domain": {
      "type": "string"
    },
    "email_cache_age_seconds": {
      "type": "integer"
    },
    "email_security": {
      "$ref": "#/$defs/Score"
    },
    "live_url": {
      "description": "The live report page, which rescans when stale",
      "type": "string"
    },
    "recommendations": {
      "items": {
        "$ref": "#/$defs/Recommendation"
      },
      "type": "array"
    },
    "report_url": {
      "description": "Saved snapshot of this report (/r/<id>); opens without a rescan",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "Component": {
      "description": "One scored area",
      "properties": {
        "key": {
          "type": "string"
        },
        "max": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "points": {
          "type": "integer"
        },
        "summary": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "Fix": {
      "description": "The record, tag or file to add",
      "properties": {
        "kind": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "where": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "Recommendation": {
      "properties": {
        "fix": {
          "$ref": "#/$defs/Fix"
        },
        "id": {
          "type": "string"
        },
        "scan": {
          "enum": [
            "email",
            "discoverability"
          ],
          "type": "string"
        },
        "severity": {
          "enum": [
            "critical",
            "important",
            "info"
          ],
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "why": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "Score": {
      "properties": {
        "capped": {
          "type": "boolean"
        },
        "components": {
          "items": {
            "$ref": "#/$defs/Component"
          },
          "type": "array"
        },
        "grade": {
          "type": "string"
        },
        "held_back": {
          "description": "Points the cap holds back; components add up to score + held_back",
          "type": "integer"
        },
        "open_fixes": {
          "type": "integer"
        },
        "provider": {
          "type": "string"
        },
        "raw": {
          "description": "Before cap rules",
          "type": "integer"
        },
        "score": {
          "description": "Out of 100, as shown on the website",
          "type": "integer"
        },
        "verdict": {
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}