arazzo: 1.0.1 info: title: OpenWeatherMap Weather Map Overlay Context summary: Geocode a city, read its current weather, then fetch a matching weather map tile. description: >- Pairs a tile overlay with ground-truth conditions. The workflow resolves a city name into coordinates with the geocoding API, reads the current weather at that point, then fetches a PNG weather map tile for a chosen layer so a map UI can show the overlay alongside the live reading. The tile service addresses imagery by z, x, and y tile coordinates rather than latitude and longitude, so those tile coordinates are supplied as inputs (a slippy-map projection step that the OpenAPI descriptions do not expose and so cannot be chained from the geocoding result). 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: weatherMapsApi url: ../openapi/openweathermap-weather-maps-openapi.yml type: openapi workflows: - workflowId: weather-map-overlay-context summary: Resolve a city, read current weather, then fetch a weather map tile overlay. description: >- Calls direct geocoding to turn a city query into coordinates, reads current weather at that point, then fetches a PNG weather map tile for the requested layer and z, x, y tile coordinate. inputs: type: object required: - q - layer - z - x - y - appid properties: q: type: string description: City name, optionally with state and ISO country codes, comma-separated. layer: type: string description: Weather layer to render (clouds_new, precipitation_new, pressure_new, wind_new, or temp_new). z: type: integer description: Tile zoom level. x: type: integer description: Tile X coordinate. y: type: integer description: Tile Y coordinate. units: type: string description: Units of measurement (standard, metric, or imperial). 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: 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 - stepId: currentWeather description: >- Read current weather at the geocoded coordinates to provide ground-truth conditions alongside the map overlay. 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: appid in: query value: $inputs.appid successCriteria: - condition: $statusCode == 200 outputs: temp: $response.body#/main/temp conditions: $response.body#/weather/0/main - stepId: mapTile description: >- Fetch the PNG weather map tile for the requested layer and z, x, y tile coordinate to overlay on a base map. operationId: getWeatherMapTile parameters: - name: layer in: path value: $inputs.layer - name: z in: path value: $inputs.z - name: x in: path value: $inputs.x - name: y in: path value: $inputs.y - name: appid in: query value: $inputs.appid successCriteria: - condition: $statusCode == 200 outputs: tileStatus: $statusCode outputs: lat: $steps.geocodeCity.outputs.lat lon: $steps.geocodeCity.outputs.lon currentTemp: $steps.currentWeather.outputs.temp currentConditions: $steps.currentWeather.outputs.conditions tileStatus: $steps.mapTile.outputs.tileStatus