You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(wire-format): flip meshkit JSON tags to canonical camelCase (Phase 7c)
Per the ecosystem-wide identifier-naming contract (camelCase on the wire,
snake_case in the database, ORM is the boundary — see
meshery/schemas/AGENTS.md), flip all snake_case `json:` tags on wire-facing
meshkit types to camelCase. `db:` tags are preserved as snake_case; `yaml:`
tags on config structs are preserved as their existing snake_case (yaml
files are user-facing config, not a Meshery API wire contract).
The meshkit Event type is the load-bearing change: it is embedded into
meshery-cloud's EventResult and meshery server's events stream, so its
snake_case keys (acted_upon, user_id, system_id, created_at, ...) were
leaking out of every downstream API even after Phase 4 flipped the
local cloud types. With this change, every meshkit-emitted event field
is camelCase end-to-end.
Files flipped:
- models/events/events.go (11 tags: actedUpon, userId,
systemId, operationId, createdAt,
updatedAt, deletedAt; plus the
four EventsFilter tags sortOn,
actedUpon, userId, systemId)
- models/catalog/v1alpha1/catalog.go (4 tags: contentClass,
publishedVersion, patternCaveats,
patternInfo)
- database/database.go (3 tags: createdAt, updatedAt,
deletedAt on the shared Model)
- tracing/tracing.go (2 tags: serviceName,
serviceVersion — yaml: kept
snake_case for config files)
- utils/kubernetes/kubernetes.go (1 tag: dynamicKubeClient)
- models/smi_conformance.go (1 tag: mesheryId)
- generators/github/package.go (1 tag: sourceUrl)
Docs updated:
- docs/event-streaming.md excerpt updated to reflect camelCase JSON tags
on the canonical Event struct.
Explicitly excluded (NOT flipped) per scope:
- cmd/errorutil/internal/{component,error}/*.go — internal output schema
for the errorutil tool (consumed by CI / `make error`); not a wire
contract.
- utils/walker/github.go — github API mirror; 3rd-party wire contract.
- utils/csv/csv_test.go — `person_age` is a CSV column header in a test
fixture, not a json wire contract.
Cross-repo follow-ups required after meshkit releases a tag containing
this change:
- meshery: bump go.mod meshkit dep; UI consumers of /api/system/events
must read camelCase (actedUpon, userId, systemId, createdAt, ...).
- meshery-cloud: bump go.mod meshkit dep; the embedded Event in
EventResult now emits camelCase, so the cloud UI events table must
read camelCase.
- meshery-extensions: bump go.mod meshkit dep; verify catalog/event
surfaces.
Verification:
- `go build ./...` clean
- `go vet ./...` clean
- `go test -count=1 ./...` all packages pass
Signed-off-by: Lee Calcote <leecalcote@gmail.com>
// PatternCaveats Specific stipulations to consider and known behaviors to be aware of when using this design.
20
-
PatternCaveatsstring`json:"pattern_caveats"`
20
+
PatternCaveatsstring`json:"patternCaveats"`
21
21
22
22
// PatternInfo Purpose of the design along with its intended and unintended uses.
23
-
PatternInfostring`json:"pattern_info"`
23
+
PatternInfostring`json:"patternInfo"`
24
24
25
25
// Contains reference to the dark and light mode snapshots of the catalog.
26
26
SnapshotURL []string`json:"imageURL,omitempty"`// this will require updating exisitng catalog data as well. updated the json tag to match previous key name, so changes will not be required in exisitng catgalogs
0 commit comments