Bruno Sakoto | f549c7c | 2021-05-18 16:02:30 -0400 | [diff] [blame] | 1 | { |
| 2 | |
| 3 | "$schema": "https://json-schema.org/draft/2019-09/schema", |
Renu Kumari | a51102b | 2021-12-06 12:37:10 -0500 | [diff] [blame] | 4 | "$id": "urn:cps:org.onap.cps:data-updated-event-schema:v2", |
Bruno Sakoto | f549c7c | 2021-05-18 16:02:30 -0400 | [diff] [blame] | 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": { |
Bruno Sakoto | 0e5bb2a | 2021-08-25 06:16:51 -0400 | [diff] [blame] | 15 | "description": "The schema, including its version, that this event adheres to. E.g. 'urn:cps:org.onap.cps:data-updated-event-schema:v99'.", |
Bruno Sakoto | f549c7c | 2021-05-18 16:02:30 -0400 | [diff] [blame] | 16 | "type": "string", |
Bruno Sakoto | 8db6414 | 2021-08-20 18:59:14 -0400 | [diff] [blame] | 17 | "format": "uri" |
Bruno Sakoto | f549c7c | 2021-05-18 16:02:30 -0400 | [diff] [blame] | 18 | }, |
| 19 | "id": { |
| 20 | "description": "The unique id identifying the event for the specified source. Producer must ensure that source + id is unique for each distinct event.", |
| 21 | "type": "string" |
| 22 | }, |
| 23 | "source": { |
| 24 | "description": "The source of the event. Producer must ensure that source + id is unique for each distinct event.", |
| 25 | "type": "string", |
| 26 | "format": "uri" |
| 27 | }, |
| 28 | "type": { |
| 29 | "description": "The type of the event.", |
| 30 | "type": "string" |
| 31 | }, |
| 32 | "content": { |
| 33 | "$ref": "#/definitions/Content" |
| 34 | } |
| 35 | }, |
| 36 | "required": [ |
| 37 | "schema", |
| 38 | "id", |
| 39 | "source", |
| 40 | "type", |
| 41 | "content" |
| 42 | ], |
Renu Kumari | a51102b | 2021-12-06 12:37:10 -0500 | [diff] [blame] | 43 | "additionalProperties": true |
Bruno Sakoto | f549c7c | 2021-05-18 16:02:30 -0400 | [diff] [blame] | 44 | }, |
| 45 | |
| 46 | "Content": { |
| 47 | "description": "The event content.", |
| 48 | "type": "object", |
| 49 | "properties": { |
| 50 | "observedTimestamp": { |
| 51 | "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' ", |
| 52 | "type": "string" |
| 53 | }, |
| 54 | "dataspaceName": { |
| 55 | "description": "The name of CPS Core dataspace the data belongs to.", |
| 56 | "type": "string" |
| 57 | }, |
| 58 | "schemaSetName": { |
| 59 | "description": "The name of CPS Core schema set the data adheres to.", |
| 60 | "type": "string" |
| 61 | }, |
| 62 | "anchorName": { |
| 63 | "description": "The name of CPS Core anchor the data is attached to.", |
| 64 | "type": "string" |
| 65 | }, |
Renu Kumari | a51102b | 2021-12-06 12:37:10 -0500 | [diff] [blame] | 66 | "operation": { |
| 67 | "description": "The operation on the data", |
| 68 | "type": "string", |
| 69 | "enum": ["CREATE", "UPDATE", "DELETE"] |
| 70 | }, |
Bruno Sakoto | f549c7c | 2021-05-18 16:02:30 -0400 | [diff] [blame] | 71 | "data": { |
| 72 | "$ref": "#/definitions/Data" |
| 73 | } |
| 74 | }, |
| 75 | "required": [ |
Bruno Sakoto | 8db6414 | 2021-08-20 18:59:14 -0400 | [diff] [blame] | 76 | "observedTimestamp", |
Bruno Sakoto | f549c7c | 2021-05-18 16:02:30 -0400 | [diff] [blame] | 77 | "dataspaceName", |
| 78 | "schemaSetName", |
Renu Kumari | a51102b | 2021-12-06 12:37:10 -0500 | [diff] [blame] | 79 | "anchorName" |
Bruno Sakoto | f549c7c | 2021-05-18 16:02:30 -0400 | [diff] [blame] | 80 | ], |
Renu Kumari | a51102b | 2021-12-06 12:37:10 -0500 | [diff] [blame] | 81 | "additionalProperties": true |
Bruno Sakoto | f549c7c | 2021-05-18 16:02:30 -0400 | [diff] [blame] | 82 | }, |
| 83 | |
| 84 | "Data": { |
| 85 | "description": "Data as json object.", |
| 86 | "type": "object" |
| 87 | } |
| 88 | |
| 89 | } |
| 90 | |
Bruno Sakoto | 8db6414 | 2021-08-20 18:59:14 -0400 | [diff] [blame] | 91 | } |