{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/chinafootnotes-com/json-schema/chinafootnotes-com-status-schema.json",
  "title": "Status",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/chinafootnotes-com-openapi.yml#/components/schemas/Status",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "notice": {
      "type": "string"
    },
    "placeCount": {
      "type": "integer"
    },
    "tipCount": {
      "type": "integer"
    },
    "reviewOverdue": {
      "type": "integer"
    },
    "pendingReviews": {
      "type": "integer"
    },
    "monitoringStale": {
      "type": "boolean",
      "description": "No successful scan summary in the past 36 hours. Does not prove a process is alive."
    },
    "monitoring": {
      "anyOf": [
        {
          "$ref": "#/$defs/Monitoring"
        },
        {
          "type": "null"
        }
      ]
    },
    "cities": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "placeCount": {
            "type": "integer"
          },
          "preview": {
            "type": "boolean"
          }
        }
      },
      "description": "Place count per published city"
    }
  },
  "required": [
    "placeCount",
    "monitoringStale",
    "pendingReviews"
  ],
  "$defs": {
    "Monitoring": {
      "type": "object",
      "properties": {
        "checked": {
          "type": "integer"
        },
        "totalSources": {
          "type": "integer"
        },
        "baseline": {
          "type": "integer"
        },
        "unchanged": {
          "type": "integer"
        },
        "changed": {
          "type": "integer"
        },
        "failed": {
          "type": "integer"
        },
        "pendingReviews": {
          "type": "integer"
        },
        "startedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "completedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "nextScheduledAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "factsAutomaticallyPublished": {
          "const": false
        },
        "results": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "error": {
                "type": "string"
              }
            },
            "required": []
          }
        }
      },
      "required": []
    }
  }
}