blob: c2fa5f28711a27100b02ea2b3c15d6607c11ea4c [file] [log] [blame]
Bruno Sakotof549c7c2021-05-18 16:02:30 -04001{
2
3 "$schema": "https://json-schema.org/draft/2019-09/schema",
Bruno Sakoto8db64142021-08-20 18:59:14 -04004 "$id": "urn:cps:org.onap.cps:data-updated-event-schema:v1",
Bruno Sakotof549c7c2021-05-18 16:02:30 -04005
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 Sakoto8db64142021-08-20 18:59:14 -040015 "description": "The schema, including its version, that this event adheres to. Ex: 'urn:cps:org.onap.cps:data-updated-event-schema:v1'.",
Bruno Sakotof549c7c2021-05-18 16:02:30 -040016 "type": "string",
Bruno Sakoto8db64142021-08-20 18:59:14 -040017 "format": "uri"
Bruno Sakotof549c7c2021-05-18 16:02:30 -040018 },
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 ],
43 "additionalProperties": false
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 },
66 "data": {
67 "$ref": "#/definitions/Data"
68 }
69 },
70 "required": [
Bruno Sakoto8db64142021-08-20 18:59:14 -040071 "observedTimestamp",
Bruno Sakotof549c7c2021-05-18 16:02:30 -040072 "dataspaceName",
73 "schemaSetName",
74 "anchorName",
75 "data"
76 ],
77 "additionalProperties": false
78 },
79
80 "Data": {
81 "description": "Data as json object.",
82 "type": "object"
83 }
84
85 }
86
Bruno Sakoto8db64142021-08-20 18:59:14 -040087}