Skip to content

Commit

Permalink
Ommiting Reference::polType field in serialization if not avaliable.
Browse files Browse the repository at this point in the history
This mimics better pilcom behavior.
  • Loading branch information
lvella committed Aug 15, 2023
1 parent 1cf6f78 commit ab84fd6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions starky/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pub struct Public {

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Reference {
#[serde(skip_serializing_if = "Option::is_none")]
pub polType: Option<String>,
#[serde(rename = "type")]
pub type_: String,
Expand Down

0 comments on commit ab84fd6

Please sign in to comment.