From 4b6efbbe9fa905a3ee4bc6e7ae5ced2ddd079fb8 Mon Sep 17 00:00:00 2001 From: mpriyank Date: Fri, 28 Feb 2025 15:58:04 +0000 Subject: RTD update related to event schemas - moving the event schemas file to corresponding folder in the docs folder as it is in the cps-ncmp-events - the files are updated as per the new event data schemas Issue-ID: CPS-2645 Change-Id: Ibcc9b504c6db8a3556773eeaadebcf02f1a3bb96 Signed-off-by: mpriyank --- docs/schemas/lcm/lcm-event-header-v1.json | 56 ++++++++++++++ docs/schemas/lcm/lcm-event-schema-v1.json | 118 ++++++++++++++++++++++++++++++ 2 files changed, 174 insertions(+) create mode 100644 docs/schemas/lcm/lcm-event-header-v1.json create mode 100644 docs/schemas/lcm/lcm-event-schema-v1.json (limited to 'docs/schemas/lcm') diff --git a/docs/schemas/lcm/lcm-event-header-v1.json b/docs/schemas/lcm/lcm-event-header-v1.json new file mode 100644 index 0000000000..8c9922ef7e --- /dev/null +++ b/docs/schemas/lcm/lcm-event-header-v1.json @@ -0,0 +1,56 @@ +{ + + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "urn:cps:org.onap.ncmp.cmhandle.lcm-event-header:v1", + "$ref": "#/definitions/LcmEventHeader", + + "definitions": { + "LcmEventHeader": { + "description": "The header for LCM event", + "type": "object", + "javaType" : "org.onap.cps.ncmp.events.lcm.v1.LcmEventHeader", + "properties": { + "eventId": { + "description": "The unique id identifying the event", + "type": "string" + }, + "eventCorrelationId": { + "description": "The id identifying the event", + "type": "string" + }, + "eventTime": { + "description": "The timestamp when original event occurred", + "type": "string" + }, + "eventSource": { + "description": "The source of the event", + "type": "string" + }, + "eventType": { + "description": "The type of the event", + "type": "string" + }, + "eventSchema": { + "description": "The schema that this event adheres to", + "type": "string" + }, + "eventSchemaVersion": { + "description": "The version of the schema that this event adheres to", + "type": "string" + } + }, + "required": [ + "eventId", + "eventCorrelationId", + "eventTime", + "eventSource", + "eventType", + "eventSchema", + "eventSchemaVersion", + "event" + ], + "additionalProperties": false + } + + } +} diff --git a/docs/schemas/lcm/lcm-event-schema-v1.json b/docs/schemas/lcm/lcm-event-schema-v1.json new file mode 100644 index 0000000000..bd0d90d04a --- /dev/null +++ b/docs/schemas/lcm/lcm-event-schema-v1.json @@ -0,0 +1,118 @@ +{ + + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "urn:cps:org.onap.ncmp.cmhandle.lcm-event:v1", + + "$ref": "#/definitions/LcmEvent", + + "definitions": { + + "Values": { + "description": "Values that represents the state of a cmHandle", + "type": "object", + "properties": { + "dataSyncEnabled":{ + "description": "Whether data sync enabled", + "type": "boolean" + }, + "cmHandleState": { + "description": "State of cmHandle", + "type": "string", + "enum": ["ADVISED", "READY", "LOCKED", "DELETING", "DELETED"] + }, + "cmHandleProperties": { + "description": "cmHandle properties", + "type": "object", + "default": null, + "existingJavaType": "java.util.List>", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + + "Event": { + "description": "The Payload of an event", + "type": "object", + "properties": { + "cmHandleId": { + "description": "cmHandle id", + "type": "string" + }, + "alternateId": { + "description": "alternative id for cmHandle (e.g. 3GPP FDN)", + "type": "string" + }, + "moduleSetTag": { + "description": "module set tag for cmHandle", + "type": "string" + }, + "dataProducerIdentifier": { + "description": "data producer identifier for cmHandle", + "type": "string" + }, + "oldValues": { + "$ref": "#/definitions/Values" + }, + "newValues": { + "$ref": "#/definitions/Values" + } + }, + "required": [ + "cmHandleId" + ], + "additionalProperties": false + }, + + "LcmEvent": { + "description": "The payload for LCM event", + "type": "object", + "javaType" : "org.onap.cps.ncmp.events.lcm.v1.LcmEvent", + "properties": { + "eventId": { + "description": "The unique id identifying the event", + "type": "string" + }, + "eventCorrelationId": { + "description": "The id identifying the event", + "type": "string" + }, + "eventTime": { + "description": "The timestamp when original event occurred", + "type": "string" + }, + "eventSource": { + "description": "The source of the event", + "type": "string" + }, + "eventType": { + "description": "The type of the event", + "type": "string" + }, + "eventSchema": { + "description": "The schema that this event adheres to", + "type": "string" + }, + "eventSchemaVersion": { + "description": "The version of the schema that this event adheres to", + "type": "string" + }, + "event": { + "$ref": "#/definitions/Event" + } + }, + "required": [ + "eventId", + "eventCorrelationId", + "eventTime", + "eventSource", + "eventType", + "eventSchema", + "eventSchemaVersion", + "event" + ], + "additionalProperties": false + } + + } +} -- cgit