Skip to content

Commit

Permalink
Schema
Browse files Browse the repository at this point in the history
- addresses parts of #616
- add `$schema` to Aggregator JSON schema
- adapt examples to reflect schema change
  • Loading branch information
tschmidtb51 committed Aug 26, 2024
1 parent ae7f752 commit 61f0e77
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
3 changes: 2 additions & 1 deletion csaf_2.1/examples/aggregator/example-01-aggregator.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://docs.oasis-open.org/csaf/csaf/v2.1/aggregator_json_schema.json",
"aggregator": {
"category": "lister",
"contact_details": "Example CSAF Lister can be reached at contact_us@lister.example, or via our website at https://lister.example/security/csaf/aggregator/contact.",
Expand Down Expand Up @@ -33,4 +34,4 @@
}
],
"last_updated": "2024-01-24T22:35:38.978Z"
}
}
3 changes: 2 additions & 1 deletion csaf_2.1/examples/aggregator/example-02-aggregator.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://docs.oasis-open.org/csaf/csaf/v2.1/aggregator_json_schema.json",
"aggregator": {
"category": "aggregator",
"contact_details": "Example Aggregator can be reached at contact_us@aggregator.example, or via our website at https://aggregator.example/security/csaf/aggregator/contact.",
Expand Down Expand Up @@ -39,4 +40,4 @@
}
],
"last_updated": "2024-01-24T22:35:38.978Z"
}
}
3 changes: 2 additions & 1 deletion csaf_2.1/examples/aggregator/example-03-aggregator.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://docs.oasis-open.org/csaf/csaf/v2.1/aggregator_json_schema.json",
"aggregator": {
"category": "aggregator",
"contact_details": "Example Aggregator can be reached at contact_us@aggregator.example, or via our website at https://aggregator.example/security/csaf/aggregator/contact.",
Expand Down Expand Up @@ -56,4 +57,4 @@
}
],
"last_updated": "2024-01-24T22:35:38.978Z"
}
}
10 changes: 10 additions & 0 deletions csaf_2.1/json_schema/aggregator_json_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,23 @@
}
},
"required": [
"$schema",
"aggregator",
"aggregator_version",
"canonical_url",
"csaf_providers",
"last_updated"
],
"properties": {
"$schema": {
"title": "JSON schema",
"description": "Contains the URL of the Aggregator JSON schema which the document promises to be valid for.",
"type": "string",
"enum": [
"https://docs.oasis-open.org/csaf/csaf/v2.1/aggregator_json_schema.json"
],
"format": "uri"
},
"aggregator": {
"title": "Aggregator",
"description": "Provides information about the aggregator.",
Expand Down

0 comments on commit 61f0e77

Please sign in to comment.