mirror of
https://github.com/SigNoz/signoz.git
synced 2026-08-10 23:10:47 +01:00
#### Description - Documents the kind/spec envelope pattern for sum types in `docs/contributing/go/types.md`: the envelope shape, why it goes at the point of variance rather than the resource root, the tagging-style rationale (adjacently tagged vs internally tagged vs sibling optional fields), the validating `UnmarshalJSON`, the OpenAPI variant structs, and the data-migration-vs-storable-twin trade-off for legacy persisted shapes. - Examples are generic (`FooConfig` with `bar`/`baz` kinds), with `RuleThresholdData`, `EvaluationEnvelope` and the dashboard plugins as the in-tree references. - Cross-links from `handler.md`'s "`oneOf` with a discriminator" section, which keeps owning the schema mechanics.