sdbus++: events: allow metadata fields to be enums

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I2c659064a95b431de1de96baf90ef16824255f30
diff --git a/tools/sdbusplus/schemas/events.schema.yaml b/tools/sdbusplus/schemas/events.schema.yaml
index e0c6ebb..721021d 100644
--- a/tools/sdbusplus/schemas/events.schema.yaml
+++ b/tools/sdbusplus/schemas/events.schema.yaml
@@ -29,13 +29,8 @@
                             type: string
                             description: The name of the metadata field.
                         type:
-                            enum:
-                                - string
-                                - size
-                                - int64
-                                - uint64
-                                - double
-                                - object_path
+                            type: string
+                            pattern: "(string)|(size)|(u?int64)|(double)|(object_path)|(enum\\[.*\\])"
                             description: The type of the metadata field.
                         primary:
                             type: boolean
@@ -43,6 +38,9 @@
                                 Set to true when the metadata field is expected
                                 to be part of the Redfish `MessageArgs` (and not
                                 only in the extended `DiagnosticData`).
+                    required:
+                        - name
+                        - type
                 minItems: 1
         required:
             - name