{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/omniapps-ca/json-schema/omniapps-ca-circuit-record-request-schema.json",
  "title": "CircuitRecordRequest",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sairen-omniapps-ca-openapi.json#/components/schemas/CircuitRecordRequest",
  "properties": {
    "service_key": {
      "type": "string",
      "maxLength": 150,
      "minLength": 1,
      "title": "Service Key",
      "description": "Target service identifier."
    },
    "success": {
      "type": "boolean",
      "title": "Success",
      "description": "Whether upstream call succeeded."
    },
    "status_code": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Status Code",
      "description": "HTTP or RPC status code received.",
      "default": 200
    },
    "error_message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error Message",
      "description": "Optional error description or reason.",
      "default": ""
    },
    "failure_threshold": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 50.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Failure Threshold",
      "description": "Consecutive errors to trip circuit (default: 3)."
    },
    "cooldown_seconds": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 3600.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Cooldown Seconds",
      "description": "Cooldown time in seconds (default: 30.0)."
    }
  },
  "type": "object",
  "required": [
    "service_key",
    "success"
  ]
}