Skip to content

Latest commit

 

History

History
101 lines (66 loc) · 2.25 KB

File metadata and controls

101 lines (66 loc) · 2.25 KB

Atmos Weather

Atmos Weather is a native SwiftUI weather app prototype for iOS.

Launch with mock weather data

Build and run the app with XcodeBuildMCP first:

../../build/cli.js simulator build-and-run

Then relaunch the installed app with the mock API argument:

../../build/cli.js simulator launch-app \
  --bundle-id com.sentry.weather.Weather \
  --args=--mock-weather-api

JSON fixtures

Fixture JSON files live in:

WeatherTests/Fixtures/

Current fixtures:

  • WeatherTests/Fixtures/default-locations.json
  • WeatherTests/Fixtures/search-locations.json
  • WeatherTests/Fixtures/weather-report-loc-current-san-francisco.json

API schemas

OpenAI-compatible API schema files live in:

Schemas/

Current schemas:

  • Schemas/default-locations.schema.json
  • Schemas/search-locations.schema.json
  • Schemas/weather-report.schema.json

These schemas describe the JSON response shape expected by the DTO layer.

Expected API endpoints

The production client is URLSessionWeatherAPIClient. It currently expects a JSON API rooted at:

https://api.atmosweather.example/v1

All endpoints are GET requests.

Purpose Method Path Request shape Schema
Default saved locations GET /locations/default No path params, query params, or body. Schemas/default-locations.schema.json
Search locations GET /locations/search Query string: query=<string> Schemas/search-locations.schema.json
Weather report for a location GET /weather/{locationID} Path param: locationID=<WeatherLocationDTO.id> Schemas/weather-report.schema.json

Request examples

Default locations:

GET /v1/locations/default

Search locations:

GET /v1/locations/search?query=San%20Francisco

Weather report:

GET /v1/weather/loc-current-san-francisco

Response expectations

  • Responses must be JSON.
  • Successful responses should use a 2xx HTTP status code.
  • Non-2xx responses are treated as API failures.

Tests

Run the app test suite through XcodeBuildMCP:

../../build/cli.js simulator test

UI tests inject --mock-weather-api themselves so they do not depend on the production API endpoint.