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-memory2.json b/specification/json/sections/cper-memory2.json
index 94b8509..51d972f 100644
--- a/specification/json/sections/cper-memory2.json
+++ b/specification/json/sections/cper-memory2.json
@@ -1,5 +1,4 @@
{
- "$id": "cper-json-memory2-section",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
@@ -130,6 +129,7 @@
"type": "object",
"oneOf": [
{
+ "$id": "cper-json-bank0",
"type": "object",
"required": ["value"],
"properties": {
@@ -139,6 +139,7 @@
}
},
{
+ "$id": "cper-json-bank1",
"type": "object",
"required": ["address", "group"],
"properties": {