{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/perigeetides-com/json-schema/perigeetides-com-best-time-result-schema.json",
  "title": "BestTimeResult",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/perigeetides-com-openapi.json#/components/schemas/BestTimeResult",
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "const": "best-time"
    },
    "contractVersion": {
      "type": "string",
      "const": "2026-11-11.1"
    },
    "generatedAt": {
      "type": "string"
    },
    "timeZone": {
      "type": "string"
    },
    "timeZoneLabel": {
      "type": "string"
    },
    "summary": {
      "type": "string"
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "label",
          "url"
        ],
        "additionalProperties": false
      }
    },
    "links": {
      "type": "object",
      "properties": {
        "perigee": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "perigee"
      ],
      "additionalProperties": false
    },
    "place": {
      "type": "object",
      "properties": {
        "query": {
          "type": [
            "string",
            "null"
          ]
        },
        "matchedBy": {
          "type": "string",
          "enum": [
            "station_id",
            "coordinates",
            "name",
            "host_location"
          ]
        },
        "station": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "state": {
              "type": [
                "string",
                "null"
              ]
            },
            "latitude": {
              "type": "number"
            },
            "longitude": {
              "type": "number"
            },
            "kind": {
              "type": "string",
              "enum": [
                "reference",
                "subordinate"
              ]
            },
            "distanceMiles": {
              "type": [
                "number",
                "null"
              ]
            },
            "url": {
              "type": "string",
              "format": "uri"
            }
          },
          "required": [
            "id",
            "name",
            "state",
            "latitude",
            "longitude",
            "kind",
            "distanceMiles",
            "url"
          ],
          "additionalProperties": false
        },
        "note": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "query",
        "matchedBy",
        "station",
        "note"
      ],
      "additionalProperties": false
    },
    "activity": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "enum": [
            "tidepooling",
            "beachcombing",
            "clamming",
            "fishing",
            "paddling",
            "boating",
            "photography",
            "beach_walk"
          ]
        },
        "label": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "label"
      ],
      "additionalProperties": false
    },
    "searched": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "days": {
          "type": "number"
        }
      },
      "required": [
        "from",
        "to",
        "days"
      ],
      "additionalProperties": false
    },
    "heightUnit": {
      "type": "string",
      "enum": [
        "ft",
        "m"
      ]
    },
    "speedUnit": {
      "type": "string"
    },
    "windows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "rank": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "rating": {
            "type": "string",
            "enum": [
              "excellent",
              "good",
              "fair",
              "poor"
            ]
          },
          "score": {
            "type": "number"
          },
          "date": {
            "type": "string"
          },
          "dayLabel": {
            "type": "string"
          },
          "start": {
            "type": "object",
            "properties": {
              "at": {
                "type": "string"
              },
              "time": {
                "type": "string"
              }
            },
            "required": [
              "at",
              "time"
            ],
            "additionalProperties": false
          },
          "end": {
            "type": "object",
            "properties": {
              "at": {
                "type": "string"
              },
              "time": {
                "type": "string"
              }
            },
            "required": [
              "at",
              "time"
            ],
            "additionalProperties": false
          },
          "headline": {
            "type": "string"
          },
          "tide": {
            "type": [
              "string",
              "null"
            ]
          },
          "wind": {
            "type": [
              "string",
              "null"
            ]
          },
          "light": {
            "type": [
              "string",
              "null"
            ]
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cautions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "rank",
          "rating",
          "score",
          "date",
          "dayLabel",
          "start",
          "end",
          "headline",
          "tide",
          "wind",
          "light",
          "reasons",
          "cautions"
        ],
        "additionalProperties": false
      }
    },
    "windConsidered": {
      "type": "boolean"
    },
    "alerts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "event": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "headline": {
            "type": [
              "string",
              "null"
            ]
          },
          "ends": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "event",
          "severity",
          "headline",
          "ends"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "kind",
    "contractVersion",
    "generatedAt",
    "timeZone",
    "timeZoneLabel",
    "summary",
    "notes",
    "sources",
    "links",
    "place",
    "activity",
    "searched",
    "heightUnit",
    "speedUnit",
    "windows",
    "windConsidered",
    "alerts"
  ],
  "additionalProperties": false
}