{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/kontaktio/main/json-schema/kontaktio-floor-gateways-schema.json",
  "title": "Floor-Gateways",
  "description": "Floor gateways. ",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kontaktio-gateways-api-openapi.yml#/components/schemas/Floor-Gateways",
  "type": "object",
  "properties": {
    "content": {
      "type": "array",
      "uniqueItems": true,
      "minItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Id of the gateway."
          },
          "lat": {
            "type": "number",
            "description": "Latitude of a gateway."
          },
          "lng": {
            "type": "number",
            "description": "Longitude of a gateway."
          },
          "altitude": {
            "type": "number",
            "description": "Height in meters above sea level."
          },
          "x": {
            "type": "number",
            "description": "Horizontal coordinate of a gateway; in meters relative to baseline of floor."
          },
          "y": {
            "type": "number",
            "description": "Vertical coordinate of a gateway; in meters relative to baseline of floor."
          },
          "z": {
            "type": "number",
            "description": "Height coordinate of a gateway; in meters relative to baseline of floor."
          },
          "verticalOrientation": {
            "type": "number",
            "description": "Rotation in degrees on the horizontal plane. 0 = parallel to the ground facing up, 90 = on the wall, 180 = parallel to the ground facing down."
          },
          "range": {
            "type": "number",
            "description": "Minimum RSSI (Received Signal Strength Indicator). When calculating position, if strongest signal will have less RSSI than range, that result will be rejected and beacon considered lost."
          },
          "virtual": {
            "type": "boolean",
            "description": "Virtual gateway will be used to map lat, lng to sourceId. There should be one virtual gateway in each floor. Virtual gateway is created automatically when creating floor."
          },
          "sourceId": {
            "type": "string",
            "minLength": 1,
            "description": "SourceId of the gateway."
          },
          "floor": {
            "type": "object",
            "description": "Gateway's floor location.",
            "properties": {
              "id": {
                "type": "number",
                "description": "Floor Id."
              }
            },
            "required": [
              "id"
            ]
          }
        },
        "required": [
          "id",
          "lat",
          "lng",
          "altitude",
          "x",
          "y",
          "z",
          "verticalOrientation",
          "range",
          "virtual",
          "sourceId"
        ]
      }
    }
  },
  "required": [
    "content"
  ]
}