fix: JSON schema update and missing unit code

  • update Entity.json to follow new JSON Schema spec for the oneOf attribute
  • add definitions for unitCode

Merge request reports

Loading
+18 −5
Changes for schema/Entity.json: 18 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -19,13 +19,26 @@
        },
        "value": {
          "oneOf": [
            "string",
            "number",
            "boolean",
            "array",
            "object"
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "array"
            },
            {
              "type": "object"
            }
          ]
        },
        "unitCode": {
          "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/unitCode"
        },
        "observedAt": {
          "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/observedAt"
        },
+3 −0
Changes for schema/common.json: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -12,6 +12,9 @@
      "type": "string",
      "pattern": "^((\\d|[a-zA-Z]|_)+(:(\\d|[a-zA-Z]|_)+)?(#\\d+)?)$|^(@context)$"
    },
    "unitCode": {
      "type": "string"
    },
    "observedAt": {
      "type": "string",
      "format": "date-time"
Loading