{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/digitraffic-fi/json-schema/digitraffic-fi-variable-sign-feature-collection-v1-schema.json",
  "title": "VariableSignFeatureCollectionV1",
  "description": "GeoJSON Feature Collection of variable signs",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/digitraffic-fi-variable-sign-v1-api-openapi.yml#/components/schemas/VariableSignFeatureCollectionV1",
  "required": [
    "dataUpdatedTime",
    "features",
    "type"
  ],
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "GeoJSON Object Type"
    },
    "dataUpdatedTime": {
      "type": "string",
      "description": "Date time of the most recent metadata update",
      "format": "date-time"
    },
    "features": {
      "type": "array",
      "description": "GeoJSON Feature Objects",
      "items": {
        "$ref": "#/$defs/VariableSignFeatureV1"
      }
    }
  },
  "$defs": {
    "GeometryObject": {
      "required": [
        "coordinates",
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "GeoJson Geometry Object type",
          "enum": [
            "Point",
            "LineString",
            "Polygon",
            "MultiPoint",
            "MultiLineString",
            "MultiPolygon"
          ]
        },
        "coordinates": {
          "type": "array",
          "description": "GeoJson Geometry Object coordinates",
          "items": {
            "type": "object",
            "description": "GeoJson Geometry Object coordinates"
          }
        }
      },
      "description": "GeoJson Geometry Object"
    },
    "Point": {
      "required": [
        "coordinates",
        "type"
      ],
      "type": "object",
      "description": "GeoJson Point Geometry Object",
      "allOf": [
        {
          "$ref": "#/$defs/GeometryObject"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "Point"
              ]
            },
            "coordinates": {
              "type": "array",
              "description": "An array of coordinates. Coordinates are in WGS84 format in decimal degrees: [LONGITUDE, LATITUDE, {ALTITUDE}]. Altitude is optional and measured in meters.",
              "items": {
                "type": "number",
                "description": "An array of coordinates. Coordinates are in WGS84 format in decimal degrees: [LONGITUDE, LATITUDE, {ALTITUDE}]. Altitude is optional and measured in meters.",
                "format": "double"
              }
            }
          }
        }
      ]
    },
    "SignTextRowV1": {
      "type": "object",
      "properties": {
        "screen": {
          "type": "integer",
          "description": "Screen number",
          "format": "int32"
        },
        "rowNumber": {
          "type": "integer",
          "description": "Row number",
          "format": "int32"
        },
        "text": {
          "type": "string",
          "description": "Text on a row"
        }
      },
      "description": "Variable Sign text row"
    },
    "VariableSignFeatureV1": {
      "required": [
        "geometry",
        "properties",
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "GeoJSON Object Type"
        },
        "geometry": {
          "$ref": "#/$defs/Point"
        },
        "properties": {
          "$ref": "#/$defs/VariableSignPropertiesV1"
        }
      },
      "description": "GeoJSON Feature Object of variable sign"
    },
    "VariableSignPropertiesV1": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id"
        },
        "type": {
          "type": "string",
          "description": "Type",
          "enum": [
            "SPEEDLIMIT",
            "WARNING",
            "INFORMATION"
          ]
        },
        "roadAddress": {
          "type": "string",
          "description": "Sign location as road address"
        },
        "direction": {
          "type": [
            "string",
            "null"
          ],
          "description": "Direction of variable sign, increasing or decreasing road address",
          "enum": [
            "INCREASING",
            "DECREASING",
            null
          ]
        },
        "carriageway": {
          "type": "string",
          "description": "Variable sign placement:\nSINGLE = Single carriageway rod\nRIGHT = First carriageway on the right in the direction of the road number\nLEFT = Second carriageway on the left in the direction of the road number\nBETWEEN = Between the carriageways",
          "enum": [
            "SINGLE",
            "RIGHT",
            "LEFT",
            "BETWEEN",
            "END_OF_ROAD",
            "ALONG",
            "ACROSS"
          ]
        },
        "displayValue": {
          "type": "string",
          "description": "Value that is displayed on the device"
        },
        "additionalInformation": {
          "type": [
            "string",
            "null"
          ],
          "description": "Additional information displayed on the device"
        },
        "effectDate": {
          "type": "string",
          "description": "Information is effect after this date",
          "format": "date-time"
        },
        "cause": {
          "type": [
            "string",
            "null"
          ],
          "description": "Cause for changing the sign:\nAutomaatti = Automatic\nKäsiohjaus = By hand"
        },
        "reliability": {
          "type": "string",
          "description": "Variable sign reliability",
          "enum": [
            "NORMAL",
            "DISCONNECTED",
            "MALFUNCTION"
          ]
        },
        "textRows": {
          "type": "array",
          "description": "Text rows if sign contains a screen",
          "items": {
            "$ref": "#/$defs/SignTextRowV1"
          }
        }
      },
      "description": "Variable Sign properties"
    }
  }
}