diff --git a/examples/wme-gdc-wcmp2-ets.json b/examples/wme-gdc-wcmp2-ets.json index 4fda8d6..96d208f 100644 --- a/examples/wme-gdc-wcmp2-ets.json +++ b/examples/wme-gdc-wcmp2-ets.json @@ -1,6 +1,6 @@ { "specversion": "1.0", - "type": "int.wmo.wis.wme.event.wcmp2", + "type": "int.wmo.wis.wme.event.wcmp2.ets", "source": "ca-eccc-msc-global-discovery-catalogue", "subject": "de-dwd", "id": "6e1c7f9f-dd6c-48d9-bbc4-aef0625f1fb8", diff --git a/examples/wme-gdc-wcmp2-kpi.json b/examples/wme-gdc-wcmp2-kpi.json new file mode 100644 index 0000000..040c3ca --- /dev/null +++ b/examples/wme-gdc-wcmp2-kpi.json @@ -0,0 +1,99 @@ +{ + "specversion": "1.0", + "type": "int.wmo.wis.wme.event.wcmp2.kpi", + "source": "ca-eccc-msc-global-discovery-catalogue", + "subject": "de-dwd", + "id": "6e1c7f9f-dd6c-48d9-bbc4-aef0625f1fb8", + "time": "2025-02-01T18:19:37Z", + "datacontenttype": "application/json", + "dataschema": "https://schemas.wmo.int/wme/1.0.0/schemas/wcmp2-ets-bundled.json", + "data": { + "id": "38631309-36b7-4c71-a7cd-aaca48f81a49", + "report_type": "kpi", + "metadata_id": "urn:wmo:md:de-dwd:icon-eps.ALL", + "datetime": "2025-02-01T18:17:24Z", + "generated_by": "pywcmp 0.10.1 (https://github.com/wmo-im/pywcmp)", + "tests": [ + { + "id": "http://wis.wmo.int/spec/wcmp/2/kpi/core/contacts", + "title": "Contacts", + "total": 3, + "score": 3, + "comments": [], + "percentage": 100.0 + }, + { + "id": "http://wis.wmo.int/spec/wcmp/2/kpi/core/good_quality_description", + "title": ": Good quality description", + "total": 4, + "score": 3, + "comments": [ + "Description contains spelling errors ['eps', 'deg', '180h', 'lat', '6h', 'utc', 'lon']" + ], + "percentage": 75.0 + }, + { + "id": "http://wis.wmo.int/spec/wcmp/2/kpi/core/graphic_overview_for_metadata_records", + "title": "Graphic overview for metadata records", + "total": 0, + "score": 0, + "comments": [], + "percentage": null + }, + { + "id": "http://wis.wmo.int/spec/wcmp/2/kpi/core/links_health", + "title": "Links health", + "total": 22, + "score": 22, + "comments": [], + "percentage": 100.0 + }, + { + "id": "http://wis.wmo.int/spec/wcmp/2/kpi/core/persistent_identifiers", + "title": "Persistent identifiers", + "total": 3, + "score": 1, + "comments": [ + "No DOI/ARK/HDL schema found" + ], + "percentage": 33.333 + }, + { + "id": "http://wis.wmo.int/spec/wcmp/2/kpi/core/time_intervals", + "title": "Time intervals", + "total": 6, + "score": 5, + "comments": [ + "No temporal resolution found" + ], + "percentage": 83.333 + }, + { + "id": "http://wis.wmo.int/spec/wcmp/2/kpi/core/good_quality_title", + "title": "Global Ensemble Prediction Model", + "total": 8, + "score": 7, + "comments": [ + "Title is not sentence case" + ], + "percentage": 87.5 + } + ], + "summary": { + "total": 46, + "score": 41, + "comments": { + "id": "http://wis.wmo.int/spec/wcmp/2/kpi/core/good_quality_title", + "title": "Global Ensemble Prediction Model", + "total": 8, + "score": 7, + "comments": [ + "Title is not sentence case" + ], + "percentage": 87.5 + }, + "percentage": 89.13, + "grade": "A" + } + } +} diff --git a/schemas/monitoringEventMessageEncodingJSON.yaml b/schemas/monitoringEventMessageEncodingJSON.yaml index 5fa8634..5a2494d 100644 --- a/schemas/monitoringEventMessageEncodingJSON.yaml +++ b/schemas/monitoringEventMessageEncodingJSON.yaml @@ -9,8 +9,10 @@ allOf: type: type: string enum: - - int.wmo.wis.wme.event.wcmp2 + - int.wmo.wis.wme.event.wcmp2.ets + - int.wmo.wis.wme.event.wcmp2.kpi - int.wmo.wis.wme.event.wnm + - int.wmo.wis.wme.event.system.alert - required: - datacontenttype @@ -18,4 +20,3 @@ allOf: - subject - time - data - diff --git a/schemas/systemAlertJSON.yaml b/schemas/systemAlertJSON.yaml new file mode 100644 index 0000000..758836a --- /dev/null +++ b/schemas/systemAlertJSON.yaml @@ -0,0 +1,24 @@ +$schema: https://json-schema.org/draft/2020-12/schema +$id: https://schemas.wmo.int/wme/1/systemAlertJSON.yaml +title: System Alert report +description: System Alert report + +properties: + id: + type: string + format: uuid + level: + type: string + description: report level + enum: + - debug + - info + - warn + - error + - critical + message: + type: string +required: + - id + - level + - message diff --git a/schemas/wcmp2-ets-bundled.json b/schemas/wcmp2-ets-bundled.json deleted file mode 100644 index 65165cd..0000000 --- a/schemas/wcmp2-ets-bundled.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.wmo.int/wme/1/wcmp2EtsJSON.yaml", - "title": "WCMP2 Executable Test Suite report", - "description": "WCMP2 Executable Test Suite report", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "report_type": { - "const": "ets" - }, - "summary": { - "type": "object", - "description": "summary information", - "properties": { - "PASSED": { - "type": "integer" - }, - "FAILED": { - "type": "integer" - }, - "SKIPPED": { - "type": "integer" - } - }, - "required": [ - "PASSED", - "FAILED", - "SKIPPED" - ] - }, - "tests": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "code": { - "type": "string", - "enum": [ - "PASSED", - "FAILED", - "SKIPPED" - ] - }, - "message": { - "type": "string" - } - }, - "required": [ - "id", - "code" - ] - } - }, - "generated_by": { - "type": "string" - }, - "datetime": { - "type": "string", - "format": "date-time" - }, - "metadata_id": { - "type": "string" - } - }, - "required": [ - "id", - "report_type", - "summary", - "generated_by", - "datetime", - "metadata_id", - "tests" - ] -} diff --git a/schemas/wcmp2-kpi-bundled.json b/schemas/wcmp2-kpi-bundled.json deleted file mode 100644 index ee9d92a..0000000 --- a/schemas/wcmp2-kpi-bundled.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.wmo.int/wme/1/wcmp2KpiJSON.yaml", - "title": "WCMP2 Key Performance Indicator report", - "description": "WCMP2 Key Performance Indicator report", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "report_type": { - "const": "kpi" - }, - "summary": { - "type": "object", - "properties": { - "grade": { - "type": "string", - "enum": [ - "A", - "B", - "C", - "D", - "E", - "F" - ] - } - }, - "required": [ - "grade" - ] - }, - "tests": { - "type": "array", - "minItems": 1, - "items": { - "allOf": [ - "#/definitions/summary", - { - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "title", - "total", - "score", - "percentage" - ] - } - ] - } - }, - "generated_by": { - "type": "string" - }, - "datetime": { - "type": "string", - "format": "date-time" - }, - "metadata_id": { - "type": "string" - } - }, - "required": [ - "id", - "report_type", - "summary", - "generated_by", - "datetime", - "metadata_id", - "tests" - ], - "definitions": { - "summary": { - "type": "object", - "properties": { - "total": { - "type": "integer" - }, - "score": { - "type": "number" - }, - "comments": { - "type": "string" - }, - "percentage": { - "type": "number" - } - }, - "required": [ - "total", - "score", - "percentage" - ] - } - } -} \ No newline at end of file diff --git a/schemas/wcmp2EtsJSON.yaml b/schemas/wcmp2EtsJSON.yaml deleted file mode 100644 index 874bb6b..0000000 --- a/schemas/wcmp2EtsJSON.yaml +++ /dev/null @@ -1,59 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -$id: https://schemas.wmo.int/wme/1/wcmp2EtsJSON.yaml -title: WCMP2 Executable Test Suite report -description: WCMP2 Executable Test Suite report - -properties: - id: - type: string - format: uuid - report_type: - const: ets - summary: - type: object - description: summary information - properties: - PASSED: - type: integer - FAILED: - type: integer - SKIPPED: - type: integer - required: - - PASSED - - FAILED - - SKIPPED - tests: - type: array - items: - type: object - properties: - id: - type: string - format: uri - code: - type: string - enum: - - PASSED - - FAILED - - SKIPPED - message: - type: string - required: - - id - - code - generated_by: - type: string - datetime: - type: string - format: date-time - metadata_id: - type: string -required: - - id - - report_type - - summary - - generated_by - - datetime - - metadata_id - - tests diff --git a/schemas/wcmp2KpiJSON.yaml b/schemas/wcmp2KpiJSON.yaml deleted file mode 100644 index 41228fc..0000000 --- a/schemas/wcmp2KpiJSON.yaml +++ /dev/null @@ -1,75 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -$id: https://schemas.wmo.int/wme/1/wcmp2KpiJSON.yaml -title: WCMP2 Key Performance Indicator report -description: WCMP2 Key Performance Indicator report - -properties: - id: - type: string - format: uuid - report_type: - const: kpi - summary: - type: object - properties: - grade: - type: string - enum: - - A - - B - - C - - D - - E - - F - required: - - grade - tests: - type: array - minItems: 1 - items: - allOf: - - '#/definitions/summary' - - properties: - id: - type: string - format: uri - title: - type: string - required: - - id - - title - - total - - score - - percentage - generated_by: - type: string - datetime: - type: string - format: date-time - metadata_id: - type: string -required: - - id - - report_type - - summary - - generated_by - - datetime - - metadata_id - - tests - -definitions: - summary: - type: object - properties: - total: - type: integer - score: - type: number - comments: - type: string - percentage: - type: number - required: - - total - - score - - percentage diff --git a/schemas/wis2-event-message-encoding-bundled.json b/schemas/wis2-event-message-encoding-bundled.json index 7f3e5df..d15fac1 100644 --- a/schemas/wis2-event-message-encoding-bundled.json +++ b/schemas/wis2-event-message-encoding-bundled.json @@ -99,8 +99,10 @@ "type": { "type": "string", "enum": [ - "int.wmo.wis.wme.event.wcmp2", - "int.wmo.wis.wme.event.wnm" + "int.wmo.wis.wme.event.wcmp2.ets", + "int.wmo.wis.wme.event.wcmp2.kpi", + "int.wmo.wis.wme.event.wnm", + "int.wmo.wis.wme.event.system.alert" ] } } @@ -227,4 +229,4 @@ "minLength": 1 } } -} \ No newline at end of file +} diff --git a/schemas/wnm-report-bundled.json b/schemas/wnm-report-bundled.json deleted file mode 100644 index 92ef5a8..0000000 --- a/schemas/wnm-report-bundled.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.wmo.int/wme/1/wnmReportJSON.yaml", - "title": "WNM report", - "description": "WNM report", - "properties": { - "topic": { - "type": "string", - "description": "WIS2 Topic related to the report" - }, - "wnm": { - "type": "object", - "description": "WNM related to the report" - }, - "exception": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "type of exception", - "enum": [ - "invalid-schema", - "invalid-topic", - "missing-metadata" - ] - }, - "description": { - "type": "string", - "description": "details of exception" - }, - "errors": { - "type": "array", - "description": "error stack of exception", - "minItems": 1, - "items": { - "type": "object" - } - } - }, - "required": [ - "code", - "description" - ] - } - }, - "required": [ - "topic", - "wnm", - "exception" - ] -} \ No newline at end of file diff --git a/schemas/wnmReportJSON.yaml b/schemas/wnmReportJSON.yaml deleted file mode 100644 index 0bec400..0000000 --- a/schemas/wnmReportJSON.yaml +++ /dev/null @@ -1,38 +0,0 @@ -$schema: https://json-schema.org/draft/2020-12/schema -$id: https://schemas.wmo.int/wme/1/wnmReportJSON.yaml -title: WNM report -description: WNM report - -properties: - topic: - type: string - description: WIS2 Topic related to the report - wnm: - type: object - description: WNM related to the report - exception: - type: object - properties: - code: - type: string - description: type of exception - enum: - - invalid-schema - - invalid-topic - - missing-metadata - description: - type: string - description: details of exception - errors: - type: array - description: error stack of exception - minItems: 1 - items: - type: object - required: - - code - - description -required: - - topic - - wnm - - exception diff --git a/standard/abstract_tests/ATS_class_monitoring-event-message-encoding-core.adoc b/standard/abstract_tests/ATS_class_monitoring-event-message-encoding-core.adoc index 07da44b..9b5e024 100644 --- a/standard/abstract_tests/ATS_class_monitoring-event-message-encoding-core.adoc +++ b/standard/abstract_tests/ATS_class_monitoring-event-message-encoding-core.adoc @@ -38,10 +38,6 @@ include::./monitoring-event-message-encoding-core/ATS_test_time.adoc[] include::./monitoring-event-message-encoding-core/ATS_test_datacontenttype.adoc[] -==== Data schema - -include::./monitoring-event-message-encoding-core/ATS_test_dataschema.adoc[] - ==== Data include::./monitoring-event-message-encoding-core/ATS_test_data.adoc[] diff --git a/standard/abstract_tests/ATS_class_monitoring-event-message-encoding-system-alert.adoc b/standard/abstract_tests/ATS_class_monitoring-event-message-encoding-system-alert.adoc new file mode 100644 index 0000000..fe970f9 --- /dev/null +++ b/standard/abstract_tests/ATS_class_monitoring-event-message-encoding-system-alert.adoc @@ -0,0 +1,23 @@ +[[ats_monitoring-event-message-encoding-system-alert]] +==== +[%metadata] +label:: http://wis.wmo.int/spec/wme/1/req/monitoring-event-message-encoding-system-alert +subject:: Requirements Class "WIS2 Monitoring Event Message Encoding: System Alert" +classification:: Target Type:Event Metadata +==== + +==== Validation + +include::./monitoring-event-message-encoding-system-alert/ATS_test_validation.adoc[] + +==== Type + +include::./monitoring-event-message-encoding-system-alert/ATS_test_type.adoc[] + +==== Data schema + +include::./monitoring-event-message-encoding-system-alert/ATS_test_dataschema.adoc[] + +==== Data + +include::./monitoring-event-message-encoding-system-alert/ATS_test_data.adoc[] diff --git a/standard/abstract_tests/monitoring-event-message-encoding-core/ATS_test_data.adoc b/standard/abstract_tests/monitoring-event-message-encoding-core/ATS_test_data.adoc index a4a51da..22a9ca2 100644 --- a/standard/abstract_tests/monitoring-event-message-encoding-core/ATS_test_data.adoc +++ b/standard/abstract_tests/monitoring-event-message-encoding-core/ATS_test_data.adoc @@ -17,10 +17,5 @@ Check for the existence of a `+data+` property in the WEM. Parse the `+data+` property as a JSON object. -- -[.component,class=step] --- -Validate the parsed JSON object against the JSON Schema defined in the `+dataschema+` property. --- - ===== ==== diff --git a/standard/abstract_tests/monitoring-event-message-encoding-system-alert/ATS_test_data.adoc b/standard/abstract_tests/monitoring-event-message-encoding-system-alert/ATS_test_data.adoc new file mode 100644 index 0000000..47f2fe3 --- /dev/null +++ b/standard/abstract_tests/monitoring-event-message-encoding-system-alert/ATS_test_data.adoc @@ -0,0 +1,27 @@ +[[ats_event-message-encoding-system-alert_data]] +==== +[%metadata] +label:: /conf/event-message-encoding-system-alert/data +subject:: /req/event-message-encoding-system-alert/data +test-purpose:: Validate that a System Alert report has a valid data payload. + +[.component,class=test method] +===== +[.component,class=step] +-- +Check for the existence of a `+data+` property in the WEM. +-- + +[.component,class=step] +-- +Parse the `+data+` property as a JSON object. +-- + +[.component,class=step] +-- +Validate the parsed JSON object against the JSON Schema defined in the `+dataschema+` property. +-- + +===== +==== + diff --git a/standard/abstract_tests/monitoring-event-message-encoding-system-alert/ATS_test_dataschema.adoc b/standard/abstract_tests/monitoring-event-message-encoding-system-alert/ATS_test_dataschema.adoc new file mode 100644 index 0000000..92546c4 --- /dev/null +++ b/standard/abstract_tests/monitoring-event-message-encoding-system-alert/ATS_test_dataschema.adoc @@ -0,0 +1,31 @@ +[[ats_event-message-encoding-system-alert_dataschema]] +==== +[%metadata] +label:: /conf/event-message-encoding-system-alert/dataschema +subject:: /req/event-message-encoding-system-alert/dataschema +test-purpose:: Validate that a System Alert report has a valid data schema. + +[.component,class=test method] +===== +[.component,class=step] +-- +Check for the existence of a `+dataschema+` property in the WEM. +-- + +[.component,class=step] +-- +Issue a HTTP GET request on the value of the `+dataschema+` property. +-- + +[.component,class=step] +-- +Parse the HTTP response. +-- + +[.component,class=step] +-- +Ensure the response is a valid JSON Schema. +-- + +===== +==== diff --git a/standard/abstract_tests/monitoring-event-message-encoding-system-alert/ATS_test_type.adoc b/standard/abstract_tests/monitoring-event-message-encoding-system-alert/ATS_test_type.adoc new file mode 100644 index 0000000..88ffbb9 --- /dev/null +++ b/standard/abstract_tests/monitoring-event-message-encoding-system-alert/ATS_test_type.adoc @@ -0,0 +1,21 @@ +[[ats_event-message-encoding-system-alert_type]] +==== +[%metadata] +label:: /conf/event-message-encoding-system-alert/type +subject:: /req/event-message-encoding-system-alert/type +test-purpose:: Validate that a System Alert report has a valid type. + +[.component,class=test method] +===== +[.component,class=step] +-- +Check for the existence of a `+type+` property in the WEM. +-- + +[.component,class=step] +-- +Check that the `+type+` property is equal to `int.wmo.wis.wme.event.system.alert`. +-- + +===== +==== diff --git a/standard/abstract_tests/monitoring-event-message-encoding-system-alert/ATS_test_validation.adoc b/standard/abstract_tests/monitoring-event-message-encoding-system-alert/ATS_test_validation.adoc new file mode 100644 index 0000000..0037046 --- /dev/null +++ b/standard/abstract_tests/monitoring-event-message-encoding-system-alert/ATS_test_validation.adoc @@ -0,0 +1,15 @@ +[[ats_event-message-encoding-system-alert_validation]] +==== +[%metadata] +label:: /conf/event-message-encoding-system-alert/validation +subject:: /req/event-message-encoding-system-alert/validation +test-purpose:: Validate that a System Alert report is valid to the authoritative System Alert report schema. + +[.component,class=test method] +===== +[.component,class=step] +-- +Run JSON Schema validation on the System Alert report against the System Alert report authoritative schema. +-- +===== +==== diff --git a/standard/index.adoc b/standard/index.adoc index 5a726a5..88966d6 100644 --- a/standard/index.adoc +++ b/standard/index.adoc @@ -52,9 +52,7 @@ include::sections/clause_7_monitoring_event_topic.adoc[] include::sections/clause_8_event_message_encoding_core.adoc[] -//include::sections/clause_9_monitoring_message_wcmp2_ets.adoc[] - -//include::sections/clause_10_monitoring_message_wcmp2_kpi.adoc[] +include::sections/clause_9_event_message_encoding_system_alert.adoc[] include::sections/annex_a_ats.adoc[] diff --git a/standard/requirements/monitoring-event-message-encoding-core/REQ_data.adoc b/standard/requirements/monitoring-event-message-encoding-core/REQ_data.adoc index 47224d1..fff55d5 100644 --- a/standard/requirements/monitoring-event-message-encoding-core/REQ_data.adoc +++ b/standard/requirements/monitoring-event-message-encoding-core/REQ_data.adoc @@ -3,6 +3,5 @@ |=== ^|*Requirement {counter:req-id}* |*/req/monitoring-event-message-encoding-core/data* ^|A |The `+data+` property SHALL be a JSON encoded payload of a given event. -^|B |The `+data+` property SHALL NOT be escaped representation of JSON. -^|C |The `+data+` property SHALL validate against the JSON Schema specified in the ``dataschema`` property. +^|B |The `+data+` property SHALL NOT be an escaped representation of JSON. |=== diff --git a/standard/requirements/monitoring-event-message-encoding-core/REQ_dataschema.adoc b/standard/requirements/monitoring-event-message-encoding-core/REQ_dataschema.adoc deleted file mode 100644 index e4070a9..0000000 --- a/standard/requirements/monitoring-event-message-encoding-core/REQ_dataschema.adoc +++ /dev/null @@ -1,6 +0,0 @@ -[[req_monitoring-event-message-encoding-core_dataschema]] -[width="90%",cols="2,6a"] -|=== -^|*Requirement {counter:req-id}* |*/req/monitoring-event-message-encoding-core/dataschema* -^|A |The `+dataschema+` property SHALL be a URL to a JSON Schema that can be successfully derefenced by validating JSON Schema tools. -|=== diff --git a/standard/requirements/monitoring-event-message-encoding-core/REQ_type.adoc b/standard/requirements/monitoring-event-message-encoding-core/REQ_type.adoc index 99ddf8f..560b284 100644 --- a/standard/requirements/monitoring-event-message-encoding-core/REQ_type.adoc +++ b/standard/requirements/monitoring-event-message-encoding-core/REQ_type.adoc @@ -3,5 +3,10 @@ |=== ^|*Requirement {counter:req-id}* |*/req/monitoring-event-message-encoding-core/type* ^|A |The `+type+` property SHALL be encoded using a reverse DNS notation. -^|A |The `+type+` property SHALL begin with `int.wmo.wis.wme.event.` +^|B |The `+type+` property SHALL be one of the following values: + +* `int.wmo.wis.wme.event.wcmp2.ets` +* `int.wmo.wis.wme.event.wcmp2.kpi` +* `int.wmo.wis.wme.event.wnm` +* `int.wmo.wis.wme.event.system.alert` |=== diff --git a/standard/requirements/monitoring-event-message-encoding-system-alert/REQ_data.adoc b/standard/requirements/monitoring-event-message-encoding-system-alert/REQ_data.adoc new file mode 100644 index 0000000..7188297 --- /dev/null +++ b/standard/requirements/monitoring-event-message-encoding-system-alert/REQ_data.adoc @@ -0,0 +1,6 @@ +[[req_monitoring-event-message-encoding-system-alert_data]] +[width="90%",cols="2,6a"] +|=== +^|*Requirement {counter:req-id}* |*/req/monitoring-event-message-encoding-system-alert/data* +^|A |The `+data+` property SHALL be a JSON encoded payload of a given event. +|=== diff --git a/standard/requirements/monitoring-event-message-encoding-system-alert/REQ_dataschema.adoc b/standard/requirements/monitoring-event-message-encoding-system-alert/REQ_dataschema.adoc new file mode 100644 index 0000000..3bab375 --- /dev/null +++ b/standard/requirements/monitoring-event-message-encoding-system-alert/REQ_dataschema.adoc @@ -0,0 +1,7 @@ +[[req_monitoring-event-message-encoding-system-alert_dataschema]] +[width="90%",cols="2,6a"] +|=== +^|*Requirement {counter:req-id}* |*/req/monitoring-event-message-encoding-system-alert/dataschema* +^|A |The `+dataschema+` property SHALL be a URL to the System Alert JSON Schema. +|=== + diff --git a/standard/requirements/monitoring-event-message-encoding-system-alert/REQ_type.adoc b/standard/requirements/monitoring-event-message-encoding-system-alert/REQ_type.adoc new file mode 100644 index 0000000..a35e760 --- /dev/null +++ b/standard/requirements/monitoring-event-message-encoding-system-alert/REQ_type.adoc @@ -0,0 +1,6 @@ +[[req_monitoring-event-message-encoding-system-alert_type]] +[width="90%",cols="2,6a"] +|=== +^|*Requirement {counter:req-id}* |*/req/monitoring-event-message-encoding-system-alert/type* +^|A |The `+type+` property of a System Alert report SHALL be equal to `int.wmo.wis.wme.event.system.alert` +|=== diff --git a/standard/requirements/monitoring-event-message-encoding-system-alert/REQ_validation.adoc b/standard/requirements/monitoring-event-message-encoding-system-alert/REQ_validation.adoc new file mode 100644 index 0000000..9add2a7 --- /dev/null +++ b/standard/requirements/monitoring-event-message-encoding-system-alert/REQ_validation.adoc @@ -0,0 +1,6 @@ +[[req_monitoring-event-message-encoding-system-alert_validation]] +[width="90%",cols="2,6a"] +|=== +^|*Requirement {counter:req-id}* |*/req/monitoring-event-message-encoding-system-alert/validation* +^|A |Each System Alert report SHALL validate without error against the System Alert report schema. +|=== diff --git a/standard/requirements/requirements_class_monitoring-event-message-encoding-system-alert.adoc b/standard/requirements/requirements_class_monitoring-event-message-encoding-system-alert.adoc new file mode 100644 index 0000000..d6b9358 --- /dev/null +++ b/standard/requirements/requirements_class_monitoring-event-message-encoding-system-alert.adoc @@ -0,0 +1,9 @@ +[[rc_monitoring-event-message-encoding-system-alert]] +[cols="1,4",width="90%"] +|=== +2+|*Requirements Class* +2+|http://www.wmo.int/spec/wme/1/req/monitoring-event-message-encoding-system-alert +|Target type |Event metadata +|Dependency |<> +|Pre-conditions |The event message conforms to "WIS2 Monitoring Event Message Encoding: Core" Requirements Class. +|=== diff --git a/standard/sections/annex_a_ats.adoc b/standard/sections/annex_a_ats.adoc index 0a4ab4e..d19e197 100644 --- a/standard/sections/annex_a_ats.adoc +++ b/standard/sections/annex_a_ats.adoc @@ -9,3 +9,7 @@ include::../abstract_tests/ATS_class_monitoring-event-topic.adoc[] === Conformance Class: WIS2 Monitoring Event Message Encoding: Core include::../abstract_tests/ATS_class_monitoring-event-message-encoding-core.adoc[] + +=== Conformance Class: WIS2 Monitoring Event Message Encoding: System Alert + +include::../abstract_tests/ATS_class_monitoring-event-message-encoding-system-alert.adoc[] diff --git a/standard/sections/annex_c_examples.adoc b/standard/sections/annex_c_examples.adoc index 0924b47..0a87725 100644 --- a/standard/sections/annex_c_examples.adoc +++ b/standard/sections/annex_c_examples.adoc @@ -17,7 +17,7 @@ monitor/a/wis2/ca-eccc-msc-global-discovery-catalogue/fr-meteofrance monitor/a/wis2/fr-meteofrance-global-broker/ar-smn ---- -=== WIS2 Monitoring Event Message Encoding +=== WIS2 Monitoring Event Message Encoding: WCMP2 ETS Report .Example: WCMP2 compliance report event notification from Environment and Climate Change Canada, Meteorological Service of Canada, Global Discovery Catalogue Service, concerning a WCMP2 record from Deutscher Wetterdienst (Germany) [source,json] @@ -25,6 +25,14 @@ monitor/a/wis2/fr-meteofrance-global-broker/ar-smn include::../../examples/wme-gdc-wcmp2-ets.json[] ---- +=== WIS2 Monitoring Event Message Encoding: WCMP2 KPI Report + +.Example: WCMP2 KPI event notification from Environment and Climate Change Canada, Meteorological Service of Canada, Global Discovery Catalogue Service, concerning a WCMP2 record from Deutscher Wetterdienst (Germany) +[source,json] +---- +include::../../examples/wme-gdc-wcmp2-kpi.json[] +---- + .Example: WNM compliance report event notification from a WIS2 development Global Broker, concerning a WIS2 Notification message from a WIS2 Node in testing [source,json] ---- diff --git a/standard/sections/annex_d_bibliography.adoc b/standard/sections/annex_d_bibliography.adoc index 7cee28d..de95c57 100644 --- a/standard/sections/annex_d_bibliography.adoc +++ b/standard/sections/annex_d_bibliography.adoc @@ -6,4 +6,3 @@ * [[SDWBP]] W3C/OGC: Spatial Data on the Web Best Practices, W3C Working Group Note 28 September 2017, https://www.w3.org/TR/sdw-bp * [[DWBP]] W3C: Data on the Web Best Practices, W3C Recommendation 31 January 2017, https://www.w3.org/TR/dwbp * [[link-relations]] IANA: Link Relation Types, https://www.iana.org/assignments/link-relations/link-relations.xml -* TODO cloudevents diff --git a/standard/sections/clause_2_conformance.adoc b/standard/sections/clause_2_conformance.adoc index 0575078..f9ff13c 100644 --- a/standard/sections/clause_2_conformance.adoc +++ b/standard/sections/clause_2_conformance.adoc @@ -16,5 +16,4 @@ The mandatory Requirements Classes for this specification are: * "WIS2 Monitoring Event Topic" * "WIS2 Monitoring Event Message Encoding: Core" -* "WIS2 Monitoring Event Message Encoding: WCMP2 Executable Test Suite Report" -* "WIS2 Monitoring Event Message Encoding: WCMP2 Key Performance Indicator Report" +* "WIS2 Monitoring Event Message Encoding: System Alert" diff --git a/standard/sections/clause_3_references.adoc b/standard/sections/clause_3_references.adoc index e034dbc..9e1a544 100644 --- a/standard/sections/clause_3_references.adoc +++ b/standard/sections/clause_3_references.adoc @@ -5,6 +5,6 @@ * W3C: Data on the Web Best Practices, W3C Recommendation (2017) footnote:[https://www.w3.org/TR/dwbp] * IANA: Link Relation Types (2020) footnote:[https://www.iana.org/assignments/link-relations/link-relations.xml] * [[json-schema]] IETF: JSON Schema (2022) footnote:[https://json-schema.org] -* [[cloud-events]] CloudEvents: CloudEvents specification (2024) footnote:[https://cloudevents.io/specification] +* [[cloud-events]] CloudEvents: CloudEvents specification (2025) footnote:[https://github.com/cloudevents/spec/blob/main/cloudevents/spec.md] * [[wis2-topic-hierarchy]] WMO: WIS2 Topic Hierarchy (2022) footnote:[https://github.com/wmo-im/wis2-topic-hierarchy] * [[wis2-notification-message]] WMO: WIS2 Notification Message (2022) footnote:[https://github.com/wmo-im/wis2-notification-message] diff --git a/standard/sections/clause_8_event_message_encoding_core.adoc b/standard/sections/clause_8_event_message_encoding_core.adoc index 6cabc22..96250eb 100644 --- a/standard/sections/clause_8_event_message_encoding_core.adoc +++ b/standard/sections/clause_8_event_message_encoding_core.adoc @@ -46,10 +46,6 @@ The table below provides an overview of the set of properties that are included |**Required** |The media type of the data content encoding in the event message (`application/json`) (see <<_data_content_type>>) -|``dataschema`` -|**Required** -|The JSON schema which is adhered to by the data content encoding in the event message (see <<_data_schema>>) - |``data`` |**Required** |The event payload as JSON (see <<_data>>) @@ -145,18 +141,6 @@ Example: include::../requirements/monitoring-event-message-encoding-core/REQ_datacontenttype.adoc[] -==== Data schema - -The ``dataschema`` property identifies the JSON Schema that is adhered to by event message payload. This is the value of a given JSON Schema's `$id` property. - -Example: -[source,json] ----- -"dataschema": "https://schemas.wmo.int/wcmp/2.0.0/schemas/wcmp2-bundled.json" ----- - -include::../requirements/monitoring-event-message-encoding-core/REQ_dataschema.adoc[] - ==== Data The ``data`` property provides the event payload in JSON. diff --git a/standard/sections/clause_9_event_message_encoding_system_alert.adoc b/standard/sections/clause_9_event_message_encoding_system_alert.adoc new file mode 100644 index 0000000..f078a5a --- /dev/null +++ b/standard/sections/clause_9_event_message_encoding_system_alert.adoc @@ -0,0 +1,70 @@ +== WIS2 Monitoring Event Message Encoding: System Alert Report + +WNM Validation reports provide the results of validating WIS2 Notification Messages a GB or validation service, in alignment with the requirements of WNM. + +=== Requirements Class "WIS2 Monitoring Event Message Encoding: System Alert Report" + +==== Overview + +This Requirements Class provides the requirements for System Alert reports. + +include::../requirements/requirements_class_monitoring-event-message-encoding-system-alert.adoc[] + +==== Validation + +The System Alert report schema is based on the Requirements Class WIS2 Monitoring Event Message Encoding: Core schema and the associated information model, and applies to the ``data`` property of an event report. + +include::../requirements/monitoring-event-message-encoding-system-alert/REQ_validation.adoc[] + +==== Type + +The type of event related to the event message encoding, using a reverse DNS notation. + +Example: +[source,json] +---- +"type": "int.wmo.wis.wme.event.system.alert" +---- + +include::../requirements/monitoring-event-message-encoding-system-alert/REQ_type.adoc[] + +==== Data schema + +The ``dataschema`` property identifies the JSON Schema that is adhered to by event message payload. This is the value of a given JSON Schema's `$id` property. + +Example: +[source,json] +---- +"dataschema": "https://schemas.wmo.int/wme/1.0.0/schemas/wis2-event-message-encoding-system-alert.json" +---- + +include::../requirements/monitoring-event-message-encoding-system-alert/REQ_dataschema.adoc[] + +==== Data + +The ``data`` property provides the event payload in JSON. + +Example: +[source,json] +---- +"data": { + "id": "ab7cd199-ffa3-4909-80be-c78e99791435", + "report_type": "ets", + "summary": { + "PASSED": 12, + "FAILED": 0, + "SKIPPED": 0 + }, + "generated_by": "pywcmp 0.10.1 (https://github.com/wmo-im/pywcmp)", + "tests": [ + { + "id": "http://wis.wmo.int/spec/wcmp/2/conf/core/conformance", + "code": "PASSED", + "message": "Passes given schema is compliant/valid" + }, + ... + } +} +---- + +include::../requirements/monitoring-event-message-encoding-system-alert/REQ_data.adoc[]