{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/transit/json-schema/transit-network-preview-schema.json",
  "title": "NetworkPreview",
  "description": "A network preview: a feed showing an upcoming network redesign that temporarily replaces one or more production feeds. `feed_code`, `network_ids`, `replaced_feed_codes`, `replaced_network_ids` and `in_beta` are always present. The other fields are the preview configuration shown in the Transit app, forwarded as-is, and are only present when a configuration exists for the feed.",
  "x-generated": "2026-12-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/transit-v4-api-openapi.yml#/components/schemas/NetworkPreview",
  "type": "object",
  "properties": {
    "feed_code": {
      "type": "string",
      "description": "Feed code of the preview feed. Routes of this preview have a `global_route_id` prefixed with this code."
    },
    "network_ids": {
      "type": "array",
      "description": "Networks of the preview feed.",
      "items": {
        "$ref": "#/$defs/NetworkId"
      }
    },
    "replaced_feed_codes": {
      "type": "array",
      "description": "Production feeds replaced by this preview. They are excluded from planning when the preview is enabled.",
      "items": {
        "type": "string"
      }
    },
    "replaced_network_ids": {
      "type": "array",
      "description": "Networks of the replaced production feeds.",
      "items": {
        "$ref": "#/$defs/NetworkId"
      }
    },
    "in_beta": {
      "type": "boolean",
      "description": "Whether the preview feed is in beta (same meaning as `network_in_beta` in `/public/available_networks`)."
    },
    "id": {
      "type": "string",
      "description": "Identifier of the preview configuration."
    },
    "feed_codes": {
      "type": "array",
      "description": "Feed codes covered by the preview configuration.",
      "items": {
        "type": "string"
      }
    },
    "color": {
      "type": "string",
      "description": "Accent color of the preview, as a `light/dark` pair of hex colors."
    },
    "text_color": {
      "type": "string",
      "description": "Text color to use over `color`, as a `light/dark` pair of hex colors."
    },
    "preview_modes_available": {
      "type": "array",
      "description": "How the app can present the preview: `trip_results` (preview results shown alongside regular ones) and/or `full` (whole app switched to the preview).",
      "items": {
        "type": "string",
        "enum": [
          "full",
          "trip_results"
        ]
      }
    },
    "conditions": {
      "type": "array",
      "description": "Conditions under which the app shows the preview, for example `between-dates`. Forwarded as-is: the server does not evaluate them.",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "args": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "strings": {
      "type": "object",
      "description": "Localized copy keyed by language code (`en`, `fr`, ...). Each language maps keys such as `preview_bar_title`, `preview_bar_body`, `preview_bar_settings_body`, `preview_bar_button_title`, `preview_bar_button_url`, `trip_results_header`, `trip_results_notice` and `trip_results_notice_url` to text.",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "feed_code",
    "network_ids",
    "replaced_feed_codes",
    "replaced_network_ids",
    "in_beta"
  ],
  "$defs": {
    "NetworkId": {
      "type": "string",
      "title": "NetworkId",
      "description": "Identifies a given network of transit services"
    }
  }
}