Skip to content

adr-018: snake_case wire/events (AEP conformance; reverses camelCase draft) - #13

Merged
croadfeldt merged 1 commit into
mainfrom
docs/adr-018-snake-case
Jun 27, 2026
Merged

croadfeldt merged 1 commit into
mainfrom
docs/adr-018-snake-case

Conversation

@croadfeldt

Copy link
Copy Markdown
Owner

Revises ADR-018 from camelCase to snake_case for wire + event payloads, matching the UDLM data-model casing reversal (companion: croadfeldt/udlm#11) and conforming to AEP (aep.dev, snake_case).

Why

UDLM is consumed natively (canonical data model) → the model is the wire form → one casing. DCM's API is AEP-bound (lint-enforced), and AEP's fields are snake_case. Native-universal consumption + AEP jointly force snake_case. The camelCase first draft hadn't accounted for AEP.

Corroboration: architecture/DISCUSSION-TOPICS.md already records the dcm-project engineering team's own established pattern as snake_case (it flags PR #18's camelCase as contradicting the team) — so this reversal aligns us with both AEP and the team.

Changes

  • Wire/event payloads → snake_case; Go snake json tags; Python Pydantic maps attribute→wire directly — the alias_generator=to_camel requirement is removed (simpler).
  • CloudEvents envelope + dot-notation topics unchanged (orthogonal to payload casing).
  • Casing changes only at an export adapter to a foreign domain (e.g. K8s CRD), never in the core.
  • adr/README.md ADR-018 row updated.

No code in this PR (ADR + index only); the existing OpenAPI specs are already snake_case.

…draft)

Revises ADR-018 from camelCase to snake_case for the wire and event payloads, to
match the UDLM data-model casing reversal (UDLM naming-conventions §4) and conform
to AEP (aep.dev, the dcm-project team's adopted API standard, snake_case).

UDLM is consumed natively (canonical data model) → the model IS the wire form → one
casing; the AEP-bound API forces snake_case. Native consumption + AEP jointly settle
it. The camelCase first draft was based on research that hadn't accounted for AEP.

- Wire/event payloads snake_case; Go uses snake json tags; Python Pydantic maps
  attribute→wire directly (the `alias_generator=to_camel` requirement is removed).
- CloudEvents envelope + dot-notation topics unchanged (orthogonal to payload casing).
- Casing only changes at an export adapter to a foreign domain (e.g. K8s CRD).
- adr/README.md row updated. (Corroboration: DISCUSSION-TOPICS records the
  dcm-project team's own established pattern as snake_case — the reversal aligns us.)

Companion to croadfeldt/udlm#11.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant