{
  "openapi": "3.1.0",
  "info": {
    "title": "GOES Health API",
    "description": "API for accessing outdoor health risk data.",
    "license": {
      "name": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.goes.health"
    }
  ],
  "paths": {
    "/v1/risks/environmental": {
      "get": {
        "description": "Returns a list of environmental health risks based on location and selected IDs.",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "description": "The latitude and longitude, formatted as `{latitude},{longitude}`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "description": "A comma-separated list of environmental risk IDs.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exclude_risk_fields",
            "in": "query",
            "description": "Comma-separated list of sections to exclude from the response. Options: `tips`, `summary`, `score`",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "tips,summary"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of environmental risks.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "responseId": {
                      "type": "string",
                      "format": "uuid",
                      "description": "A unique identifier for this response"
                    },
                    "risks": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Risk"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/risks/wildlife": {
      "get": {
        "description": "Returns a list of wildlife-related risks based on location and selected IDs.",
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "description": "The latitude and longitude, formatted as `{latitude},{longitude}`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "description": "A comma-separated list of wildlife risk IDs.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exclude_risk_fields",
            "in": "query",
            "description": "Comma-separated list of sections to exclude from the response. Options: `tips`, `summary`, `score`",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "tips,summary"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of wildlife risks.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "responseId": {
                      "type": "string",
                      "format": "uuid",
                      "description": "A unique identifier for this response"
                    },
                    "risks": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WildlifeRisk"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/risks/plants": {
      "get": {
        "description": "Returns a list of plant-related risks based on location and selected IDs.",
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "description": "The latitude and longitude, formatted as `{latitude},{longitude}`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "description": "A comma-separated list of plant risk IDs.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exclude_risk_fields",
            "in": "query",
            "description": "Comma-separated list of sections to exclude from the response. Options: `tips`, `summary`, `score`",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "tips,summary"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of plant risks.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "responseId": {
                      "type": "string",
                      "format": "uuid",
                      "description": "A unique identifier for this response"
                    },
                    "risks": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PlantRisk"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/feedback": {
      "post": {
        "description": "Submit feedback about the accuracy of a risk assessment response based on local knowledge or observations.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "responseId",
                  "feedback"
                ],
                "properties": {
                  "responseId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The UUID of the risk assessment response you're providing feedback about"
                  },
                  "feedback": {
                    "type": "string",
                    "description": "Your feedback about the accuracy of the risk assessment, including any local knowledge or observations that support your feedback",
                    "example": "I am a local park ranger and can confirm there is no poison sumac in this area. The nearest occurrence is over 50 miles away in a different ecosystem."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Your API key for authentication.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Bearer your_api_key_here"
          }
        ],
        "responses": {
          "200": {
            "description": "Feedback submitted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Thank you for your feedback."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request - missing or invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Invalid responseId format"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/risks/overview": {
      "get": {
        "description": "Returns an overview of all risks for a given location with default settings.",
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "description": "The latitude and longitude, formatted as `{latitude},{longitude}`.",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^-?\\d+(\\.\\d+)?,-?\\d+(\\.\\d+)?$"
            },
            "example": "37.7485,-119.5331"
          },
          {
            "name": "options.length",
            "in": "query",
            "description": "Controls the length of the Activity Intelligence text.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "brief",
                "standard",
                "detailed"
              ],
              "default": "standard"
            }
          },
          {
            "name": "options.exclude",
            "in": "query",
            "description": "Comma-separated list of sections to exclude from the response. Options: `alerts`, `environment`, `wildlife`, `plants`, `activity_intelligence`",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "alerts,wildlife"
          }
        ],
        "responses": {
          "200": {
            "description": "A basic overview of all risks with default settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "responseId",
                    "activity_intelligence",
                    "risks"
                  ],
                  "properties": {
                    "responseId": {
                      "type": "string",
                      "format": "uuid",
                      "description": "A unique identifier for this response"
                    },
                    "activity_intelligence": {
                      "type": "string",
                      "description": "An AI-generated summary paragraph that consolidates all risks and alerts"
                    },
                    "risks": {
                      "type": "array",
                      "description": "A comprehensive array of all risks from environmental, wildlife, and plant sources",
                      "items": {
                        "$ref": "#/components/schemas/OverviewRisk"
                      }
                    },
                    "alerts": {
                      "type": "array",
                      "description": "An array of active NOAA weather alerts for the United States",
                      "items": {
                        "type": "object",
                        "required": [
                          "event",
                          "severity",
                          "senderName",
                          "headline",
                          "description",
                          "instruction"
                        ],
                        "properties": {
                          "event": {
                            "type": "string",
                            "description": "The type of weather event",
                            "example": "Severe Thunderstorm Warning"
                          },
                          "severity": {
                            "type": "string",
                            "description": "The severity level of the alert as specified by NOAA",
                            "example": "Severe"
                          },
                          "senderName": {
                            "type": "string",
                            "description": "The NWS office that issued the alert",
                            "example": "NWS Los Angeles CA"
                          },
                          "headline": {
                            "type": "string",
                            "description": "A complete headline of the alert including timing and issuing office",
                            "example": "Severe Thunderstorm Warning issued August 15 at 2:30PM PDT until August 15 at 5:00PM PDT by NWS Los Angeles CA"
                          },
                          "description": {
                            "type": "string",
                            "description": "Detailed description of the weather event, including specific hazards, source of information, and impacts",
                            "example": "At 2:30 PM PDT, a severe thunderstorm was located over the Santa Monica Mountains, moving east at 25 mph. HAZARD...60 mph wind gusts and penny size hail. SOURCE...Radar indicated."
                          },
                          "instruction": {
                            "type": "string",
                            "description": "Safety instructions and recommended actions for the public",
                            "example": "For your protection move to an interior room on the lowest floor of a building. Torrential rainfall is occurring with this storm, and may lead to flash flooding."
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "responseId": "123e4567-e89b-12d3-a456-426614174000",
                  "activity_intelligence": "For your Half Dome hike today, be prepared for significant elevation gain and exposed terrain. The combination of high altitude, bear activity, and lightning risk requires careful planning. Start early and monitor weather conditions closely.",
                  "risks": [
                    {
                      "id": "sunburn",
                      "title": "Sunburn",
                      "source": "environment",
                      "status": "applicable",
                      "score": 2,
                      "summary": "<string>",
                      "tips": [
                        "<string>"
                      ]
                    }
                  ],
                  "alerts": []
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Returns a comprehensive overview of all risks for a given location with personalized Activity Intelligence.",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Your API key for authentication.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Bearer your_api_key_here"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "location"
                ],
                "properties": {
                  "location": {
                    "type": "string",
                    "description": "The latitude and longitude, formatted as `{latitude},{longitude}`.",
                    "pattern": "^-?\\d+(\\.\\d+)?,-?\\d+(\\.\\d+)?$",
                    "example": "37.7749,-122.4194"
                  },
                  "options": {
                    "$ref": "#/components/schemas/Options"
                  },
                  "profile": {
                    "$ref": "#/components/schemas/Profile"
                  }
                }
              },
              "example": {
                "location": "37.7485,-119.5331",
                "options": {
                  "length": "standard",
                  "exclude": []
                },
                "profile": {
                  "activity": "hiking",
                  "age": 32,
                  "outdoor_experience": 2,
                  "context": "First time hiker"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A comprehensive overview of all risks.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "responseId",
                    "activity_intelligence",
                    "risks"
                  ],
                  "properties": {
                    "responseId": {
                      "type": "string",
                      "format": "uuid",
                      "description": "A unique identifier for this response"
                    },
                    "activity_intelligence": {
                      "type": "string",
                      "description": "An AI-generated summary paragraph that consolidates all risks and alerts, personalized to your activity and experience level"
                    },
                    "risks": {
                      "type": "array",
                      "description": "A comprehensive array of all risks from environmental, wildlife, and plant sources",
                      "items": {
                        "$ref": "#/components/schemas/OverviewRisk"
                      }
                    },
                    "alerts": {
                      "type": "array",
                      "description": "An array of active NOAA weather alerts for the United States",
                      "items": {
                        "type": "object",
                        "required": [
                          "event",
                          "severity",
                          "senderName",
                          "headline",
                          "description",
                          "instruction"
                        ],
                        "properties": {
                          "event": {
                            "type": "string",
                            "description": "The type of weather event",
                            "example": "Severe Thunderstorm Warning"
                          },
                          "severity": {
                            "type": "string",
                            "description": "The severity level of the alert as specified by NOAA",
                            "example": "Severe"
                          },
                          "senderName": {
                            "type": "string",
                            "description": "The NWS office that issued the alert",
                            "example": "NWS Los Angeles CA"
                          },
                          "headline": {
                            "type": "string",
                            "description": "A complete headline of the alert including timing and issuing office",
                            "example": "Severe Thunderstorm Warning issued August 15 at 2:30PM PDT until August 15 at 5:00PM PDT by NWS Los Angeles CA"
                          },
                          "description": {
                            "type": "string",
                            "description": "Detailed description of the weather event, including specific hazards, source of information, and impacts",
                            "example": "At 2:30 PM PDT, a severe thunderstorm was located over the Santa Monica Mountains, moving east at 25 mph. HAZARD...60 mph wind gusts and penny size hail. SOURCE...Radar indicated."
                          },
                          "instruction": {
                            "type": "string",
                            "description": "Safety instructions and recommended actions for the public",
                            "example": "For your protection move to an interior room on the lowest floor of a building. Torrential rainfall is occurring with this storm, and may lead to flash flooding."
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "responseId": "123e4567-e89b-12d3-a456-426614174000",
                  "activity_intelligence": "For your Half Dome hike today, be prepared for significant elevation gain and exposed terrain. The combination of high altitude, bear activity, and lightning risk requires careful planning. Start early and monitor weather conditions closely.",
                  "risks": [
                    {
                      "id": "sunburn",
                      "title": "Sunburn",
                      "source": "environment",
                      "status": "applicable",
                      "score": 2,
                      "summary": "<string>",
                      "tips": [
                        "<string>"
                      ]
                    }
                  ],
                  "alerts": []
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": 400,
                  "message": "Invalid location format"
                }
              }
            }
          }
        }
      }
    },
    "/v1/risks/environmental/forecast": {
      "get": {
        "description": "Precision hourly and extended daily forecast of environmental risks for a location.",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "description": "The latitude and longitude, formatted as `{latitude},{longitude}`.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "37.7485,-119.5331"
          },
          {
            "name": "ids",
            "in": "query",
            "description": "A comma-separated list of environmental risk IDs to include in the forecast.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exclude",
            "in": "query",
            "description": "Comma-separated list of forecast types to exclude from the response. Options: `hourly`, `daily`",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "daily"
          },
          {
            "name": "exclude_risk_fields",
            "in": "query",
            "description": "Comma-separated list of sections to exclude from the response. Options: `tips`, `summary`, `score`",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "tips,summary"
          }
        ],
        "responses": {
          "200": {
            "description": "A forecast of environmental risks with hourly and/or daily data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "responseId"
                  ],
                  "properties": {
                    "responseId": {
                      "type": "string",
                      "format": "uuid",
                      "description": "A unique identifier for this response"
                    },
                    "hourly": {
                      "type": "array",
                      "description": "48 hourly entries, each containing the set of environmental risks for that hour.",
                      "items": {
                        "$ref": "#/components/schemas/RiskForecastEntry"
                      }
                    },
                    "daily": {
                      "type": "array",
                      "description": "32 daily entries over 8 days. 4 timestamps per day: morning (06:00), noon (12:00), evening (18:00), midnight (00:00), each containing the set of environmental risks.",
                      "items": {
                        "$ref": "#/components/schemas/RiskForecastEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/risks/overview/forecast": {
      "get": {
        "description": "Returns a 48-hour forecast overview of all risks for a given location with default settings.",
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "description": "The latitude and longitude, formatted as `{latitude},{longitude}`.",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^-?\\d+(\\.\\d+)?,-?\\d+(\\.\\d+)?$"
            },
            "example": "37.7485,-119.5331"
          },
          {
            "name": "options.length",
            "in": "query",
            "description": "Controls the length of the forecast summary text for each hour.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "brief",
                "standard",
                "detailed"
              ],
              "default": "standard"
            }
          },
          {
            "name": "options.exclude",
            "in": "query",
            "description": "Comma-separated list of sections to exclude from the response. Options: `alerts`, `environment`, `wildlife`, `plants`, `activity_intelligence`",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "alerts,wildlife"
          }
        ],
        "responses": {
          "200": {
            "description": "A 48-hour forecast overview of risks with default settings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "responseId",
                    "activity_intelligence",
                    "forecast"
                  ],
                  "properties": {
                    "responseId": {
                      "type": "string",
                      "format": "uuid",
                      "description": "A unique identifier for this response"
                    },
                    "activity_intelligence": {
                      "type": "string",
                      "description": "AI-generated summary of the overall 48-hour forecast"
                    },
                    "forecast": {
                      "type": "array",
                      "description": "48 entries (hourly) each containing risk details and alerts.",
                      "items": {
                        "$ref": "#/components/schemas/OverviewForecastEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Returns a 48-hour forecast overview of all risks for a given location with personalized AI summaries.",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Your API key for authentication.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Bearer your_api_key_here"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "location"
                ],
                "properties": {
                  "location": {
                    "type": "string",
                    "description": "The latitude and longitude, formatted as `{latitude},{longitude}`.",
                    "pattern": "^-?\\d+(\\.\\d+)?,-?\\d+(\\.\\d+)?$",
                    "example": "37.7749,-122.4194"
                  },
                  "options": {
                    "$ref": "#/components/schemas/Options"
                  },
                  "profile": {
                    "$ref": "#/components/schemas/Profile"
                  }
                }
              },
              "example": {
                "location": "37.7485,-119.5331",
                "options": {
                  "length": "standard",
                  "exclude": []
                },
                "profile": {
                  "activity": "hiking",
                  "age": 32,
                  "outdoor_experience": 2,
                  "context": "Planning a multi-day backpacking trip"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A 48-hour forecast overview of risks with personalized summaries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "responseId",
                    "activity_intelligence",
                    "forecast"
                  ],
                  "properties": {
                    "responseId": {
                      "type": "string",
                      "format": "uuid",
                      "description": "A unique identifier for this response"
                    },
                    "activity_intelligence": {
                      "type": "string",
                      "description": "AI-generated summary of the overall 48-hour forecast, personalized to your activity and experience level when using the POST method"
                    },
                    "forecast": {
                      "type": "array",
                      "description": "48 entries (hourly) each containing risk details and alerts.",
                      "items": {
                        "$ref": "#/components/schemas/OverviewForecastEntry"
                      }
                    }
                  }
                },
                "example": {
                  "responseId": "123e4567-e89b-12d3-a456-426614174000",
                  "activity_intelligence": "For your backpacking trip, early morning conditions are ideal with low UV and minimal lightning risk. This is the perfect time to break camp and start your hike before temperatures rise.",
                  "forecast": [
                    {
                      "time": "2024-06-27T00:00:00Z",
                      "risks": [
                        {
                          "id": "sunburn",
                          "title": "Sunburn",
                          "source": "environment",
                          "status": "applicable",
                          "score": 2,
                          "summary": "<string>",
                          "tips": [
                            "<string>"
                          ]
                        }
                      ],
                      "alerts": []
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": 400,
                  "message": "Invalid location format"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Risk": {
        "type": "object",
        "required": [
          "id",
          "title",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for the risk",
            "example": "sunburn"
          },
          "title": {
            "type": "string",
            "description": "The human-readable title of the risk",
            "example": "Sunburn"
          },
          "status": {
            "type": "string",
            "enum": [
              "applicable",
              "not_applicable",
              "unavailable",
              "error"
            ],
            "description": "The status of this risk assessment"
          },
          "score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3,
            "description": "A number from 0-3 representing the risk level (0: None, 1: Low, 2: Medium, 3: High).",
            "example": 2
          },
          "summary": {
            "type": "string",
            "description": "A 1-2 sentence summary of the tips and key information.",
            "example": "<string>"
          },
          "tips": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of safety tips."
          },
          "error": {
            "type": "string",
            "description": "Error message describing what went wrong. Only present when status is 'error'."
          }
        }
      },
      "WildlifeRisk": {
        "type": "object",
        "required": [
          "id",
          "title",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for the wildlife risk",
            "example": "bears"
          },
          "title": {
            "type": "string",
            "description": "The human-readable title of the wildlife risk",
            "example": "Bears"
          },
          "status": {
            "type": "string",
            "enum": [
              "applicable",
              "not_applicable",
              "unavailable",
              "error"
            ],
            "description": "The status of this risk assessment"
          },
          "score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3,
            "description": "The prevalence score (0: None, 1: Low, 2: Medium, 3: High).",
            "example": 2
          },
          "summary": {
            "type": "string",
            "description": "A 1-2 sentence summary of the tips and key information.",
            "example": "<string>"
          },
          "tips": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of safety tips related to this wildlife risk."
          },
          "error": {
            "type": "string",
            "description": "Error message describing what went wrong. Only present when status is 'error'."
          }
        }
      },
      "PlantRisk": {
        "type": "object",
        "required": [
          "id",
          "title",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for the plant risk",
            "example": "poison-ivy"
          },
          "title": {
            "type": "string",
            "description": "The human-readable title of the plant risk",
            "example": "Poison Ivy"
          },
          "status": {
            "type": "string",
            "enum": [
              "applicable",
              "not_applicable",
              "unavailable",
              "error"
            ],
            "description": "The status of this risk assessment"
          },
          "score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3,
            "description": "The prevalence score (0: None, 1: Low, 2: Medium, 3: High).",
            "example": 2
          },
          "summary": {
            "type": "string",
            "description": "A 1-2 sentence summary of the tips and key information.",
            "example": "<string>"
          },
          "tips": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of safety tips related to this plant risk."
          },
          "error": {
            "type": "string",
            "description": "Error message describing what went wrong. Only present when status is 'error'."
          }
        }
      },
      "OverviewRisk": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/EnvironmentalOverviewRisk"
          },
          {
            "$ref": "#/components/schemas/WildlifePlantOverviewRisk"
          }
        ]
      },
      "EnvironmentalOverviewRisk": {
        "type": "object",
        "required": [
          "id",
          "title",
          "source",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for the environmental risk",
            "example": "sunburn"
          },
          "title": {
            "type": "string",
            "description": "The human-readable title of the environmental risk",
            "example": "Sunburn"
          },
          "source": {
            "type": "string",
            "enum": [
              "environment"
            ],
            "description": "The source of this risk",
            "example": "environment"
          },
          "status": {
            "type": "string",
            "enum": [
              "applicable",
              "not_applicable",
              "unavailable",
              "error"
            ],
            "description": "The status of this risk assessment"
          },
          "score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3,
            "description": "A number from 0-3 representing the risk level (0: None, 1: Low, 2: Medium, 3: High).",
            "example": 2
          },
          "summary": {
            "type": "string",
            "description": "A 1-2 sentence summary of the tips and key information.",
            "example": "<string>"
          },
          "tips": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A collection of 1-2 sentence strings with tips and recommendations."
          },
          "error": {
            "type": "string",
            "description": "Error message describing what went wrong. Only present when status is 'error'."
          }
        }
      },
      "WildlifePlantOverviewRisk": {
        "type": "object",
        "required": [
          "id",
          "title",
          "source",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for the wildlife or plant risk",
            "example": "bears"
          },
          "title": {
            "type": "string",
            "description": "The human-readable title of the wildlife or plant risk",
            "example": "Bears"
          },
          "source": {
            "type": "string",
            "enum": [
              "wildlife",
              "plants"
            ],
            "description": "The source of this risk",
            "example": "wildlife"
          },
          "status": {
            "type": "string",
            "enum": [
              "applicable",
              "not_applicable",
              "unavailable",
              "error"
            ],
            "description": "The status of this risk assessment"
          },
          "score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3,
            "description": "The prevalence score (0: None, 1: Low, 2: Medium, 3: High)."
          },
          "summary": {
            "type": "string",
            "description": "A 1-2 sentence summary of the tips and key information.",
            "example": "<string>"
          },
          "tips": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A collection of 1-2 sentence strings with tips and recommendations."
          },
          "error": {
            "type": "string",
            "description": "Error message describing what went wrong. Only present when status is 'error'."
          }
        }
      },
      "Error": {
        "required": [
          "error",
          "message"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Options": {
        "type": "object",
        "additionalProperties": false,
        "description": "Configuration options that control how the response is built",
        "properties": {
          "length": {
            "type": "string",
            "enum": [
              "brief",
              "standard",
              "detailed"
            ],
            "default": "standard",
            "description": "Controls the length of the Activity Intelligence text"
          },
          "exclude": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "alerts",
                "environment",
                "wildlife",
                "plants",
                "activity_intelligence"
              ]
            },
            "description": "A list of sections to exclude from the response"
          }
        }
      },
      "Profile": {
        "type": "object",
        "additionalProperties": true,
        "description": "Information about who is going outside. This object is extensible - you can add custom fields beyond the standard ones.",
        "properties": {
          "activity": {
            "type": "string",
            "description": "The outdoor activity you plan to do (e.g., 'hiking', 'camping', 'skiing'). This helps personalize the Activity Intelligence.",
            "example": "hiking"
          },
          "age": {
            "type": "integer",
            "minimum": 0,
            "description": "The age of the person doing the activity. Used to provide age-appropriate risk analysis in the Activity Intelligence.",
            "example": 35
          },
          "outdoor_experience": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4,
            "description": "Experience level with outdoor activities, from 0 (beginner) to 4 (expert).",
            "example": 2
          },
          "context": {
            "type": "string",
            "description": "Any additional context that may be relevant for Activity Intelligence",
            "example": "First time hiker"
          }
        }
      },
      "RiskForecastEntry": {
        "type": "object",
        "required": [
          "time",
          "risks"
        ],
        "properties": {
          "time": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp for the forecast hour"
          },
          "risks": {
            "type": "array",
            "description": "The environmental risks predicted for this hour.",
            "items": {
              "$ref": "#/components/schemas/Risk"
            }
          }
        }
      },
      "OverviewForecastEntry": {
        "type": "object",
        "required": [
          "time",
          "risks"
        ],
        "properties": {
          "time": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp for the forecast hour"
          },
          "risks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OverviewRisk"
            }
          },
          "alerts": {
            "type": "array",
            "description": "Any active NOAA weather alerts for this hour.",
            "items": {
              "type": "object",
              "required": [
                "event",
                "severity",
                "senderName",
                "headline",
                "description",
                "instruction"
              ],
              "properties": {
                "event": {
                  "type": "string"
                },
                "severity": {
                  "type": "string"
                },
                "senderName": {
                  "type": "string"
                },
                "headline": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "instruction": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key",
        "description": "Enter your API key"
      }
    }
  }
}