NcmpEvent creation for ModuleSync
[cps.git] / cps-ncmp-events / src / main / resources / schemas / ncmp-event-schema-v1.json
1 {
2
3   "$schema": "https://json-schema.org/draft/2019-09/schema",
4   "$id": "urn:cps:org.onap.ncmp.cmhandle.lcm-event:v1",
5
6   "$ref": "#/definitions/NcmpEvent",
7
8   "definitions": {
9
10     "NcmpEvent": {
11       "description": "The payload for NCMP event.",
12       "type": "object",
13       "javaType" : "org.onap.ncmp.cmhandle.lcm.event.NcmpEvent",
14       "properties": {
15         "eventId": {
16           "description": "The unique id identifying the event for the specified source.",
17           "type": "string"
18         },
19         "eventCorrelationId": {
20           "description": "The id identifying the event for the specified source.",
21           "type": "string"
22         },
23         "eventTime": {
24           "description": "The timestamp when the data has been observed.",
25           "type": "string"
26         },
27         "eventSource": {
28           "description": "The source of the event.",
29           "type": "string",
30           "format": "uri"
31         },
32         "eventType": {
33           "description": "The type of the event.",
34           "type": "string"
35         },
36         "eventSchema": {
37           "description": "The schema, including its version, that this event adheres to.",
38           "type": "string",
39           "format": "uri"
40         },
41         "event": {
42           "$ref": "#/definitions/Event"
43         }
44       },
45       "required": [
46         "eventId",
47         "eventTime",
48         "eventSource",
49         "eventType",
50         "eventSchema",
51         "event"
52       ],
53       "additionalProperties": false
54     },
55
56     "Event": {
57       "description": "The Payload of an event.",
58       "type": "object",
59       "properties": {
60         "cmHandleId": {
61           "description": "cmHandle id",
62           "type": "string"
63         },
64         "operation": {
65           "description": "The name of the Operation that triggered this event.",
66           "type": "string",
67           "enum": ["CREATE", "UPDATE", "DELETE"]
68         },
69         "cmhandle-state": {
70           "description": "State of cmHandle.",
71           "type": "string",
72           "enum": ["ADVISED", "READY", "LOCKED"]
73         },
74         "cmhandle-properties": {
75           "description": "cmHandle properties as json object.",
76           "type": "object",
77           "existingJavaType": "java.util.List<java.util.Map<String,String>>",
78           "additionalProperties": false
79         }
80       },
81       "required": [
82         "operation"
83       ],
84       "additionalProperties": false
85     }
86   }
87 }