{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/openwaters-io/json-schema/openwaters-io-current-station-summary-schema.json",
  "title": "CurrentStationSummary",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openwaters-io-openapi.json#/components/schemas/CurrentStationSummary",
  "allOf": [
    {
      "$ref": "#/$defs/StationSummary"
    },
    {
      "$ref": "#/$defs/CurrentAvailability"
    }
  ],
  "$defs": {
    "CurrentAvailability": {
      "type": "object",
      "properties": {
        "bins": {
          "type": "array",
          "description": "Every depth bin of this station, primary first",
          "items": {
            "$ref": "#/$defs/CurrentBin"
          }
        },
        "predictions": {
          "type": "boolean",
          "description": "Whether this API can serve predictions for the station"
        },
        "unavailable": {
          "type": "string",
          "description": "Why predictions can't be served, when `predictions` is false"
        }
      },
      "required": [
        "bins",
        "predictions"
      ]
    },
    "CurrentBin": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Station ID for this bin"
        },
        "bin": {
          "type": "integer",
          "description": "Bin number; absent for the primary bin, which the bare station ID selects"
        }
      },
      "required": [
        "id"
      ]
    },
    "StationAttribution": {
      "type": "string",
      "description": "The credit to display wherever the station's data is shown"
    },
    "StationLicense": {
      "type": "object",
      "description": "The license of the station's data. Hosts must honor `commercial_use: false` (CC BY-NC stations).",
      "properties": {
        "type": {
          "type": "string"
        },
        "commercial_use": {
          "type": "boolean"
        },
        "url": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        }
      }
    },
    "StationSummary": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "latitude": {
          "type": "number"
        },
        "longitude": {
          "type": "number"
        },
        "region": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "continent": {
          "type": "string"
        },
        "timezone": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "reference",
            "subordinate"
          ]
        },
        "license": {
          "$ref": "#/$defs/StationLicense"
        },
        "attribution": {
          "$ref": "#/$defs/StationAttribution"
        }
      }
    }
  }
}