Commit d0db8a43 authored by canterafonsj's avatar canterafonsj
Browse files

Refactor schemas. Allow prefixes. Example with prefixes

parent 027d7c8c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -5,6 +5,10 @@
    "type": "Property",
    "value": "Mercedes"
  },
  "schema:image": {
    "type": "Property",
    "value": "http://example.org/images/Mercedes-C220"
  },
  "isParked": {
    "type": "Relationship",
    "object": "urn:ngsi-ld:OffStreetParking:Downtown1",
@@ -18,6 +22,7 @@
    "http://example.org/ngsi-ld/commonTerms.jsonld",
    "http://example.org/ngsi-ld/vehicle.jsonld",
    "http://example.org/ngsi-ld/parking.jsonld",
    "https://schema.org",
    "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
  ]
}
+1 −2
Original line number Diff line number Diff line
@@ -185,8 +185,7 @@
        ]
      },
      "propertyNames": {
        "type": "string",
        "pattern": "^((\\d|[a-zA-Z]|_)+(:(\\d|[a-zA-Z]|_)+)?(#\\d+)?)$|^(@context)$"
        "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/PropertyNames"
      }
    },
    "Entity": {
+1 −2
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@
    ]
  },
  "propertyNames": {
    "type": "string",
    "pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$"
    "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/PropertyNames"
  }
}
+5 −1
Original line number Diff line number Diff line
@@ -6,10 +6,14 @@
  "definitions": {
    "Name": {
      "type": "string",
      "pattern": "^(\\d|[a-zA-Z]|_)+$",
      "pattern": "^((\\d|[a-zA-Z]|_)+(:(\\d|[a-zA-Z]|_)+)?(#\\d+)?)$",
      "minLength": 1,
      "description": "NGSI-LD Name"
    },
    "PropertyNames": {
      "type": "string",
      "pattern": "^((\\d|[a-zA-Z]|_)+(:(\\d|[a-zA-Z]|_)+)?(#\\d+)?)$|^(@context)$"
    },
    "observedAt": {
      "type": "string",
      "format": "date-time"
+1 −2
Original line number Diff line number Diff line
@@ -71,8 +71,7 @@
        ]
      },
      "propertyNames": {
        "type": "string",
        "pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$"
        "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/PropertyNames"
      }
    },
    "EntityTemporal": {
Loading