Skip to content

Commit 0e16569

Browse files
committed
schema: Support References without type
There are some examples in the OSV database which have untyped references. Currently these fail to parse. For example: https://www.googleapis.com/download/storage/v1/b/osv-vulnerabilities/o/Debian%2FCVE-2018-11212.json?generation=1758701673567991&alt=media
1 parent 199fc84 commit 0e16569

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/schema.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ pub enum ReferenceType {
442442
pub struct Reference {
443443
/// The type of reference this URL points to.
444444
#[serde(rename = "type")]
445-
pub reference_type: ReferenceType,
445+
pub reference_type: Option<ReferenceType>,
446446

447447
/// The url where more information can be obtained about
448448
/// the vulnerability or associated the fix.

0 commit comments

Comments
 (0)