model: add explicit JSON tags and document canonical payload contract

Add lowerCamelCase JSON tags to canonical model types (observation, forecast,
alert) to stabilize the emitted wire format and make payload structure explicit
for downstream sinks.

Introduce internal/model/doc.go to document these structs as versioned,
schema-governed payloads and clarify compatibility expectations (additive
changes preferred; breaking changes require schema bumps).

No functional behavior changes; this formalizes the canonical output contract
ahead of additional sinks and consumers.
This commit is contained in:
2026-01-15 22:39:37 -06:00
parent f13f43cf56
commit e10ba804ca
4 changed files with 56 additions and 63 deletions

10
internal/model/doc.go Normal file
View File

@@ -0,0 +1,10 @@
// FILE: internal/model/doc.go
// Package model defines weatherfeeder's canonical domain payload types.
//
// These structs are emitted as the Payload of canonical events (schemas "weather.*.vN").
// JSON tags are treated as part of the wire contract for sinks (stdout today; others later).
//
// Compatibility guidance:
// - Prefer additive changes.
// - Avoid renaming/removing fields without a schema version bump.
package model