aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cps-ncmp-events/src/main/resources/schemas/dmi-async-request-response-event-schema-v1.json5
-rw-r--r--cps-ncmp-events/src/main/resources/schemas/ncmp-async-request-response-event-schema-v1.json12
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/async/NcmpAsyncRequestResponseEventMapper.java1
-rw-r--r--cps-ncmp-service/src/test/resources/dmiAsyncRequestResponseEvent.json3
4 files changed, 19 insertions, 2 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
index 528c063826..2340a4bc4c 100644
--- 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
@@ -31,6 +31,10 @@
"description": "The event schema for async request response events.",
"type": "string"
},
+ "eventSchemaVersion": {
+ "description": "The event schema version for async request response events.",
+ "type": "string"
+ },
"eventSource": {
"description": "The source of the event.",
"type": "string"
@@ -46,6 +50,7 @@
"eventTarget",
"eventType",
"eventSchema",
+ "eventSchemaVersion",
"eventSource",
"eventContent"
]
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
index 3fd15bd5d2..51c2cf4d40 100644
--- 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
@@ -31,6 +31,10 @@
"description": "The event schema for async request response events.",
"type": "string"
},
+ "eventSchemaVersion": {
+ "description": "The event schema version for async request response events.",
+ "type": "string"
+ },
"event": {
"$ref": "#/definitions/Event"
},
@@ -44,7 +48,8 @@
"eventTime",
"eventTarget",
"eventType",
- "eventSchema"
+ "eventSchema",
+ "eventSchemaVersion"
]
},
"Forwarded-Event": {
@@ -75,6 +80,10 @@
"description": "The event schema for async request response events.",
"type": "string"
},
+ "eventSchemaVersion": {
+ "description": "The event schema version for async request response events.",
+ "type": "string"
+ },
"eventSource": {
"description": "The source of the event.",
"type": "string"
@@ -107,6 +116,7 @@
"eventTarget",
"eventType",
"eventSchema",
+ "eventSchemaVersion",
"eventSource",
"response-data-schema",
"response-status",
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/async/NcmpAsyncRequestResponseEventMapper.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/async/NcmpAsyncRequestResponseEventMapper.java
index 5d8ac7f841..46a11b82a0 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/async/NcmpAsyncRequestResponseEventMapper.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/async/NcmpAsyncRequestResponseEventMapper.java
@@ -42,6 +42,7 @@ public interface NcmpAsyncRequestResponseEventMapper {
@Mapping(source = "eventId", target = "forwardedEvent.eventId")
@Mapping(source = "eventCorrelationId", target = "forwardedEvent.eventCorrelationId")
@Mapping(source = "eventSchema", target = "forwardedEvent.eventSchema")
+ @Mapping(source = "eventSchemaVersion", target = "forwardedEvent.eventSchemaVersion")
@Mapping(source = "eventSource", target = "forwardedEvent.eventSource")
@Mapping(source = "eventTarget", target = "forwardedEvent.eventTarget")
@Mapping(source = "eventTime", target = "forwardedEvent.eventTime")
diff --git a/cps-ncmp-service/src/test/resources/dmiAsyncRequestResponseEvent.json b/cps-ncmp-service/src/test/resources/dmiAsyncRequestResponseEvent.json
index bf6c86aaac..f2a928b47f 100644
--- a/cps-ncmp-service/src/test/resources/dmiAsyncRequestResponseEvent.json
+++ b/cps-ncmp-service/src/test/resources/dmiAsyncRequestResponseEvent.json
@@ -3,7 +3,8 @@
"eventCorrelationId": "122ca20b-4f8c-4759-a2b4-f0b9456df204",
"eventTime": "2022-05-09T13:34:50.466+0000",
"eventSource": "org.onap.ncmp",
- "eventSchema": "urn:cps:org.onap.cps:async-request-response-event-schema:v1",
+ "eventSchema": "urn:cps:org.onap.cps:async-request-response-event-schema",
+ "eventSchemaVersion": "v1",
"eventTarget": "test-topic",
"eventContent": {
"response-data-schema": "urn:cps:org.onap.cps:async-request-response-event-schema:v1",