schemas: repair global.json

In json schema,

```
{
    "description": "Ensure the parent anyOf schema does not validate when an element does not define a type property.",
    "not": {
        "required": ["Type"]
    },
    "title": "Missing Type"
},
```

If the exposes record does not contain 'Type', 'not' will validate.
So the outer 'anyOf' will validate and the whole config will validate.

Which is against the intention noted in the description.

When defining Exposes Record, it should map to one schema only.
Fix the schema to use 'oneOf' instead.

To implement the intention to require 'Name' and 'Type' on every Exposes
record, 'allOf' can be used.

Tested: Schema Validator Pass

References:
[1] https://json-schema.org/draft/2020-12/json-schema-core
[2] https://json-schema.org/draft/2020-12/json-schema-validation

Change-Id: I21debdf44caf1f37bcc36aeeed1a5015a1a7e011
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/schemas/global.json b/schemas/global.json
index 64a243c..012e2b9 100644
--- a/schemas/global.json
+++ b/schemas/global.json
@@ -3,62 +3,62 @@
     "$defs": {
         "EMExposesElement": {
             "description": "The exposes property element schema.  An element of the exposes property is always an array where elements are of type exposes entry.",
-            "anyOf": [
+            "allOf": [
                 {
-                    "$ref": "ibm.json#/$defs/PowerModeProperties"
+                    "oneOf": [
+                        {
+                            "$ref": "ibm.json#/$defs/PowerModeProperties"
+                        },
+                        {
+                            "$ref": "ibm.json#/$defs/IBMCompatibleSystem"
+                        },
+                        {
+                            "$ref": "ibm.json#/$defs/IBMCFFPSConnector"
+                        },
+                        {
+                            "$ref": "intel.json#/$defs/IntelFanConnector"
+                        },
+                        {
+                            "$ref": "mctp.json#/$defs/MCTPI2CTarget"
+                        },
+                        {
+                            "$ref": "mctp.json#/$defs/MCTPI3CTarget"
+                        },
+                        {
+                            "$ref": "pid.json#/$defs/Pid"
+                        },
+                        {
+                            "$ref": "pid_zone.json#/$defs/PidZone"
+                        },
+                        {
+                            "$ref": "satellite_controller.json#/$defs/SatelliteController"
+                        },
+                        {
+                            "$ref": "stepwise.json#/$defs/Stepwise"
+                        },
+                        {
+                            "$ref": "legacy.json#/$defs/Aggregate"
+                        },
+                        {
+                            "$ref": "virtual_sensor.json#/$defs/VirtualSensor"
+                        },
+                        {
+                            "$ref": "leak_detector.json#/$defs/GPIOLeakDetector"
+                        },
+                        {
+                            "$ref": "firmware.json#/$defs/XDPE1X2XXFirmware"
+                        }
+                    ]
                 },
                 {
-                    "$ref": "ibm.json#/$defs/IBMCompatibleSystem"
+                    "title": "Missing 'Name'",
+                    "description": "Ensure the schema does not validate when an element does not define a Name",
+                    "required": ["Name"]
                 },
                 {
-                    "$ref": "ibm.json#/$defs/IBMCFFPSConnector"
-                },
-                {
-                    "$ref": "intel.json#/$defs/IntelFanConnector"
-                },
-                {
-                    "$ref": "mctp.json#/$defs/MCTPI2CTarget"
-                },
-                {
-                    "$ref": "mctp.json#/$defs/MCTPI3CTarget"
-                },
-                {
-                    "$ref": "pid.json#/$defs/Pid"
-                },
-                {
-                    "$ref": "pid_zone.json#/$defs/PidZone"
-                },
-                {
-                    "$ref": "satellite_controller.json#/$defs/SatelliteController"
-                },
-                {
-                    "$ref": "stepwise.json#/$defs/Stepwise"
-                },
-                {
-                    "$ref": "legacy.json#/$defs/Aggregate"
-                },
-                {
-                    "$ref": "virtual_sensor.json#/$defs/VirtualSensor"
-                },
-                {
-                    "$ref": "leak_detector.json#/$defs/GPIOLeakDetector"
-                },
-                {
-                    "$ref": "firmware.json#/$defs/XDPE1X2XXFirmware"
-                },
-                {
-                    "description": "Ensure the parent anyOf schema does not validate when an element does not define a type property.",
-                    "not": {
-                        "required": ["Type"]
-                    },
-                    "title": "Missing Type"
-                },
-                {
-                    "description": "Ensure the parent anyOf schema does not validate when an element does not define a name property.",
-                    "not": {
-                        "required": ["Name"]
-                    },
-                    "title": "Missing Name"
+                    "title": "Missing 'Type'",
+                    "description": "Ensure the schema does not validate when an element does not define a Type",
+                    "required": ["Type"]
                 }
             ],
             "title": "Exposes Property Element"
@@ -172,7 +172,7 @@
     },
     "title": "Entity Manager Configuration File",
     "description": "The schema for an entity manager configuration file. An entity mananger configuration file can consist of a single object, or an array of objects. Objects must be of type EMConfig.",
-    "anyOf": [
+    "oneOf": [
         {
             "type": "array",
             "items": {