05a0e93b3162dcc97b03c5e6f11116a7a2aee5a6
[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         },
31         "eventType": {
32           "description": "The type of the event.",
33           "type": "string"
34         },
35         "eventSchema": {
36           "description": "The schema, including its version, that this event adheres to.",
37           "type": "string"
38         },
39         "event": {
40           "$ref": "#/definitions/Event"
41         }
42       },
43       "required": [
44         "eventId",
45         "eventTime",
46         "eventSource",
47         "eventType",
48         "eventSchema",
49         "event"
50       ],
51       "additionalProperties": false
52     },
53
54     "Event": {
55       "description": "The Payload of an event.",
56       "type": "object",
57       "properties": {
58         "cmHandleId": {
59           "description": "cmHandle id",
60           "type": "string"
61         },
62         "operation": {
63           "description": "The name of the Operation that triggered this event.",
64           "type": "string",
65           "enum": ["CREATE", "UPDATE", "DELETE"]
66         },
67         "cmhandle-state": {
68           "description": "State of cmHandle.",
69           "type": "string",
70           "enum": ["ADVISED", "READY", "LOCKED"]
71         },
72         "cmhandle-properties": {
73           "description": "cmHandle properties as json object.",
74           "type": "object",
75           "default": null,
76           "existingJavaType": "java.util.List<java.util.Map<String,String>>",
77           "additionalProperties": false
78         }
79       },
80       "required": [
81         "operation"
82       ],
83       "additionalProperties": false
84     }
85   }
86 }