{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/numspot/json-schema/numspot-bridge-schema.json",
  "title": "Bridge",
  "description": "Schema of a bridge",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/numspot-openapi.yml#/components/schemas/Bridge",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "left": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^(vpc-[a-z0-9]+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$",
          "description": "vpcId or managedServiceId"
        },
        "type": {
          "type": "string",
          "enum": [
            "compute",
            "managedservice"
          ]
        }
      },
      "required": [
        "id",
        "type"
      ]
    },
    "right": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^(vpc-[a-z0-9]+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$",
          "description": "vpcId or managedServiceId"
        },
        "type": {
          "type": "string",
          "enum": [
            "compute",
            "managedservice"
          ]
        }
      },
      "required": [
        "id",
        "type"
      ]
    },
    "routes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "gatewayId": {
            "type": "string"
          },
          "ipRange": {
            "type": "string",
            "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}/[0-9]{1,2}$"
          }
        },
        "required": [
          "gatewayId",
          "ipRange"
        ]
      }
    }
  },
  "required": [
    "left",
    "right",
    "id"
  ]
}