Skip to content

Commit

Permalink
Fix deserialization of content encoding (#299)
Browse files Browse the repository at this point in the history
Allow empty econding for responses.
  • Loading branch information
jacob-pro committed Sep 25, 2022
1 parent f3f1186 commit 282625c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utoipa/src/openapi/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub struct Content {
///
/// The encoding object SHALL only apply to `request_body` objects when the media type is
/// multipart or `application/x-www-form-urlencoded`.
#[serde(skip_serializing_if = "BTreeMap::is_empty")]
#[serde(skip_serializing_if = "BTreeMap::is_empty", default)]
pub encoding: BTreeMap<String, Encoding>,
}

Expand Down

0 comments on commit 282625c

Please sign in to comment.