Document current outlook schema behavior
This commit is contained in:
@@ -63,7 +63,7 @@ func Decode(payload []byte) (any, error) {
|
||||
case standards.SchemaWeatherAlertV1:
|
||||
var out model.WeatherAlertRun
|
||||
return &out, json.Unmarshal(evt.Payload, &out)
|
||||
case standards.SchemaWeatherOutlookV1:
|
||||
case standards.SchemaWeatherOutlookV2:
|
||||
var out model.WeatherOutlookRun
|
||||
return &out, json.Unmarshal(evt.Payload, &out)
|
||||
default:
|
||||
|
||||
@@ -9,8 +9,8 @@ import "gitea.maximumdirect.net/ejr/weatherfeeder/model"
|
||||
## Purpose
|
||||
|
||||
Package `model` defines `weatherfeeder`'s canonical weather payload structs.
|
||||
These structs are emitted as the `payload` of canonical `weather.*.v1` events
|
||||
and are also the domain types consumed by downstream applications such as
|
||||
These structs are emitted as the `payload` of canonical `weather.*` events and
|
||||
are also the domain types consumed by downstream applications such as
|
||||
`weatherapi`.
|
||||
|
||||
The JSON field tags on these structs are part of the wire contract. For the full
|
||||
@@ -27,7 +27,7 @@ Current canonical schema families map to these public types:
|
||||
| `weather.forecast_discussion.v1` | `WeatherForecastDiscussion` |
|
||||
| `weather.weather_story.v1` | `WeatherStoryRun` |
|
||||
| `weather.alert.v1` | `WeatherAlertRun` |
|
||||
| `weather.outlook.v1` | `WeatherOutlookRun` |
|
||||
| `weather.outlook.v2` | `WeatherOutlookRun` |
|
||||
|
||||
Related child types include:
|
||||
|
||||
@@ -41,6 +41,9 @@ Related child types include:
|
||||
- `WeatherOutlookDiscussion`
|
||||
- `WMOCode`
|
||||
|
||||
`WeatherOutlookRun` includes `WeatherOutlookDiscussion` entries as run-level
|
||||
SPC day discussions.
|
||||
|
||||
## Wire And Compatibility Rules
|
||||
|
||||
- JSON tags define canonical payload field names.
|
||||
|
||||
@@ -41,13 +41,13 @@ Canonical schemas emitted after normalization:
|
||||
| `SchemaWeatherForecastDiscussionV1` | `weather.forecast_discussion.v1` |
|
||||
| `SchemaWeatherStoryV1` | `weather.weather_story.v1` |
|
||||
| `SchemaWeatherAlertV1` | `weather.alert.v1` |
|
||||
| `SchemaWeatherOutlookV1` | `weather.outlook.v1` |
|
||||
| `SchemaWeatherOutlookV2` | `weather.outlook.v2` |
|
||||
|
||||
Additional canonical schema constant:
|
||||
Historical canonical schema constant:
|
||||
|
||||
| Constant | Value |
|
||||
|---|---|
|
||||
| `SchemaWeatherOutlookV2` | `weather.outlook.v2` |
|
||||
| `SchemaWeatherOutlookV1` | `weather.outlook.v1` |
|
||||
|
||||
## Raw Schema Constants
|
||||
|
||||
|
||||
Reference in New Issue
Block a user