{
  "$id": "https://schemas.sand.binaryedge.io/minion/modules/rethinkdb",
  "title": "RethinkDB Module Output Body",
  "type": "object",
  "properties": {
    "databases": {
      "patternProperties": {
        "^.*$": {
          "$ref": "#/$defs/database"
        }
      },
      "additionalProperties": false
    },
    "status": {
      "$ref": "#/$defs/status"
    }
  },
  "required": [
    "databases",
    "status"
  ],
  "additionalProperties": false,
  "$defs": {
    "database": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "tables": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "name",
        "tables"
      ],
      "additionalProperties": true
    },
    "status": {
      "$comment": "The full range of keys is unknown and library/server-defined, so none are required and any others are allowed.",
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "network": {
          "type": "object",
          "properties": {
            "canonical_addresses": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "host": {
                    "type": "string"
                  },
                  "port": {
                    "$ref": "/minion/shared-types#/port-integer"
                  }
                },
                "additionalProperties": true
              }
            },
            "cluster_port": {
              "type": [
                "integer",
                "string"
              ]
            },
            "connected_to": {
              "type": "object"
            },
            "hostname": {
              "type": "string"
            },
            "http_admin_port": {
              "type": [
                "integer",
                "string"
              ]
            },
            "reql_port": {
              "type": [
                "integer",
                "string"
              ]
            },
            "time_connected": {
              "type": "string"
            }
          },
          "additionalProperties": true
        },
        "process": {
          "type": "object",
          "properties": {
            "argv": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "cache_size_mb": {
              "type": "number"
            },
            "pid": {
              "type": "integer"
            },
            "time_started": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    }
  }
}
