{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cachethq/json-schema/cachethq-incident-schema.json",
  "title": "Incident",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cachethq-openapi.json#/components/schemas/Incident",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "enum": [
        "incidents"
      ]
    },
    "attributes": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "guid": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "visible": {
          "$ref": "#/$defs/ResourceVisibilityEnum"
        },
        "stickied": {
          "type": "boolean"
        },
        "notifications": {
          "type": "integer"
        },
        "meta": {
          "type": "array",
          "items": {}
        },
        "components_count": {
          "type": "string"
        },
        "status": {
          "type": "object",
          "properties": {
            "human": {
              "type": [
                "string",
                "null"
              ]
            },
            "value": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "human",
            "value"
          ]
        },
        "occurred": {
          "type": "object",
          "properties": {
            "human": {
              "type": [
                "string",
                "null"
              ]
            },
            "string": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "human",
            "string"
          ]
        },
        "published": {
          "type": "object",
          "properties": {
            "human": {
              "type": [
                "string",
                "null"
              ]
            },
            "string": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "human",
            "string"
          ]
        },
        "created": {
          "type": "object",
          "properties": {
            "human": {
              "type": [
                "string",
                "null"
              ]
            },
            "string": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "human",
            "string"
          ]
        },
        "updated": {
          "type": "object",
          "properties": {
            "human": {
              "type": [
                "string",
                "null"
              ]
            },
            "string": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "human",
            "string"
          ]
        }
      },
      "required": [
        "id",
        "guid",
        "name",
        "message",
        "visible",
        "stickied",
        "notifications",
        "status",
        "occurred",
        "published",
        "created",
        "updated"
      ]
    },
    "relationships": {
      "type": "object",
      "properties": {
        "components": {
          "type": "object",
          "properties": {
            "data": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ComponentIdentifier"
              }
            }
          },
          "required": [
            "data"
          ]
        },
        "updates": {
          "type": "object",
          "properties": {
            "data": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/UpdateIdentifier"
              }
            }
          },
          "required": [
            "data"
          ]
        },
        "user": {
          "type": "object",
          "properties": {
            "data": {
              "anyOf": [
                {
                  "$ref": "#/$defs/UserIdentifier"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "data"
          ]
        },
        "tags": {
          "type": "object",
          "properties": {
            "data": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/TagIdentifier"
              }
            }
          },
          "required": [
            "data"
          ]
        }
      }
    }
  },
  "required": [
    "id",
    "type"
  ],
  "$defs": {
    "ComponentIdentifier": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "components"
          ]
        },
        "id": {
          "type": "string"
        }
      },
      "required": [
        "type",
        "id"
      ],
      "title": "ComponentIdentifier"
    },
    "ResourceVisibilityEnum": {
      "type": "integer",
      "enum": [
        0,
        1,
        2
      ],
      "title": "ResourceVisibilityEnum"
    },
    "TagIdentifier": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "tags"
          ]
        },
        "id": {
          "type": "string"
        }
      },
      "required": [
        "type",
        "id"
      ],
      "title": "TagIdentifier"
    },
    "UpdateIdentifier": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "updates"
          ]
        },
        "id": {
          "type": "string"
        }
      },
      "required": [
        "type",
        "id"
      ],
      "title": "UpdateIdentifier"
    },
    "UserIdentifier": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "users"
          ]
        },
        "id": {
          "type": "string"
        }
      },
      "required": [
        "type",
        "id"
      ],
      "title": "UserIdentifier"
    }
  }
}