Merge "Introducing DELETING and DELETED Cmhandle State"
[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         "cmhandle-state": {
63           "description": "State of cmHandle.",
64           "type": "string",
65           "enum": ["ADVISED", "READY", "LOCKED", "DELETING", "DELETED"]
66         },
67         "cmhandle-properties": {
68           "description": "cmHandle properties as json object.",
69           "type": "object",
70           "default": null,
71           "existingJavaType": "java.util.List<java.util.Map<String,String>>",
72           "additionalProperties": false
73         }
74       },
75       "required": [
76         "operation"
77       ],
78       "additionalProperties": false
79     }
80   }
81 }