Bruno Sakoto | f549c7c | 2021-05-18 16:02:30 -0400 | [diff] [blame] | 1 | { |
| 2 | |
| 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", |
| 4 | "$id": "urn:cps:org.onap.cps:data-updated-event-schema:1.1.0-SNAPSHOT", |
| 5 | |
| 6 | "$ref": "#/definitions/CpsDataUpdatedEvent", |
| 7 | |
| 8 | "definitions": { |
| 9 | |
| 10 | "CpsDataUpdatedEvent": { |
| 11 | "description": "The payload for CPS data updated event.", |
| 12 | "type": "object", |
| 13 | "properties": { |
| 14 | "schema": { |
| 15 | "description": "The schema, including its version, that this event adheres to.", |
| 16 | "type": "string", |
| 17 | "default": "urn:cps:org.onap.cps:data-updated-event-schema:1.1.0-SNAPSHOT", |
| 18 | "enum": ["urn:cps:org.onap.cps:data-updated-event-schema:1.1.0-SNAPSHOT"] |
| 19 | }, |
| 20 | "id": { |
| 21 | "description": "The unique id identifying the event for the specified source. Producer must ensure that source + id is unique for each distinct event.", |
| 22 | "type": "string" |
| 23 | }, |
| 24 | "source": { |
| 25 | "description": "The source of the event. Producer must ensure that source + id is unique for each distinct event.", |
| 26 | "type": "string", |
| 27 | "format": "uri" |
| 28 | }, |
| 29 | "type": { |
| 30 | "description": "The type of the event.", |
| 31 | "type": "string" |
| 32 | }, |
| 33 | "content": { |
| 34 | "$ref": "#/definitions/Content" |
| 35 | } |
| 36 | }, |
| 37 | "required": [ |
| 38 | "schema", |
| 39 | "id", |
| 40 | "source", |
| 41 | "type", |
| 42 | "content" |
| 43 | ], |
| 44 | "additionalProperties": false |
| 45 | }, |
| 46 | |
| 47 | "Content": { |
| 48 | "description": "The event content.", |
| 49 | "type": "object", |
| 50 | "properties": { |
| 51 | "observedTimestamp": { |
| 52 | "description": "The timestamp when the data has been observed. The expected format is 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'. Ex: '2020-12-01T00:00:00.000+0000' ", |
| 53 | "type": "string" |
| 54 | }, |
| 55 | "dataspaceName": { |
| 56 | "description": "The name of CPS Core dataspace the data belongs to.", |
| 57 | "type": "string" |
| 58 | }, |
| 59 | "schemaSetName": { |
| 60 | "description": "The name of CPS Core schema set the data adheres to.", |
| 61 | "type": "string" |
| 62 | }, |
| 63 | "anchorName": { |
| 64 | "description": "The name of CPS Core anchor the data is attached to.", |
| 65 | "type": "string" |
| 66 | }, |
| 67 | "data": { |
| 68 | "$ref": "#/definitions/Data" |
| 69 | } |
| 70 | }, |
| 71 | "required": [ |
| 72 | "timestamp", |
| 73 | "dataspaceName", |
| 74 | "schemaSetName", |
| 75 | "anchorName", |
| 76 | "data" |
| 77 | ], |
| 78 | "additionalProperties": false |
| 79 | }, |
| 80 | |
| 81 | "Data": { |
| 82 | "description": "Data as json object.", |
| 83 | "type": "object" |
| 84 | } |
| 85 | |
| 86 | } |
| 87 | |
| 88 | } |