Skip to content

Commit

Permalink
Add new json schemas for decision points and dp groups (#340)
Browse files Browse the repository at this point in the history
* add new json schemas for decision points and dp groups

* Update Decision_Point.schema.json

change ID url to https://github.com/CERTCC/SSVC/tree/main/data/schema/...

* Update Decision_Point_Group.schema.json

change id url to https://github.com/CERTCC/SSVC/tree/main/data/schema/...

---------

Co-authored-by: Vijay Sarvepalli <[email protected]>
  • Loading branch information
ahouseholder and sei-vsarvepalli authored Oct 16, 2023
1 parent 338cc45 commit f45e651
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 0 deletions.
60 changes: 60 additions & 0 deletions data/schema/Decision_Point.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Decision Point schema definition",
"$id": "https://github.com/CERTCC/SSVC/tree/main/data/schema/Decision_Point.schema.json",
"description": "Decision points are the basic building blocks of SSVC decision functions. Individual decision points describe a single aspect of the input to a decision function.",
"type": "object",
"additionalProperties": false,
"properties": {
"namespace": {
"type": "string",
"description": "Namespace (a short, unique string): For example, \"ssvc\" or \"cvss\" to indicate the source of the decision point"
},
"version": {
"type": "string",
"description": "Version (a semantic version string) that identifies this object"
},
"key": {
"type": "string",
"description": "A key (a short, unique string) that can be used to identify the Decision Point/Decision Point value in a shorthand way"
},
"name": {
"type": "string",
"description": "A short label that captures the description of the Decision Point or the Group of Decision Points."
},
"description": {
"type": "string",
"description": "Description of the Decision Point or the Group of Decision Points."
},
"values": {
"description": "Decision Point Values are valid results from a Decision Point",
"uniqueItems": true,
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "A key (a short, unique string) that can be used to identify the Decision Point/Decision Point value in a shorthand way"
},
"name": {
"type": "string",
"description": "A short label that captures the description of the Decision Point or the Group of Decision Points."
},
"description": {
"type": "string",
"description": "Description of the Decision Point or the Group of Decision Points."
}
}
}
}
},
"required": [
"namespace",
"version",
"key",
"name",
"description",
"values"
]
}
79 changes: 79 additions & 0 deletions data/schema/Decision_Point_Group.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Decision Points Group schema definition",
"$id": "https://github.com/CERTCC/SSVC/tree/main/data/schema/Decision_Point_Group.schema.json",
"type": "object",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"description": "Version (a semantic version string) that identifies this object"
},
"name": {
"type": "string",
"description": "A short label that captures the description of the Decision Point or the Group of Decision Points."
},
"description": {
"type": "string",
"description": "Description of the Decision Point or the Group of Decision Points."
},
"decision_points": {
"description": "Decision points are the basic building blocks of SSVC decision functions. Individual decision points describe a single aspect of the input to a decision function.",
"additionalProperties": false,
"type": "array",
"items": {
"type": "object",
"properties": {
"namespace": {
"type": "string",
"description": "Namespace (a short, unique string): For example, \"ssvc\" or \"cvss\" to indicate the source of the decision point"
},
"version": {
"type": "string",
"description": "Version (a semantic version string) that identifies this object"
},
"key": {
"type": "string",
"description": "A key (a short, unique string) that can be used to identify the Decision Point/Decision Point value in a shorthand way"
},
"name": {
"type": "string",
"description": "A short label that captures the description of the Decision Point or the Group of Decision Points."
},
"description": {
"type": "string",
"description": "Description of the Decision Point or the Group of Decision Points."
},
"values": {
"description": "Decision Point Values are valid results from a Decision Point",
"uniqueItems": true,
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "A key (a short, unique string) that can be used to identify the Decision Point/Decision Point value in a shorthand way"
},
"name": {
"type": "string",
"description": "A short label that captures the description of the Decision Point or the Group of Decision Points."
},
"description": {
"type": "string",
"description": "Description of the Decision Point or the Group of Decision Points."
}
}
}
}
}
}
}
},
"required": [
"version",
"name",
"description",
"decision_points"
]
}

0 comments on commit f45e651

Please sign in to comment.