Async request response NCMP -> Client
[cps.git] / cps-ncmp-events / src / main / resources / schemas / ncmp-async-request-response-event-schema-v1.json
1 {
2   "$schema": "https://json-schema.org/draft/2019-09/schema",
3   "$id": "urn:cps:org.onap.cps.ncmp.events:ncmp-async-request-response-event-schema:v1",
4   "$ref": "#/definitions/NcmpAsyncRequestResponseEvent",
5   "definitions": {
6     "NcmpAsyncRequestResponseEvent": {
7       "description": "The payload for CPS async request response event.",
8       "type": "object",
9       "properties": {
10         "eventId": {
11           "description": "The unique id identifying the event generated by DMI.",
12           "type": "string"
13         },
14         "eventCorrelationId": {
15           "description": "The request id passed by NCMP.",
16           "type": "string"
17         },
18         "eventTime": {
19           "description": "The time of the event. The expected format is 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'.",
20           "type": "string"
21         },
22         "eventTarget": {
23           "description": "The target of the event.",
24           "type": "string"
25         },
26         "eventType": {
27           "description": "The type of the event.",
28           "type": "string"
29         },
30         "eventSchema": {
31           "description": "The event schema for async request response events.",
32           "type": "string"
33         },
34         "event": {
35         "$ref": "#/definitions/Event"
36         },
37         "forwardedEvent": {
38           "$ref": "#/definitions/Forwarded-Event"
39         }
40       },
41       "required": [
42         "eventId",
43         "eventCorrelationId",
44         "eventTime",
45         "eventTarget",
46         "eventType",
47         "eventSchema"
48       ]
49     },
50     "Forwarded-Event": {
51       "description": "The event content.",
52       "type": "object",
53       "properties": {
54         "eventId": {
55           "description": "The unique id identifying the event generated by DMI.",
56           "type": "string"
57         },
58         "eventCorrelationId": {
59           "description": "The request id passed by NCMP.",
60           "type": "string"
61         },
62         "eventTime": {
63           "description": "The time of the event. The expected format is 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'.",
64           "type": "string"
65         },
66         "eventTarget": {
67           "description": "The target of the event.",
68           "type": "string"
69         },
70         "eventType": {
71           "description": "The type of the event.",
72           "type": "string"
73         },
74         "eventSchema": {
75           "description": "The event schema for async request response events.",
76           "type": "string"
77         },
78         "eventSource": {
79           "description": "The source of the event.",
80           "type": "string"
81         },
82         "response-data-schema": {
83           "description": "The received schema of response data",
84           "type": "string"
85         },
86         "response-status": {
87           "description": "The received status of the response.",
88           "type": "string"
89         },
90         "response-code": {
91           "description": "The received code of the response.",
92           "type": "string"
93         },
94         "forwardedEventData": {
95           "description": "The data payload",
96           "type": "object",
97           "properties": {
98             "forwardedEventPayload": {
99               "type": "object"
100             }
101           }
102         },
103         "required": [
104           "eventId",
105           "eventCorrelationId",
106           "eventTime",
107           "eventTarget",
108           "eventType",
109           "eventSchema",
110           "eventSource",
111           "response-data-schema",
112           "response-status",
113           "response-code",
114           "forwardedEventData"
115         ]
116       }
117     },
118     "Event": {
119       "description": "The event content.",
120       "type": "object",
121       "properties": {
122         "eventId": {
123           "description": "The unique id identifying the event generated by DMI",
124           "type": "string"
125         },
126         "eventCorrelationId": {
127           "description": "The request id passed by NCMP.",
128           "type": "string"
129         },
130         "eventTime": {
131           "description": "The time of the event. The expected format is 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'.",
132           "type": "string"
133         },
134         "eventTarget": {
135           "description": "The target of the event.",
136           "type": "string"
137         },
138         "eventType": {
139           "description": "The type of the event.",
140           "type": "string"
141         },
142         "eventSchema": {
143           "description": "The event schema for async request response events.",
144           "type": "string"
145         },
146         "eventSource": {
147           "description": "The source of the event.",
148           "type": "string"
149         },
150         "response-data-schema": {
151           "description": "The received schema of response data",
152           "type": "string"
153         },
154         "response-status": {
155           "description": "The received status of the response.",
156           "type": "string"
157         },
158         "response-code": {
159           "description": "The received code of the response.",
160           "type": "string"
161         },
162         "response-data": {
163           "description": "The data payload",
164           "type": "object",
165           "properties": {
166             "payload": {
167               "type": "object"
168             }
169           }
170         },
171         "required": [
172           "eventId",
173           "eventCorrelationId",
174           "eventTarget",
175           "eventTime",
176           "eventType",
177           "eventSchema",
178           "eventSource",
179           "response-data-schema",
180           "response-status",
181           "response-code",
182           "event-data"
183         ]
184       }
185     }
186   }
187 }