Added eventSchemaVersion for async schema
- Added event schema version in the request and response schema.
- Enhanced the mapper to adhere to new field.
Issue-ID: CPS-1145
Change-Id: I408f73adefc2104b2e421bc3a3fe8f78dcba80f0
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
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 528c063..2340a4b 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 3fd15bd..51c2cf4 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",