Skip to content

Commit cbd925c

Browse files
committed
Fix Method::Other to serialize as "*" per OpenAPI spec
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.
1 parent 500c147 commit cbd925c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

libdd-telemetry/src/data/payloads.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@ pub enum Method {
126126
Options = 6,
127127
Trace = 7,
128128
Connect = 8,
129-
Other = 9, //This is specified as "*" in the OpenAPI spec
129+
// The OpenAPI spec uses "*" for this variant. Whether "Other" accurately
130+
// describes the "*" concept (any method) or whether it should be a
131+
// catch-all for unknown methods is unclear.
132+
#[serde(rename = "*")]
133+
Other = 9,
130134
}
131135

132136
#[derive(Serialize, Deserialize, Debug, Clone, Default)]

0 commit comments

Comments
 (0)