Skip to content

Add OpenWeather connector with weather, forecast, air pollution, and geocoding resources#142

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-openweather-connector
Draft

Add OpenWeather connector with weather, forecast, air pollution, and geocoding resources#142
Copilot wants to merge 4 commits intomainfrom
copilot/add-openweather-connector

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

Description

Implements TypeScript connector for OpenWeatherMap API per issue request. Provides access to current weather, 5-day forecasts, air quality data, and geocoding services.

Architecture:

  • API key authentication via query parameters
  • Four resource modules: weather, forecast, airPollution, geocoding
  • Full TypeScript type definitions
  • Optional logging and metrics hooks

Usage:

import { createConnector } from '@workspace/connector-openweather'

const conn = createConnector()
conn.init({ apiKey: process.env.OPENWEATHER_API_KEY })

// Current weather by location
const weather = await conn.weather.getCurrent({ q: 'London,UK', units: 'metric' })

// 5-day forecast
const forecast = await conn.forecast.get5Day3Hour({ lat: 51.5074, lon: -0.1278 })

// Air quality
const aqi = await conn.airPollution.getCurrent({ lat: 51.5074, lon: -0.1278 })

// Geocoding
const coords = await conn.geocoding.getByLocationName({ q: 'Paris,FR', limit: 1 })

Schemas:

  • JSON schemas for all four endpoint types
  • Documented in schemas/index.json
  • Includes API usage examples and field descriptions

Testing Checklist

  • Unit tests for all public methods
  • Integration tests with mock servers
  • Retry logic (backoff, jitter, circuit breaker)
  • Rate limiting behavior
  • Auth flows and expiry/refresh
  • Error classification and propagation
  • Pagination strategies and edge cases

Notes: OpenWeather API doesn't use pagination—single responses per endpoint. Rate limiting configured via core ConnectorConfig.

Original prompt

This section details on the original issue you should resolve

<issue_title>Connector request: OpenWeather (openweather-connector)</issue_title>
<issue_description>Identifier: openweather-connector
Name: OpenWeather
Category: api
Tags: weather
Homepage: https://openweathermap.org

Description:
https://openweathermap.org/current\
https://openweathermap.org/forecast5\
https://openweathermap.org/api/weathermaps\
https://openweathermap.org/api/air-pollution\
https://openweathermap.org/api/geocoding-api

{
  "kind": "connector-request",
  "identifier": "openweather-connector",
  "name": "OpenWeather",
  "category": "api",
  "tags": [
    "weather"
  ],
  "homepage": "https://openweathermap.org",
  "description": "https://openweathermap.org/current\\
https://openweathermap.org/forecast5\\
https://openweathermap.org/api/weathermaps\\
https://openweathermap.org/api/air-pollution\\
https://openweathermap.org/api/geocoding-api"
}

Comments on the Issue (you are @copilot in this section)

Custom agent used: connector-implementer
Use this agent when the user is creating a new connector for the 514 Labs Registry, needs guidance on implementing connector resources, or is working on connector scaffolding, testing, or schema definition.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link

vercel bot commented Nov 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
registry Error Error Nov 6, 2025 10:44pm

Co-authored-by: georgevanderson <4805522+georgevanderson@users.noreply.github.com>
Copilot AI and others added 2 commits November 6, 2025 22:38
Co-authored-by: georgevanderson <4805522+georgevanderson@users.noreply.github.com>
Co-authored-by: georgevanderson <4805522+georgevanderson@users.noreply.github.com>
Copilot AI changed the title [WIP] Add OpenWeather API connector Add OpenWeather connector with weather, forecast, air pollution, and geocoding resources Nov 6, 2025
Copilot AI requested a review from georgevanderson November 6, 2025 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connector request: OpenWeather (openweather-connector)

2 participants