From 408e58f2abdddb5348dc491ef7863c5840ffe188 Mon Sep 17 00:00:00 2001 From: Achyut Kumar M Date: Wed, 29 Nov 2023 18:36:52 +0530 Subject: [PATCH 1/2] add confidence metric event messages --- event/osm-formatter-request.json | 9 +++++++++ event/osm-formatter-response-failed.json | 12 ++++++++++++ event/osm-formatter-response-success.json | 12 ++++++++++++ event/osw-confidence-calculated.json | 7 +++++++ event/osw-confidence-requested.json | 6 ++++++ 5 files changed, 46 insertions(+) create mode 100644 event/osm-formatter-request.json create mode 100644 event/osm-formatter-response-failed.json create mode 100644 event/osm-formatter-response-success.json create mode 100644 event/osw-confidence-calculated.json create mode 100644 event/osw-confidence-requested.json diff --git a/event/osm-formatter-request.json b/event/osm-formatter-request.json new file mode 100644 index 0000000..007459f --- /dev/null +++ b/event/osm-formatter-request.json @@ -0,0 +1,9 @@ +{ + "messageType": "osw-formatter-request", + "data":{ + "sourceUrl":"https://tdeisamplestorage.blob.core.windows.net/osw/formatter/uid/valid_c8c76e89f30944d2b2abd2491bd95337.zip", + "jobId":"42", + "source":"osw", + "target":"osm" + } +} diff --git a/event/osm-formatter-response-failed.json b/event/osm-formatter-response-failed.json new file mode 100644 index 0000000..3bd403b --- /dev/null +++ b/event/osm-formatter-response-failed.json @@ -0,0 +1,12 @@ + +{ + "messageType": "osw-formatter-response", + "data":{ + "sourceUrl":"https://tdeisamplestorage.blob.core.windows.net/osw/formatter/uid/valid_c8c76e89f30944d2b2abd2491bd95337.zip", + "jobId":"42", + "status":"failed", + "formattedUrl":"", + "message":"Error occured during the conversion.. (details)" + + } +} diff --git a/event/osm-formatter-response-success.json b/event/osm-formatter-response-success.json new file mode 100644 index 0000000..ec90648 --- /dev/null +++ b/event/osm-formatter-response-success.json @@ -0,0 +1,12 @@ + +{ + "messageType": "osw-formatter-response", + "data":{ + "sourceUrl":"https://tdeisamplestorage.blob.core.windows.net/osw/formatter/uid/valid_c8c76e89f30944d2b2abd2491bd95337.zip", + "jobId":"42", + "status":"completed", + "formattedUrl":"https://tdeisamplestorage.blob.core.windows.net/osw/formatter/uid/valid_c8c76e89f30944d2b2abd2491bd95337.osw", + "message":"" + + } +} diff --git a/event/osw-confidence-calculated.json b/event/osw-confidence-calculated.json new file mode 100644 index 0000000..f93fd87 --- /dev/null +++ b/event/osw-confidence-calculated.json @@ -0,0 +1,7 @@ +{ + "jobId":"", + "confidence_level":"", + "confidence_library_version":"", + "status":"", + "message":"" +} diff --git a/event/osw-confidence-requested.json b/event/osw-confidence-requested.json new file mode 100644 index 0000000..4c29938 --- /dev/null +++ b/event/osw-confidence-requested.json @@ -0,0 +1,6 @@ +{ + "jobId":"", + "data_file":"", + "meta_file":"", + "trigger_type":"" +} From 474700811fe6f333a27024494d6683bb3d34bd58 Mon Sep 17 00:00:00 2001 From: Naresh Kumar D Date: Thu, 30 Nov 2023 09:16:11 +0530 Subject: [PATCH 2/2] Added schema for the files Added schema files for the files --- event/osw-confidence-calculated.json | 4 +++ event/osw-confidence-requested.json | 13 ++++--- schema/osw-confidence-request-schema.json | 36 +++++++++++++++++++ schema/osw-confidence-response-schema.json | 40 ++++++++++++++++++++++ schema/osw-formatter-request-schema.json | 36 +++++++++++++++++++ schema/osw-formatter-response-schema.json | 40 ++++++++++++++++++++++ 6 files changed, 164 insertions(+), 5 deletions(-) create mode 100644 schema/osw-confidence-request-schema.json create mode 100644 schema/osw-confidence-response-schema.json create mode 100644 schema/osw-formatter-request-schema.json create mode 100644 schema/osw-formatter-response-schema.json diff --git a/event/osw-confidence-calculated.json b/event/osw-confidence-calculated.json index f93fd87..35709a7 100644 --- a/event/osw-confidence-calculated.json +++ b/event/osw-confidence-calculated.json @@ -1,3 +1,6 @@ +{ + "messageType":"confidence-response", + "data": { "jobId":"", "confidence_level":"", @@ -5,3 +8,4 @@ "status":"", "message":"" } +} diff --git a/event/osw-confidence-requested.json b/event/osw-confidence-requested.json index 4c29938..559e67c 100644 --- a/event/osw-confidence-requested.json +++ b/event/osw-confidence-requested.json @@ -1,6 +1,9 @@ { - "jobId":"", - "data_file":"", - "meta_file":"", - "trigger_type":"" -} + "messageType": "osw-confidence-request", + "data": { + "jobId": "", + "data_file": "", + "meta_file": "", + "trigger_type": "" + } +} \ No newline at end of file diff --git a/schema/osw-confidence-request-schema.json b/schema/osw-confidence-request-schema.json new file mode 100644 index 0000000..6d8d1ed --- /dev/null +++ b/schema/osw-confidence-request-schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "messageType": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "jobId": { + "type": "string" + }, + "data_file": { + "type": "string" + }, + "meta_file": { + "type": "string" + }, + "trigger_type": { + "type": "string" + } + }, + "required": [ + "jobId", + "data_file", + "meta_file", + "trigger_type" + ] + } + }, + "required": [ + "messageType", + "data" + ] + } \ No newline at end of file diff --git a/schema/osw-confidence-response-schema.json b/schema/osw-confidence-response-schema.json new file mode 100644 index 0000000..784831f --- /dev/null +++ b/schema/osw-confidence-response-schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "messageType": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "jobId": { + "type": "string" + }, + "confidence_level": { + "type": "string" + }, + "confidence_library_version": { + "type": "string" + }, + "status": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "jobId", + "confidence_level", + "confidence_library_version", + "status", + "message" + ] + } + }, + "required": [ + "messageType", + "data" + ] + } \ No newline at end of file diff --git a/schema/osw-formatter-request-schema.json b/schema/osw-formatter-request-schema.json new file mode 100644 index 0000000..2c66fa3 --- /dev/null +++ b/schema/osw-formatter-request-schema.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "messageType": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "sourceUrl": { + "type": "string" + }, + "jobId": { + "type": "string" + }, + "source": { + "type": "string" + }, + "target": { + "type": "string" + } + }, + "required": [ + "sourceUrl", + "jobId", + "source", + "target" + ] + } + }, + "required": [ + "messageType", + "data" + ] + } \ No newline at end of file diff --git a/schema/osw-formatter-response-schema.json b/schema/osw-formatter-response-schema.json new file mode 100644 index 0000000..a5c4a2d --- /dev/null +++ b/schema/osw-formatter-response-schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "messageType": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "sourceUrl": { + "type": "string" + }, + "jobId": { + "type": "string" + }, + "status": { + "type": "string" + }, + "formattedUrl": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "sourceUrl", + "jobId", + "status", + "formattedUrl", + "message" + ] + } + }, + "required": [ + "messageType", + "data" + ] + } \ No newline at end of file