fix(libdd-telemetry): serialize Method::Other as "*" per OpenAPI spec#1998
Conversation
Clippy Allow Annotation ReportComparing clippy allow annotations between branches:
Summary by Rule
Annotation Counts by File
Annotation Stats by Crate
About This ReportThis report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality. |
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: b1351d4 | Docs | Datadog PR Page | Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1998 +/- ##
==========================================
- Coverage 73.44% 73.39% -0.05%
==========================================
Files 465 465
Lines 77949 77949
==========================================
- Hits 57248 57210 -38
- Misses 20701 20739 +38
🚀 New features to boost your workflow:
|
The serde rename_all = "UPPERCASE" attribute was causing Other to serialize as "OTHER" on the wire, but the OpenAPI spec defines "*" as the valid value for this variant.
f5807e0 to
cbd925c
Compare
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
devflow unqueued this merge request: It did not become mergeable within the expected time |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
Summary
The
Methodenum'sOthervariant was serializing as"OTHER"on the wire dueto the
#[serde(rename_all = "UPPERCASE")]attribute. However, theOpenAPI spec
defines
"*"as the value for this variant —"OTHER"does not appear in theschema at all. The existing code comment acknowledged this discrepancy but did not
fix it.
This PR adds
#[serde(rename = "*")]onOtherto override the enum-levelrename_allfor that one variant, making the wire value match the spec.Impact
Method::Othernow serializes/deserializes as"*"instead of"OTHER"DDOG_METHOD_OTHER = 9is unchanged — ABI-stable for FFI consumerscbindgenreads Rust identifiers, not serde attributes, so the generated header is unaffected🤖 Generated with Claude Code