Skip to content

Commit b53f159

Browse files
committed
fix: the published field is optional
1 parent 100e05c commit b53f159

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/schema.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ pub struct Vulnerability {
547547

548548
/// The published field gives the time the entry should be considered to have been published,
549549
/// as an RFC3339-formatted time stamp in UTC (ending in “Z”).
550-
pub published: DateTime<Utc>,
550+
pub published: Option<DateTime<Utc>>,
551551

552552
/// The modified field gives the time the entry was last modified, as an RFC3339-formatted
553553
/// timestamptime stamp in UTC (ending in “Z”).
@@ -621,7 +621,7 @@ mod tests {
621621
let vuln = Vulnerability {
622622
schema_version: Some("1.3.0".to_string()),
623623
id: "OSV-2020-484".to_string(),
624-
published: chrono::Utc::now(),
624+
published: Some(chrono::Utc::now()),
625625
modified: chrono::Utc::now(),
626626
withdrawn: None,
627627
aliases: None,

0 commit comments

Comments
 (0)