From 48b5ea9287294d36a38a39d67608a16ba5f0c2af Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Thu, 17 Mar 2022 14:58:00 +1100 Subject: [PATCH] Add database_specific to `affected[].ranges[]`. This is intended only for metadata that enables databases to losslessly convert OSV entries back into their original representation. Part of #35. --- docs/schema.md | 14 +++++++++++++- validation/schema.json | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/schema.md b/docs/schema.md index c81ccd46..b93b1c5b 100644 --- a/docs/schema.md +++ b/docs/schema.md @@ -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 }, @@ -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 diff --git a/validation/schema.json b/validation/schema.json index bc224130..a3b44ea0 100644 --- a/validation/schema.json +++ b/validation/schema.json @@ -146,6 +146,9 @@ ] }, "minItems": 1 + }, + "database_specific": { + "type": "object" } }, "allOf": [