{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fablerlabs-com/json-schema/fablerlabs-com-url-security-result-schema.json",
  "title": "UrlSecurityResult",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fablerlabs-com-openapi.yaml#/components/schemas/UrlSecurityResult",
  "type": "object",
  "required": [
    "verdict",
    "reachable",
    "requested_url",
    "final_url",
    "fetched_at",
    "method",
    "status",
    "redirects",
    "headers",
    "checks",
    "summary",
    "scope"
  ],
  "properties": {
    "verdict": {
      "type": "string",
      "enum": [
        "pass",
        "warn",
        "block"
      ]
    },
    "reachable": {
      "type": "boolean"
    },
    "requested_url": {
      "type": "string",
      "format": "uri"
    },
    "final_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "fetched_at": {
      "type": "string",
      "format": "date-time"
    },
    "method": {
      "type": "string",
      "enum": [
        "HEAD",
        "GET"
      ]
    },
    "status": {
      "type": [
        "integer",
        "null"
      ]
    },
    "redirects": {
      "type": "array",
      "maxItems": 5,
      "items": {
        "$ref": "#/$defs/UrlSecurityRedirect"
      }
    },
    "headers": {
      "$ref": "#/$defs/UrlSecurityHeaders"
    },
    "checks": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/UrlSecurityCheck"
      }
    },
    "summary": {
      "$ref": "#/$defs/UrlSecuritySummary"
    },
    "scope": {
      "type": "string"
    }
  },
  "$defs": {
    "UrlSecurityCheck": {
      "type": "object",
      "required": [
        "id",
        "status",
        "evidence"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "pass",
            "warn",
            "fail"
          ]
        },
        "evidence": {
          "type": "string"
        }
      }
    },
    "UrlSecurityHeaders": {
      "type": "object",
      "required": [
        "strict_transport_security",
        "content_security_policy",
        "x_content_type_options",
        "referrer_policy",
        "permissions_policy",
        "cookie_count"
      ],
      "properties": {
        "strict_transport_security": {
          "type": [
            "string",
            "null"
          ]
        },
        "content_security_policy": {
          "type": [
            "string",
            "null"
          ]
        },
        "x_content_type_options": {
          "type": [
            "string",
            "null"
          ]
        },
        "referrer_policy": {
          "type": [
            "string",
            "null"
          ]
        },
        "permissions_policy": {
          "type": [
            "string",
            "null"
          ]
        },
        "cookie_count": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "UrlSecurityRedirect": {
      "type": "object",
      "required": [
        "status",
        "url",
        "location"
      ],
      "properties": {
        "status": {
          "type": "integer"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "location": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "UrlSecuritySummary": {
      "type": "object",
      "required": [
        "passed",
        "warnings",
        "failed"
      ],
      "properties": {
        "passed": {
          "type": "integer",
          "minimum": 0
        },
        "warnings": {
          "type": "integer",
          "minimum": 0
        },
        "failed": {
          "type": "integer",
          "minimum": 0
        }
      }
    }
  }
}