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-cxl-protocol.json b/specification/json/sections/cper-cxl-protocol.json
index 83cef63..bc46245 100644
--- a/specification/json/sections/cper-cxl-protocol.json
+++ b/specification/json/sections/cper-cxl-protocol.json
@@ -1,5 +1,4 @@
{
- "$id": "cper-json-cxl-protocol-section",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
@@ -57,6 +56,7 @@
"type": "object",
"oneOf": [
{
+ "$id": "cper-json-cxlagentaddress0",
"type": "object",
"required": [
"functionNumber",
@@ -80,6 +80,7 @@
}
},
{
+ "$id": "cper-json-cxlagentaddress1",
"type": "object",
"required": ["value"],
"properties": {