sdbus++: events: specify redfish-mapping in schema
Redfish events are expected to conform to a specific format and our
YAML format should omit the version identifiers (since we'll always
be using the most recent Redfish event registry, which may be newer
than the event YAML). Add this information to the schema for
validation.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Id0c4eaab605f7230fe89670c06d0984e10db51a1
diff --git a/tools/sdbusplus/schemas/events.schema.yaml b/tools/sdbusplus/schemas/events.schema.yaml
index 0d5573f..d0af09b 100644
--- a/tools/sdbusplus/schemas/events.schema.yaml
+++ b/tools/sdbusplus/schemas/events.schema.yaml
@@ -105,11 +105,13 @@
properties:
redfish-mapping:
type: string
- description:
- Used when a `sdbusplus` event should map to a specific
- Redfish Message rather than a generated one. This is useful
- when an internal error has an analog in a standardized
- registry.
+ pattern: "^[A-Z_][a-zA-Z0-9_]*(\\.[A-Z_][a-zA-Z0-9_]*)*$"
+ description: Used when a `sdbusplus` event should map to a
+ specific Redfish Message rather than a generated one. This
+ is useful when an internal error has an analog in a
+ standardized registry.
+
+ When specifying these, the version should be omitted.
required:
- redfish-mapping