Skip to content

Commit

Permalink
Add database_specific to affected[].ranges[].
Browse files Browse the repository at this point in the history
This is intended only for metadata that enables databases to losslessly
convert OSV entries back into their original representation.

Part of #35.
  • Loading branch information
oliverchang committed Mar 17, 2022
1 parent 5e3cbf8 commit 48b5ea9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ A JSON Schema for validation is also available
"introduced": string,
"fixed": string,
"limit": string
} ]
} ],
"database_specific": { see description }
} ],
"versions": [ string ],
"ecosystem_specific": { see description },
Expand Down Expand Up @@ -483,6 +484,17 @@ describing a single range. The range object defines the fields `type`,

This field is required if `affected[].ranges[].type` is `GIT`.

### affected[].ranges[].database_specific field

The `ranges` object's `database_specific` field is a JSON object holding
additional information about the range from which the record was obtained. The
meaning of the values within the object is entirely defined by the database and
beyond the scope of this document.

Databases should only use this field to enable lossless conversion from the OSV
format back into the original database representation. Values in this field
have no effect on the [evaluation algorithm](#evaluation).

### affected[].ecosystem_specific field

The `affected` object's `ecosystem_specific` field is a JSON object holding
Expand Down
3 changes: 3 additions & 0 deletions validation/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@
]
},
"minItems": 1
},
"database_specific": {
"type": "object"
}
},
"allOf": [
Expand Down

0 comments on commit 48b5ea9

Please sign in to comment.