{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "Build": {
      "properties": {
        "revision": {
          "type": "string"
        },
        "dirty": {
          "type": "boolean"
        },
        "go": {
          "type": "string"
        }
      },
      "type": "object",
      "required": [
        "revision",
        "dirty",
        "go"
      ],
      "description": "Build identifies the binary."
    },
    "Check": {
      "properties": {
        "name": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "description": "ok | failing"
        },
        "detail": {
          "type": "string"
        }
      },
      "type": "object",
      "required": [
        "name",
        "status",
        "detail"
      ],
      "description": "Check is one dependency the service needs in order to serve its contract: for Dawn, the journal and bytes it consumes."
    },
    "Identity": {
      "properties": {
        "root_id": {
          "type": "string"
        },
        "world_space_id": {
          "type": "string"
        },
        "journal_instance_id": {
          "type": "string"
        },
        "world": {
          "type": "string"
        }
      },
      "type": "object",
      "required": [
        "root_id",
        "world_space_id",
        "journal_instance_id"
      ],
      "description": "Identity is the service-specific identity member: the Journal root the world lives in, the world's own space, the Journal instance and the world's name, the space its grants are placed in."
    }
  },
  "properties": {
    "status": {
      "type": "string"
    },
    "service": {
      "type": "string"
    },
    "contract": {
      "type": "string"
    },
    "build": {
      "$ref": "#/$defs/Build"
    },
    "time": {
      "type": "string"
    },
    "checks": {
      "items": {
        "$ref": "#/$defs/Check"
      },
      "type": "array"
    },
    "identity": {
      "oneOf": [
        {
          "$ref": "#/$defs/Identity"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "status",
    "service",
    "contract",
    "build",
    "time",
    "checks"
  ],
  "title": "Health",
  "description": "Health is the envelope of GET /livez and GET /healthz."
}
