{
  "$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 that answered: the version-control revision it was built from and whether that tree was dirty, from the binary's build information or from values stamped at link time, else \"unknown\" and true."
    },
    "Check": {
      "properties": {
        "name": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "description": "ok or failing"
        },
        "detail": {
          "type": "string"
        }
      },
      "type": "object",
      "required": [
        "name",
        "status",
        "detail"
      ],
      "description": "Check is one dependency the service needs in order to serve."
    }
  },
  "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": {
      "type": "object"
    }
  },
  "type": "object",
  "required": [
    "status",
    "service",
    "contract",
    "build",
    "time",
    "checks"
  ],
  "title": "Health",
  "description": "Health is the envelope of /livez and /healthz."
}
