arazzo: 1.0.1 info: title: OpenWeatherMap Locate And Report Current Weather summary: Geocode a city name, then fetch current weather and a five day forecast for it. description: >- The most common OpenWeather entry point. The workflow resolves a free-text city name into geographic coordinates with the geocoding API, then feeds the resolved latitude and longitude into the current weather and five day three hour forecast endpoints. Every step spells out its request inline, including the appid API key the security scheme requires, so the flow can be read and executed without opening the underlying OpenAPI descriptions. version: 1.0.0 sourceDescriptions: - name: geocodingApi url: ../openapi/openweathermap-geocoding-openapi.yml type: openapi - name: currentWeatherApi url: ../openapi/openweathermap-current-weather-openapi.yml type: openapi - name: forecastApi url: ../openapi/openweathermap-forecast-openapi.yml type: openapi workflows: - workflowId: locate-and-report-current-weather summary: Resolve a city name to coordinates, then return current weather and a five day forecast. description: >- Calls direct geocoding to turn a city query into coordinates, captures the first match, and chains the latitude and longitude into the current weather and five day three hour forecast endpoints. inputs: type: object required: - q - appid properties: q: type: string description: City name, optionally with state and ISO country codes, comma-separated. limit: type: integer description: Maximum number of geocoding matches to return (1 to 5). units: type: string description: Units of measurement (standard, metric, or imperial). lang: type: string description: Localization language code for weather condition text. appid: type: string description: OpenWeather API key. steps: - stepId: geocodeCity description: >- Resolve the supplied city query into geographic coordinates, keeping the first and best match. operationId: getDirectGeocoding parameters: - name: q in: query value: $inputs.q - name: limit in: query value: $inputs.limit - name: appid in: query value: $inputs.appid successCriteria: - condition: $statusCode == 200 outputs: lat: $response.body#/0/lat lon: $response.body#/0/lon name: $response.body#/0/name country: $response.body#/0/country - stepId: currentWeather description: >- Fetch current weather at the geocoded coordinates, including temperature, wind, humidity, and a brief weather condition. operationId: getCurrentWeather parameters: - name: lat in: query value: $steps.geocodeCity.outputs.lat - name: lon in: query value: $steps.geocodeCity.outputs.lon - name: units in: query value: $inputs.units - name: lang in: query value: $inputs.lang - name: appid in: query value: $inputs.appid successCriteria: - condition: $statusCode == 200 outputs: temp: $response.body#/main/temp conditions: $response.body#/weather/0/main cityName: $response.body#/name - stepId: fiveDayForecast description: >- Fetch the five day three hour forecast at the same coordinates to round out the current snapshot with near-term predictions. operationId: getForecastFiveDay parameters: - name: lat in: query value: $steps.geocodeCity.outputs.lat - name: lon in: query value: $steps.geocodeCity.outputs.lon - name: units in: query value: $inputs.units - name: lang in: query value: $inputs.lang - name: appid in: query value: $inputs.appid successCriteria: - condition: $statusCode == 200 outputs: timestampCount: $response.body#/cnt forecastList: $response.body#/list outputs: lat: $steps.geocodeCity.outputs.lat lon: $steps.geocodeCity.outputs.lon currentTemp: $steps.currentWeather.outputs.temp currentConditions: $steps.currentWeather.outputs.conditions forecastList: $steps.fiveDayForecast.outputs.forecastList