summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-events/src
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ncmp-events/src')
-rw-r--r--cps-ncmp-events/src/main/resources/schemas/dmi-async-request-response-event-schema-v1.json87
-rw-r--r--cps-ncmp-events/src/main/resources/schemas/ncmp-async-request-response-event-schema-v1.json187
-rw-r--r--cps-ncmp-events/src/main/resources/schemas/ncmp-event-schema-v1.json87
3 files changed, 361 insertions, 0 deletions
diff --git a/cps-ncmp-events/src/main/resources/schemas/dmi-async-request-response-event-schema-v1.json b/cps-ncmp-events/src/main/resources/schemas/dmi-async-request-response-event-schema-v1.json
new file mode 100644
index 0000000000..528c063826
--- /dev/null
+++ b/cps-ncmp-events/src/main/resources/schemas/dmi-async-request-response-event-schema-v1.json
@@ -0,0 +1,87 @@
+{
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
+ "$id": "urn:cps:org.onap.cps.ncmp.events:dmi-async-request-response-event-schema:v1",
+ "$ref": "#/definitions/DmiAsyncRequestResponseEvent",
+ "definitions": {
+ "DmiAsyncRequestResponseEvent": {
+ "description": "The payload for NCMP async request response event.",
+ "type": "object",
+ "properties": {
+ "eventId": {
+ "description": "The unique id identifying the event generated by DMI.",
+ "type": "string"
+ },
+ "eventCorrelationId": {
+ "description": "The request id passed by NCMP.",
+ "type": "string"
+ },
+ "eventTime": {
+ "description": "The time of the event. The expected format is 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'.",
+ "type": "string"
+ },
+ "eventTarget": {
+ "description": "The target of the event.",
+ "type": "string"
+ },
+ "eventType": {
+ "description": "The type of the event.",
+ "type": "string"
+ },
+ "eventSchema": {
+ "description": "The event schema for async request response events.",
+ "type": "string"
+ },
+ "eventSource": {
+ "description": "The source of the event.",
+ "type": "string"
+ },
+ "eventContent": {
+ "$ref": "#/definitions/Event-Content"
+ }
+ },
+ "required": [
+ "eventId",
+ "eventCorrelationId",
+ "eventTime",
+ "eventTarget",
+ "eventType",
+ "eventSchema",
+ "eventSource",
+ "eventContent"
+ ]
+ },
+ "Event-Content": {
+ "description": "The event content.",
+ "type": "object",
+ "properties": {
+ "response-data-schema": {
+ "description": "The schema of response data",
+ "type": "string"
+ },
+ "response-status": {
+ "description": "The status of the response.",
+ "type": "string"
+ },
+ "response-code": {
+ "description": "The code of the response.",
+ "type": "string"
+ },
+ "response-data": {
+ "description": "The data payload",
+ "type": "object",
+ "properties": {
+ "payload": {
+ "type": "object"
+ }
+ }
+ },
+ "required": [
+ "response-data-schema",
+ "response-status",
+ "response-code",
+ "response-data"
+ ]
+ }
+ }
+ }
+}
diff --git a/cps-ncmp-events/src/main/resources/schemas/ncmp-async-request-response-event-schema-v1.json b/cps-ncmp-events/src/main/resources/schemas/ncmp-async-request-response-event-schema-v1.json
new file mode 100644
index 0000000000..3fd15bd5d2
--- /dev/null
+++ b/cps-ncmp-events/src/main/resources/schemas/ncmp-async-request-response-event-schema-v1.json
@@ -0,0 +1,187 @@
+{
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
+ "$id": "urn:cps:org.onap.cps.ncmp.events:ncmp-async-request-response-event-schema:v1",
+ "$ref": "#/definitions/NcmpAsyncRequestResponseEvent",
+ "definitions": {
+ "NcmpAsyncRequestResponseEvent": {
+ "description": "The payload for CPS async request response event.",
+ "type": "object",
+ "properties": {
+ "eventId": {
+ "description": "The unique id identifying the event generated by DMI.",
+ "type": "string"
+ },
+ "eventCorrelationId": {
+ "description": "The request id passed by NCMP.",
+ "type": "string"
+ },
+ "eventTime": {
+ "description": "The time of the event. The expected format is 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'.",
+ "type": "string"
+ },
+ "eventTarget": {
+ "description": "The target of the event.",
+ "type": "string"
+ },
+ "eventType": {
+ "description": "The type of the event.",
+ "type": "string"
+ },
+ "eventSchema": {
+ "description": "The event schema for async request response events.",
+ "type": "string"
+ },
+ "event": {
+ "$ref": "#/definitions/Event"
+ },
+ "forwardedEvent": {
+ "$ref": "#/definitions/Forwarded-Event"
+ }
+ },
+ "required": [
+ "eventId",
+ "eventCorrelationId",
+ "eventTime",
+ "eventTarget",
+ "eventType",
+ "eventSchema"
+ ]
+ },
+ "Forwarded-Event": {
+ "description": "The event content.",
+ "type": "object",
+ "properties": {
+ "eventId": {
+ "description": "The unique id identifying the event generated by DMI.",
+ "type": "string"
+ },
+ "eventCorrelationId": {
+ "description": "The request id passed by NCMP.",
+ "type": "string"
+ },
+ "eventTime": {
+ "description": "The time of the event. The expected format is 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'.",
+ "type": "string"
+ },
+ "eventTarget": {
+ "description": "The target of the event.",
+ "type": "string"
+ },
+ "eventType": {
+ "description": "The type of the event.",
+ "type": "string"
+ },
+ "eventSchema": {
+ "description": "The event schema for async request response events.",
+ "type": "string"
+ },
+ "eventSource": {
+ "description": "The source of the event.",
+ "type": "string"
+ },
+ "response-data-schema": {
+ "description": "The received schema of response data",
+ "type": "string"
+ },
+ "response-status": {
+ "description": "The received status of the response.",
+ "type": "string"
+ },
+ "response-code": {
+ "description": "The received code of the response.",
+ "type": "string"
+ },
+ "forwardedEventData": {
+ "description": "The data payload",
+ "type": "object",
+ "properties": {
+ "forwardedEventPayload": {
+ "type": "object"
+ }
+ }
+ },
+ "required": [
+ "eventId",
+ "eventCorrelationId",
+ "eventTime",
+ "eventTarget",
+ "eventType",
+ "eventSchema",
+ "eventSource",
+ "response-data-schema",
+ "response-status",
+ "response-code",
+ "forwardedEventData"
+ ]
+ }
+ },
+ "Event": {
+ "description": "The event content.",
+ "type": "object",
+ "properties": {
+ "eventId": {
+ "description": "The unique id identifying the event generated by DMI",
+ "type": "string"
+ },
+ "eventCorrelationId": {
+ "description": "The request id passed by NCMP.",
+ "type": "string"
+ },
+ "eventTime": {
+ "description": "The time of the event. The expected format is 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'.",
+ "type": "string"
+ },
+ "eventTarget": {
+ "description": "The target of the event.",
+ "type": "string"
+ },
+ "eventType": {
+ "description": "The type of the event.",
+ "type": "string"
+ },
+ "eventSchema": {
+ "description": "The event schema for async request response events.",
+ "type": "string"
+ },
+ "eventSource": {
+ "description": "The source of the event.",
+ "type": "string"
+ },
+ "response-data-schema": {
+ "description": "The received schema of response data",
+ "type": "string"
+ },
+ "response-status": {
+ "description": "The received status of the response.",
+ "type": "string"
+ },
+ "response-code": {
+ "description": "The received code of the response.",
+ "type": "string"
+ },
+ "response-data": {
+ "description": "The data payload",
+ "type": "object",
+ "properties": {
+ "payload": {
+ "type": "object"
+ }
+ }
+ },
+ "required": [
+ "eventId",
+ "eventCorrelationId",
+ "eventTarget",
+ "eventTime",
+ "eventType",
+ "eventSchema",
+ "eventSource",
+ "response-data-schema",
+ "response-status",
+ "response-code",
+ "event-data"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/cps-ncmp-events/src/main/resources/schemas/ncmp-event-schema-v1.json b/cps-ncmp-events/src/main/resources/schemas/ncmp-event-schema-v1.json
new file mode 100644
index 0000000000..84fc12edbd
--- /dev/null
+++ b/cps-ncmp-events/src/main/resources/schemas/ncmp-event-schema-v1.json
@@ -0,0 +1,87 @@
+{
+
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
+ "$id": "urn:cps:org.onap.ncmp.cmhandle.lcm-event:v1",
+
+ "$ref": "#/definitions/NcmpEvent",
+
+ "definitions": {
+
+ "NcmpEvent": {
+ "description": "The payload for NCMP event.",
+ "type": "object",
+ "javaType" : "org.onap.ncmp.cmhandle.lcm.event.NcmpEvent",
+ "properties": {
+ "eventId": {
+ "description": "The unique id identifying the event for the specified source.",
+ "type": "string"
+ },
+ "eventCorrelationId": {
+ "description": "The id identifying the event for the specified source.",
+ "type": "string"
+ },
+ "eventTime": {
+ "description": "The timestamp when the data has been observed.",
+ "type": "string"
+ },
+ "eventSource": {
+ "description": "The source of the event.",
+ "type": "string",
+ "format": "uri"
+ },
+ "eventType": {
+ "description": "The type of the event.",
+ "type": "string"
+ },
+ "eventSchema": {
+ "description": "The schema, including its version, that this event adheres to.",
+ "type": "string",
+ "format": "uri"
+ },
+ "event": {
+ "$ref": "#/definitions/Event"
+ }
+ },
+ "required": [
+ "eventId",
+ "eventTime",
+ "eventSource",
+ "eventType",
+ "eventSchema",
+ "event"
+ ],
+ "additionalProperties": false
+ },
+
+ "Event": {
+ "description": "The Payload of an event.",
+ "type": "object",
+ "properties": {
+ "cmHandleId": {
+ "description": "cmHandle id",
+ "type": "string"
+ },
+ "operation": {
+ "description": "The name of the Operation that triggered this event.",
+ "type": "string",
+ "enum": ["CREATE", "UPDATE", "DELETE"]
+ },
+ "cmhandle-state": {
+ "description": "State of cmHandle.",
+ "type": "string",
+ "enum": ["ADVISED", "READY", "LOCKED"]
+ },
+ "cmhandle-properties": {
+ "description": "cmHandle properties as json object.",
+ "type": "object",
+ "existingJavaType": "java.util.List<java.util.Map<String,String>>",
+ "additionalProperties": false
+ }
+ },
+ "required": [
+ "operation"
+ ],
+ "additionalProperties": false
+ }
+ }
+}