{
  "$schema": "http://json-schema.org/draft-07/schema",
  "type": "object",
  "title": "BlockSearchResult",
  "description": "Block search result",
  "required": ["found", "result"],
  "additionalProperties": false,
  "properties": {
    "found": {
      "type": "boolean",
      "description": "Indicates if the requested object was found or not",
      "default": true
    },
    "result": {
      "type": "object",
      "description": "This object carries the search result",
      "required": ["entity_id", "entity_type", "block_data"],
      "additionalProperties": false,
      "properties": {
        "entity_id": {
          "type": "string",
          "description": "The id used to search this query."
        },
        "entity_type": {
          "type": "string",
          "enum": ["block_hash"]
        },
        "block_data": {
          "type": "object",
          "description": "Returns basic search result information about the requested id",
          "required": ["canonical", "hash", "parent_block_hash", "burn_block_time", "height"],
          "additionalProperties": false,
          "properties": {
            "canonical": {
              "type": "boolean",
              "description": "If the block lies within the canonical chain"
            },
            "hash": {
              "type": "string",
              "description": "Refers to the hash of the block"
            },
            "parent_block_hash": {
              "type": "string"
            },
            "burn_block_time": {
              "type": "integer"
            },
            "height": {
              "type": "integer"
            }
          }
        },
        "metadata": {
          "type": "object",
          "anyOf": [
            {
              "$ref": "../../entities/blocks/block.schema.json"
            }
          ],
          "additionalItems": false
        }
      }
    }
  }
}
