{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/uptimerobot/json-schema/uptimerobot-incident-detail-dto-schema.json",
  "title": "IncidentDetailDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/uptimerobot-incidents-api-openapi.yml#/components/schemas/IncidentDetailDto",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {},
    "cause": {
      "type": "number"
    },
    "reason": {
      "type": "string"
    },
    "duration": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "startedAt": {
      "oneOf": [
        {},
        {
          "type": "string"
        }
      ]
    },
    "resolvedAt": {
      "oneOf": [
        {},
        {
          "type": "string"
        }
      ]
    },
    "rootCause": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "url": {
          "type": [
            "string",
            "null"
          ]
        },
        "requestHeaders": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {}
        },
        "responseHeaders": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {}
        },
        "httpResponseCode": {
          "type": [
            "number",
            "null"
          ]
        },
        "responseDownloadUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "assertionDiagnostics": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "version": {
              "type": "number",
              "minimum": 1,
              "maximum": 1
            },
            "logic": {
              "type": "string",
              "enum": [
                "AND",
                "OR"
              ]
            },
            "summary": {
              "type": "object",
              "properties": {
                "passed": {
                  "type": "boolean"
                },
                "total": {
                  "type": "integer",
                  "minimum": 0
                },
                "passedCount": {
                  "type": "integer",
                  "minimum": 0
                },
                "failedCount": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "passed",
                "total",
                "passedCount",
                "failedCount"
              ]
            },
            "results": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "index": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "property": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "body_json",
                      "header",
                      "status_code",
                      "body_text"
                    ]
                  },
                  "selector": {
                    "type": "string"
                  },
                  "comparison": {
                    "type": "string",
                    "enum": [
                      "equals",
                      "not_equals",
                      "contains",
                      "not_contains",
                      "greater_than",
                      "less_than",
                      "is_null",
                      "is_not_null",
                      "is_string",
                      "is_number",
                      "is_boolean",
                      "is_array",
                      "is_object",
                      "is_empty",
                      "is_not_empty",
                      "length_equals",
                      "length_not_equals",
                      "length_greater_than",
                      "length_less_than",
                      "exists",
                      "not_exists"
                    ],
                    "x-enumNames": [
                      "EQUALS",
                      "NOT_EQUALS",
                      "CONTAINS",
                      "NOT_CONTAINS",
                      "GREATER_THAN",
                      "LESS_THAN",
                      "IS_NULL",
                      "IS_NOT_NULL",
                      "IS_STRING",
                      "IS_NUMBER",
                      "IS_BOOLEAN",
                      "IS_ARRAY",
                      "IS_OBJECT",
                      "IS_EMPTY",
                      "IS_NOT_EMPTY",
                      "LENGTH_EQUALS",
                      "LENGTH_NOT_EQUALS",
                      "LENGTH_GREATER_THAN",
                      "LENGTH_LESS_THAN",
                      "EXISTS",
                      "NOT_EXISTS"
                    ]
                  },
                  "passed": {
                    "type": "boolean"
                  },
                  "actualTypes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "missing",
                        "null",
                        "boolean",
                        "number",
                        "string",
                        "array",
                        "object"
                      ]
                    }
                  },
                  "actualSummary": {
                    "type": "string"
                  },
                  "targetType": {
                    "type": "string",
                    "enum": [
                      "missing",
                      "null",
                      "boolean",
                      "number",
                      "string",
                      "array",
                      "object"
                    ]
                  },
                  "targetSummary": {
                    "type": "string"
                  },
                  "selectedCount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "failedCount": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "failingSamples": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string"
                        },
                        "actualSummary": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "path",
                        "actualSummary"
                      ]
                    }
                  },
                  "failureReason": {
                    "type": "string",
                    "enum": [
                      "no_match",
                      "value_present",
                      "response_not_json",
                      "type_mismatch",
                      "comparison_failed",
                      "invalid_jsonpath",
                      "too_many_matches",
                      "evaluation_limit_exceeded",
                      "unsupported_value_type",
                      "diagnostic_payload_truncated"
                    ]
                  },
                  "truncated": {
                    "type": "boolean"
                  },
                  "redacted": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "index",
                  "property",
                  "source",
                  "comparison",
                  "passed",
                  "truncated",
                  "redacted"
                ]
              }
            }
          },
          "required": [
            "version",
            "logic",
            "summary",
            "results"
          ]
        }
      },
      "required": [
        "url",
        "requestHeaders",
        "responseHeaders",
        "httpResponseCode",
        "responseDownloadUrl"
      ]
    }
  },
  "required": [
    "id",
    "status",
    "cause",
    "reason",
    "duration",
    "startedAt",
    "resolvedAt",
    "rootCause"
  ]
}