{
  "$id": "https://schema.nfh.global/Frequency/v2.0",
  "x-iri": "https://schema.nfh.global/Frequency/v2.0",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Frequency",
  "type": "object",
  "description": "A headway-based service specification indicating how often a vehicle runs on a route within a given time window.",
  "properties": {
    "headwaySecs": {
      "description": "Time in seconds between consecutive vehicle departures",
      "type": "number"
    },
    "exactTimes": {
      "description": "Whether departures are at exact scheduled times (true) or headway-based (false)",
      "type": "boolean"
    },
    "startTime": {
      "description": "Time at which this frequency period begins (HH:MM:SS)",
      "type": "string"
    },
    "endTime": {
      "description": "Time at which this frequency period ends (HH:MM:SS)",
      "type": "string"
    },
    "id": {
      "description": "Unique identifier for the constraint",
      "type": "string"
    },
    "constraintType": {
      "description": "Type of constraint (extensible term)",
      "type": "string"
    },
    "operator": {
      "description": "Comparator operator (e.g. <=, >=, =)",
      "type": "string"
    },
    "value": {
      "description": "Numeric value of the constraint",
      "type": "number"
    },
    "unitCode": {
      "description": "Unit of measure code (UN/ECE Rec 20)",
      "type": "string"
    },
    "validity": {
      "description": "Validity window for this constraint",
      "$ref": "https://schema.nfh.global/TimePeriod/v2.1/schema.json"
    }
  },
  "additionalProperties": false,
  "x-tags": [
    "mobility",
    "ride-hailing"
  ]
}
