Fix schemas and add $id properties for oneof[] fields
oneof[] properties are an array of referenced json schemas. In cases
where we need to look through generated logs based on these schemas, it
is much easier to use a hook based on the $id property that uniquely
identifies a nested child property. The $id property allows us to
uniquely identify each data type based on the cper specification.
Fix schemas: Sections and ErrorInformation need a "properties" field
under each oneOf[]. Also add a "type" for cacheError and tlbError to
conform with json schema.
Tested with libcper json validator.
Change-Id: I2b242e93e1667a7d7b7a3a77eba1d37347920d1a
Signed-off-by: Aushim Nagarkatti <anagarkatti@nvidia.com>
diff --git a/specification/json/sections/cper-memory.json b/specification/json/sections/cper-memory.json
index 64f4c21..4b1defc 100644
--- a/specification/json/sections/cper-memory.json
+++ b/specification/json/sections/cper-memory.json
@@ -1,5 +1,4 @@
{
- "$id": "cper-json-memory-section",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
@@ -129,6 +128,7 @@
"type": "object",
"oneOf": [
{
+ "$id": "cper-json-bank0",
"type": "object",
"required": ["value"],
"properties": {
@@ -138,6 +138,7 @@
}
},
{
+ "$id": "cper-json-bank1",
"type": "object",
"required": ["address", "group"],
"properties": {