Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ diff -u ngsiv2-draft-schema.orig.json ngsiv2-draft-schema.json
- --- ngsiv2-draft-schema.orig.json 2019-04-08 12:23:44.103171653 +0200
- +++ ngsiv2-draft-schema.json 2019-04-09 13:05:47.637837620 +0200
- @@ -10,26 +10,6 @@
- "maxLength": 256,
- "pattern": "^[\\w\\-\\.\\{\\}\\$\\+\\*\\[\\]`|~^@!,:\\\\]+$"
- },
- - "Name": {
- - "allOf": [
- - {
- - "$ref": "#/definitions/Identifier"
- - },
- - {
- - "not": {
- - "type": "string",
- - "const": "geo:distance"
- - }
- - },
- - {
- - "not": {
- - "type": "string",
- - "const": "*"
- - }
- - }
- - ],
- - "description": "NGSIv2 Name"
- - },
- "Value": {
- "type": [
- "number",
- @@ -40,13 +20,13 @@
- "string"
- ]
- },
- - "TypeValue": {
- + "AttributeTypeValue": {
- "type": "object",
- "properties": {
- "type": {
- "allOf": [
- {
- - "$ref": "#/definitions/Name"
- + "$ref": "#/definitions/Identifier"
- },
- {
- "not": {
- @@ -68,6 +48,30 @@
- "value"
- ]
- },
- + "MetadataTypeValue": {
- + "type": "object",
- + "properties": {
- + "type": {
- + "allOf": [
- + {
- + "$ref": "#/definitions/Identifier"
- + },
- + {
- + "not": {
- + "const": "DateTime"
- + }
- + }
- + ]
- + },
- + "value": {
- + "$ref": "#/definitions/Value"
- + }
- + },
- + "required": [
- + "value"
- + ]
- + },
- +
- "DateTimeValue": {
- "type": "string",
- "format": "date-time"
- @@ -114,7 +118,7 @@
- "$ref": "#/definitions/DateTimeTypeValue"
- },
- "previousValue": {
- - "$ref": "#/definitions/TypeValue"
- + "$ref": "#/definitions/AttributeTypeValue"
- },
- "actionType": {
- "type": "object",
- @@ -141,7 +145,7 @@
- "additionalProperties": {
- "anyOf": [
- {
- - "$ref": "#/definitions/TypeValue"
- + "$ref": "#/definitions/MetadataTypeValue"
- },
- {
- "$ref": "#/definitions/DateTimeTypeValue"
- @@ -151,7 +155,10 @@
- "propertyNames": {
- "allOf": [
- {
- - "$ref": "#/definitions/Name"
- + "not": {
- + "type": "string",
- + "const": "*"
- + }
- }
- ]
- }
- @@ -162,6 +169,9 @@
- "dateModified": {
- "$ref": "#/definitions/DateTimeTypeValue"
- },
- + "dateExpires": {
- + "$ref": "#/definitions/DateTimeTypeValue"
- + },
- "Attribute": {
- "allOf": [
- {
- @@ -173,7 +183,7 @@
- "$ref": "#/definitions/GeoTypeValue"
- },
- {
- - "$ref": "#/definitions/TypeValue"
- + "$ref": "#/definitions/AttributeTypeValue"
- }
- ]
- },
- @@ -196,7 +206,7 @@
- "type": {
- "allOf": [
- {
- - "$ref": "#/definitions/Name"
- + "$ref": "#/definitions/Identifier"
- },
- {
- "default": "Thing"
- @@ -208,10 +218,26 @@
- },
- "dateModified": {
- "$ref": "#/definitions/dateModified"
- + },
- + "dateExpires": {
- + "$ref": "#/definitions/dateExpires"
- }
- },
- "propertyNames": {
- - "$ref": "#/definitions/Name"
- + "allOf": [
- + {
- + "not": {
- + "type": "string",
- + "const": "geo:distance"
- + }
- + },
- + {
- + "not": {
- + "type": "string",
- + "const": "*"
- + }
- + }
- + ]
- },
- "additionalProperties": {
- "anyOf": [
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement