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 --- .../schemas/data-operation-event-schema-1.0.0.json | 77 -------- .../dmi/cm-events/avc-event-schema-1.0.0.json | 88 +++++++++ .../schemas/dmidataavc/avc-event-schema-1.0.0.json | 88 --------- docs/schemas/lcm-event-schema-v1.json | 106 ----------- docs/schemas/lcm/lcm-event-header-v1.json | 56 ++++++ docs/schemas/lcm/lcm-event-schema-v1.json | 118 ++++++++++++ ...cmp-async-request-response-event-schema-v1.json | 197 -------------------- docs/schemas/ncmp-in-event-schema-1.0.0.json | 73 -------- docs/schemas/ncmp-out-event-schema-1.0.0.json | 63 ------- .../data-operation-event-schema-1.0.0.json | 77 ++++++++ ...cmp-async-request-response-event-schema-v1.json | 198 +++++++++++++++++++++ .../ncmp/avc/ncmp-in-event-schema-1.0.0.json | 73 ++++++++ .../ncmp/avc/ncmp-out-event-schema-1.0.0.json | 57 ++++++ 13 files changed, 667 insertions(+), 604 deletions(-) delete mode 100644 docs/schemas/data-operation-event-schema-1.0.0.json create mode 100644 docs/schemas/dmi/cm-events/avc-event-schema-1.0.0.json delete mode 100644 docs/schemas/dmidataavc/avc-event-schema-1.0.0.json delete mode 100644 docs/schemas/lcm-event-schema-v1.json create mode 100644 docs/schemas/lcm/lcm-event-header-v1.json create mode 100644 docs/schemas/lcm/lcm-event-schema-v1.json delete mode 100644 docs/schemas/ncmp-async-request-response-event-schema-v1.json delete mode 100644 docs/schemas/ncmp-in-event-schema-1.0.0.json delete mode 100644 docs/schemas/ncmp-out-event-schema-1.0.0.json create mode 100644 docs/schemas/ncmp/async-m2m/data-operation-event-schema-1.0.0.json create mode 100644 docs/schemas/ncmp/async-m2m/ncmp-async-request-response-event-schema-v1.json create mode 100644 docs/schemas/ncmp/avc/ncmp-in-event-schema-1.0.0.json create mode 100644 docs/schemas/ncmp/avc/ncmp-out-event-schema-1.0.0.json (limited to 'docs/schemas') diff --git a/docs/schemas/data-operation-event-schema-1.0.0.json b/docs/schemas/data-operation-event-schema-1.0.0.json deleted file mode 100644 index c2915187c7..0000000000 --- a/docs/schemas/data-operation-event-schema-1.0.0.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "urn:cps:org.onap.cps.ncmp.events.async:data-operation-event-schema:1.0.0", - "$ref": "#/definitions/DataOperationEvent", - "definitions": { - "DataOperationEvent": { - "description": "The payload of data operation event.", - "type": "object", - "javaType" : "org.onap.cps.ncmp.events.async1_0_0.DataOperationEvent", - "properties": { - "data": { - "description": "The payload content of the requested data.", - "type": "object", - "properties": { - "responses": { - "description": "An array of batch responses which contains both success and failure", - "type": "array", - "items": { - "type": "object", - "properties": { - "operationId": { - "description": "Used to distinguish multiple operations using same handle ids", - "type": "string" - }, - "ids": { - "description": "Id's of the cmhandles", - "type": "array", - "items": { - "type": "string" - } - }, - "resourceIdentifier": { - "description": "The format of resource identifier depend on the associated DMI Plugin implementation. For ONAP DMI Plugin it will be RESTConf paths but it can really be anything.", - "type": "string" - }, - "options": { - "description": "It is mandatory to add as key(s)=value(s)'. The format of options parameter depend on the associated DMI Plugin implementation.", - "type": "string" - }, - "statusCode": { - "description": "which says success or failure (0-99) are for success and (100-199) are for failure", - "type": "string" - }, - "statusMessage": { - "description": "Human readable message, Which says what the response has", - "type": "string" - }, - "result": { - "description": "Contains the requested data response.", - "type": "object", - "existingJavaType": "java.lang.Object", - "additionalProperties": false - } - }, - "required": [ - "operationId", - "ids", - "statusCode", - "statusMessage" - ], - "additionalProperties": false - } - } - }, - "required": [ - "responses" - ], - "additionalProperties": false - } - }, - "required": [ - "data" - ], - "additionalProperties": false - } - } -} \ No newline at end of file diff --git a/docs/schemas/dmi/cm-events/avc-event-schema-1.0.0.json b/docs/schemas/dmi/cm-events/avc-event-schema-1.0.0.json new file mode 100644 index 0000000000..474520d142 --- /dev/null +++ b/docs/schemas/dmi/cm-events/avc-event-schema-1.0.0.json @@ -0,0 +1,88 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "urn:cps:org.onap.cps.ncmp.events:avc-event-schema:1.0.0", + "$ref": "#/definitions/AvcEvent", + "definitions": { + "Edit": { + "additionalProperties": false, + "properties": { + "edit-id": { + "type": "string" + }, + "operation": { + "type": "string" + }, + "target": { + "type": "string" + }, + "value": { + "type": "object", + "existingJavaType": "java.lang.Object" + } + }, + "required": [ + "edit-id", + "operation", + "target" + ] + }, + "AvcEvent": { + "description": "The payload for AVC event.", + "type": "object", + "javaType": "org.onap.cps.ncmp.events.avc1_0_0.AvcEvent", + "properties": { + "data": { + "description": "The AVC event content compliant with RFC8641 format", + "type": "object", + "additionalProperties": false, + "properties": { + "push-change-update": { + "type": "object", + "additionalProperties": false, + "properties": { + "datastore-changes": { + "type": "object", + "additionalProperties": false, + "properties": { + "ietf-yang-patch:yang-patch": { + "type": "object", + "additionalProperties": false, + "properties": { + "patch-id": { + "type": "string" + }, + "edit": { + "type": "array", + "items": { + "$ref": "#/definitions/Edit" + } + } + }, + "required": [ + "patch-id", + "edit" + ] + } + }, + "required": [ + "ietf-yang-patch:yang-patch" + ] + } + }, + "required": [ + "datastore-changes" + ] + } + }, + "required": [ + "push-change-update" + ] + } + }, + "required": [ + "data" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/docs/schemas/dmidataavc/avc-event-schema-1.0.0.json b/docs/schemas/dmidataavc/avc-event-schema-1.0.0.json deleted file mode 100644 index 474520d142..0000000000 --- a/docs/schemas/dmidataavc/avc-event-schema-1.0.0.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "urn:cps:org.onap.cps.ncmp.events:avc-event-schema:1.0.0", - "$ref": "#/definitions/AvcEvent", - "definitions": { - "Edit": { - "additionalProperties": false, - "properties": { - "edit-id": { - "type": "string" - }, - "operation": { - "type": "string" - }, - "target": { - "type": "string" - }, - "value": { - "type": "object", - "existingJavaType": "java.lang.Object" - } - }, - "required": [ - "edit-id", - "operation", - "target" - ] - }, - "AvcEvent": { - "description": "The payload for AVC event.", - "type": "object", - "javaType": "org.onap.cps.ncmp.events.avc1_0_0.AvcEvent", - "properties": { - "data": { - "description": "The AVC event content compliant with RFC8641 format", - "type": "object", - "additionalProperties": false, - "properties": { - "push-change-update": { - "type": "object", - "additionalProperties": false, - "properties": { - "datastore-changes": { - "type": "object", - "additionalProperties": false, - "properties": { - "ietf-yang-patch:yang-patch": { - "type": "object", - "additionalProperties": false, - "properties": { - "patch-id": { - "type": "string" - }, - "edit": { - "type": "array", - "items": { - "$ref": "#/definitions/Edit" - } - } - }, - "required": [ - "patch-id", - "edit" - ] - } - }, - "required": [ - "ietf-yang-patch:yang-patch" - ] - } - }, - "required": [ - "datastore-changes" - ] - } - }, - "required": [ - "push-change-update" - ] - } - }, - "required": [ - "data" - ], - "additionalProperties": false - } - } -} \ No newline at end of file diff --git a/docs/schemas/lcm-event-schema-v1.json b/docs/schemas/lcm-event-schema-v1.json deleted file mode 100644 index 97c0fbee22..0000000000 --- a/docs/schemas/lcm-event-schema-v1.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - - "$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" - }, - "oldValues": { - "$ref": "#/definitions/Values" - }, - "newValues": { - "$ref": "#/definitions/Values" - } - }, - "required": [ - "cmHandleId" - ], - "additionalProperties": false - }, - - "LcmEvent": { - "description": "The payload for LCM event", - "type": "object", - "javaType" : "org.onap.ncmp.cmhandle.event.lcm.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 - } - - } -} 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 + } + + } +} diff --git a/docs/schemas/ncmp-async-request-response-event-schema-v1.json b/docs/schemas/ncmp-async-request-response-event-schema-v1.json deleted file mode 100644 index 51c2cf4d40..0000000000 --- a/docs/schemas/ncmp-async-request-response-event-schema-v1.json +++ /dev/null @@ -1,197 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "urn:cps:org.onap.cps.ncmp.events:ncmp-async-request-response-event-schema:v1", - "$ref": "#/definitions/NcmpAsyncRequestResponseEvent", - "definitions": { - "NcmpAsyncRequestResponseEvent": { - "description": "The payload for CPS async request response event.", - "type": "object", - "properties": { - "eventId": { - "description": "The unique id identifying the event generated by DMI.", - "type": "string" - }, - "eventCorrelationId": { - "description": "The request id passed by NCMP.", - "type": "string" - }, - "eventTime": { - "description": "The time of the event. The expected format is 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'.", - "type": "string" - }, - "eventTarget": { - "description": "The target of the event.", - "type": "string" - }, - "eventType": { - "description": "The type of the event.", - "type": "string" - }, - "eventSchema": { - "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" - }, - "forwardedEvent": { - "$ref": "#/definitions/Forwarded-Event" - } - }, - "required": [ - "eventId", - "eventCorrelationId", - "eventTime", - "eventTarget", - "eventType", - "eventSchema", - "eventSchemaVersion" - ] - }, - "Forwarded-Event": { - "description": "The event content.", - "type": "object", - "properties": { - "eventId": { - "description": "The unique id identifying the event generated by DMI.", - "type": "string" - }, - "eventCorrelationId": { - "description": "The request id passed by NCMP.", - "type": "string" - }, - "eventTime": { - "description": "The time of the event. The expected format is 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'.", - "type": "string" - }, - "eventTarget": { - "description": "The target of the event.", - "type": "string" - }, - "eventType": { - "description": "The type of the event.", - "type": "string" - }, - "eventSchema": { - "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" - }, - "response-data-schema": { - "description": "The received schema of response data", - "type": "string" - }, - "response-status": { - "description": "The received status of the response.", - "type": "string" - }, - "response-code": { - "description": "The received code of the response.", - "type": "string" - }, - "forwardedEventData": { - "description": "The data payload", - "type": "object", - "properties": { - "forwardedEventPayload": { - "type": "object" - } - } - }, - "required": [ - "eventId", - "eventCorrelationId", - "eventTime", - "eventTarget", - "eventType", - "eventSchema", - "eventSchemaVersion", - "eventSource", - "response-data-schema", - "response-status", - "response-code", - "forwardedEventData" - ] - } - }, - "Event": { - "description": "The event content.", - "type": "object", - "properties": { - "eventId": { - "description": "The unique id identifying the event generated by DMI", - "type": "string" - }, - "eventCorrelationId": { - "description": "The request id passed by NCMP.", - "type": "string" - }, - "eventTime": { - "description": "The time of the event. The expected format is 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'.", - "type": "string" - }, - "eventTarget": { - "description": "The target of the event.", - "type": "string" - }, - "eventType": { - "description": "The type of the event.", - "type": "string" - }, - "eventSchema": { - "description": "The event schema for async request response events.", - "type": "string" - }, - "eventSource": { - "description": "The source of the event.", - "type": "string" - }, - "response-data-schema": { - "description": "The received schema of response data", - "type": "string" - }, - "response-status": { - "description": "The received status of the response.", - "type": "string" - }, - "response-code": { - "description": "The received code of the response.", - "type": "string" - }, - "response-data": { - "description": "The data payload", - "type": "object", - "properties": { - "payload": { - "type": "object" - } - } - }, - "required": [ - "eventId", - "eventCorrelationId", - "eventTarget", - "eventTime", - "eventType", - "eventSchema", - "eventSource", - "response-data-schema", - "response-status", - "response-code", - "event-data" - ] - } - } - } -} \ No newline at end of file diff --git a/docs/schemas/ncmp-in-event-schema-1.0.0.json b/docs/schemas/ncmp-in-event-schema-1.0.0.json deleted file mode 100644 index f8b6c2e680..0000000000 --- a/docs/schemas/ncmp-in-event-schema-1.0.0.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "$id": "urn:cps:org.onap.cps.ncmp.events:cm-notification-subscription-ncmp-in-event:1.0.0", - "$ref": "#/definitions/NcmpInEvent", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "definitions": { - "NcmpInEvent": { - "description": "The payload for subscription merge event.", - "javaType": "org.onap.cps.ncmp.impl.cmnotificationsubscription_1_0_0.client_to_ncmp.NcmpInEvent", - "properties": { - "data": { - "properties": { - "subscriptionId": { - "description": "The subscription details.", - "type": "string" - }, - "predicates": { - "type": "array", - "description": "Additional values to be added into the subscription", - "items": { - "type": "object", - "properties": { - "targetFilter": { - "description": "CM Handles to be targeted by the subscription", - "type": "array", - "items": { - "type": "string" - } - }, - "scopeFilter": { - "type": "object", - "properties": { - "datastore": { - "description": "Datastore which is to be used by the subscription", - "type": "string", - "enum": ["ncmp-datastore:passthrough-operational", "ncmp-datastore:passthrough-running"] - }, - "xpathFilter": { - "description": "Filter to be applied to the CM Handles through this event", - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "xpathFilter" - ] - } - }, - "additionalProperties": false, - "required": [ - "targetFilter" - ] - }, - "additionalProperties": false - } - }, - "required": [ - "subscriptionId" - ], - "type": "object", - "additionalProperties": false - } - }, - "type": "object", - "additionalProperties": false, - "required": [ - "data" - ] - } - } -} \ No newline at end of file diff --git a/docs/schemas/ncmp-out-event-schema-1.0.0.json b/docs/schemas/ncmp-out-event-schema-1.0.0.json deleted file mode 100644 index d6ef55d063..0000000000 --- a/docs/schemas/ncmp-out-event-schema-1.0.0.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "urn:cps:org.onap.cps.ncmp.events:cm-notification-subscription-ncmp-out-event-schema:1.0.0", - "$ref": "#/definitions/NcmpOutEvent", - "definitions": { - "NcmpOutEvent": { - "type": "object", - "description": "The payload applied cm subscription merge event coming out from NCMP.", - "javaType": "org.onap.cps.ncmp.impl.cmnotificationsubscription_1_0_0.ncmp_to_client.NcmpOutEvent", - "additionalProperties": false, - "properties": { - "data": { - "$ref": "#/definitions/Data" - } - }, - "required": [ - "data" - ], - "title": "NcmpOutEvent" - }, - "Data": { - "type": "object", - "description": "Information about the targets and subscription", - "additionalProperties": false, - "properties": { - "subscriptionId": { - "type": "string", - "description": "The unique subscription id" - }, - "acceptedTargets": { - "type": "array", - "description": "List of accepted targets", - "items": { - "type": "string" - } - }, - "rejectedTargets": { - "type": "array", - "description": "List of rejected targets", - "items": { - "type": "string" - } - }, - "pendingTargets": { - "type": "array", - "description": "List of pending targets", - "items": { - "type": "string" - } - } - }, - "required": [ - "subscriptionId", - "acceptedTargets", - "rejectedTargets", - "pendingTargets" - ], - "title": "Data" - } - } - - -} \ No newline at end of file diff --git a/docs/schemas/ncmp/async-m2m/data-operation-event-schema-1.0.0.json b/docs/schemas/ncmp/async-m2m/data-operation-event-schema-1.0.0.json new file mode 100644 index 0000000000..c2915187c7 --- /dev/null +++ b/docs/schemas/ncmp/async-m2m/data-operation-event-schema-1.0.0.json @@ -0,0 +1,77 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "urn:cps:org.onap.cps.ncmp.events.async:data-operation-event-schema:1.0.0", + "$ref": "#/definitions/DataOperationEvent", + "definitions": { + "DataOperationEvent": { + "description": "The payload of data operation event.", + "type": "object", + "javaType" : "org.onap.cps.ncmp.events.async1_0_0.DataOperationEvent", + "properties": { + "data": { + "description": "The payload content of the requested data.", + "type": "object", + "properties": { + "responses": { + "description": "An array of batch responses which contains both success and failure", + "type": "array", + "items": { + "type": "object", + "properties": { + "operationId": { + "description": "Used to distinguish multiple operations using same handle ids", + "type": "string" + }, + "ids": { + "description": "Id's of the cmhandles", + "type": "array", + "items": { + "type": "string" + } + }, + "resourceIdentifier": { + "description": "The format of resource identifier depend on the associated DMI Plugin implementation. For ONAP DMI Plugin it will be RESTConf paths but it can really be anything.", + "type": "string" + }, + "options": { + "description": "It is mandatory to add as key(s)=value(s)'. The format of options parameter depend on the associated DMI Plugin implementation.", + "type": "string" + }, + "statusCode": { + "description": "which says success or failure (0-99) are for success and (100-199) are for failure", + "type": "string" + }, + "statusMessage": { + "description": "Human readable message, Which says what the response has", + "type": "string" + }, + "result": { + "description": "Contains the requested data response.", + "type": "object", + "existingJavaType": "java.lang.Object", + "additionalProperties": false + } + }, + "required": [ + "operationId", + "ids", + "statusCode", + "statusMessage" + ], + "additionalProperties": false + } + } + }, + "required": [ + "responses" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/docs/schemas/ncmp/async-m2m/ncmp-async-request-response-event-schema-v1.json b/docs/schemas/ncmp/async-m2m/ncmp-async-request-response-event-schema-v1.json new file mode 100644 index 0000000000..32b7becd05 --- /dev/null +++ b/docs/schemas/ncmp/async-m2m/ncmp-async-request-response-event-schema-v1.json @@ -0,0 +1,198 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "urn:cps:org.onap.cps.ncmp.events:ncmp-async-request-response-event-schema:v1", + "$ref": "#/definitions/NcmpAsyncRequestResponseEvent", + "definitions": { + "NcmpAsyncRequestResponseEvent": { + "description": "The payload for CPS async request response event.", + "type": "object", + "javaType" : "org.onap.cps.ncmp.event.model.NcmpAsyncRequestResponseEvent", + "properties": { + "eventId": { + "description": "The unique id identifying the event generated by DMI.", + "type": "string" + }, + "eventCorrelationId": { + "description": "The request id passed by NCMP.", + "type": "string" + }, + "eventTime": { + "description": "The time of the event. The expected format is 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'.", + "type": "string" + }, + "eventTarget": { + "description": "The target of the event.", + "type": "string" + }, + "eventType": { + "description": "The type of the event.", + "type": "string" + }, + "eventSchema": { + "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" + }, + "forwardedEvent": { + "$ref": "#/definitions/Forwarded-Event" + } + }, + "required": [ + "eventId", + "eventCorrelationId", + "eventTime", + "eventTarget", + "eventType", + "eventSchema", + "eventSchemaVersion" + ] + }, + "Forwarded-Event": { + "description": "The event content.", + "type": "object", + "properties": { + "eventId": { + "description": "The unique id identifying the event generated by DMI.", + "type": "string" + }, + "eventCorrelationId": { + "description": "The request id passed by NCMP.", + "type": "string" + }, + "eventTime": { + "description": "The time of the event. The expected format is 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'.", + "type": "string" + }, + "eventTarget": { + "description": "The target of the event.", + "type": "string" + }, + "eventType": { + "description": "The type of the event.", + "type": "string" + }, + "eventSchema": { + "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" + }, + "response-data-schema": { + "description": "The received schema of response data", + "type": "string" + }, + "response-status": { + "description": "The received status of the response.", + "type": "string" + }, + "response-code": { + "description": "The received code of the response.", + "type": "string" + }, + "forwardedEventData": { + "description": "The data payload", + "type": "object", + "properties": { + "forwardedEventPayload": { + "type": "object" + } + } + }, + "required": [ + "eventId", + "eventCorrelationId", + "eventTime", + "eventTarget", + "eventType", + "eventSchema", + "eventSchemaVersion", + "eventSource", + "response-data-schema", + "response-status", + "response-code", + "forwardedEventData" + ] + } + }, + "Event": { + "description": "The event content.", + "type": "object", + "properties": { + "eventId": { + "description": "The unique id identifying the event generated by DMI", + "type": "string" + }, + "eventCorrelationId": { + "description": "The request id passed by NCMP.", + "type": "string" + }, + "eventTime": { + "description": "The time of the event. The expected format is 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'.", + "type": "string" + }, + "eventTarget": { + "description": "The target of the event.", + "type": "string" + }, + "eventType": { + "description": "The type of the event.", + "type": "string" + }, + "eventSchema": { + "description": "The event schema for async request response events.", + "type": "string" + }, + "eventSource": { + "description": "The source of the event.", + "type": "string" + }, + "response-data-schema": { + "description": "The received schema of response data", + "type": "string" + }, + "response-status": { + "description": "The received status of the response.", + "type": "string" + }, + "response-code": { + "description": "The received code of the response.", + "type": "string" + }, + "response-data": { + "description": "The data payload", + "type": "object", + "properties": { + "payload": { + "type": "object" + } + } + }, + "required": [ + "eventId", + "eventCorrelationId", + "eventTarget", + "eventTime", + "eventType", + "eventSchema", + "eventSource", + "response-data-schema", + "response-status", + "response-code", + "event-data" + ] + } + } + } +} \ No newline at end of file diff --git a/docs/schemas/ncmp/avc/ncmp-in-event-schema-1.0.0.json b/docs/schemas/ncmp/avc/ncmp-in-event-schema-1.0.0.json new file mode 100644 index 0000000000..d4e8519956 --- /dev/null +++ b/docs/schemas/ncmp/avc/ncmp-in-event-schema-1.0.0.json @@ -0,0 +1,73 @@ +{ + "$id": "urn:cps:org.onap.ncmp.events.subscription:1.0.0", + "$ref": "#/definitions/NcmpInEvent", + "$schema": "https://json-schema.org/draft/2019-09/schema", + "definitions": { + "NcmpInEvent": { + "description": "The payload for subscription merge event.", + "javaType": "org.onap.cps.ncmp.impl.cmnotificationsubscription_1_0_0.client_to_ncmp.NcmpInEvent", + "properties": { + "data": { + "properties": { + "subscriptionId": { + "description": "The subscription details.", + "type": "string" + }, + "predicates": { + "type": "array", + "description": "Additional values to be added into the subscription", + "items": { + "type": "object", + "properties": { + "targetFilter": { + "description": "CM Handles to be targeted by the subscription", + "type": "array", + "items": { + "type": "string" + } + }, + "scopeFilter": { + "type": "object", + "properties": { + "datastore": { + "description": "Datastore which is to be used by the subscription", + "type": "string", + "enum": ["ncmp-datastore:passthrough-operational", "ncmp-datastore:passthrough-running"] + }, + "xpathFilter": { + "description": "Filter to be applied to the CM Handles through this event", + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "xpathFilter" + ] + } + }, + "additionalProperties": false, + "required": [ + "targetFilter" + ] + }, + "additionalProperties": false + } + }, + "required": [ + "subscriptionId" + ], + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false, + "required": [ + "data" + ] + } + } +} \ No newline at end of file diff --git a/docs/schemas/ncmp/avc/ncmp-out-event-schema-1.0.0.json b/docs/schemas/ncmp/avc/ncmp-out-event-schema-1.0.0.json new file mode 100644 index 0000000000..f1dabc17a3 --- /dev/null +++ b/docs/schemas/ncmp/avc/ncmp-out-event-schema-1.0.0.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "$id": "urn:cps:org.onap.ncmp.events.subscription:1.0.0", + "$ref": "#/definitions/NcmpOutEvent", + "definitions": { + "NcmpOutEvent": { + "type": "object", + "description": "The payload applied cm subscription merge event coming out from NCMP.", + "javaType": "org.onap.cps.ncmp.impl.cmnotificationsubscription_1_0_0.ncmp_to_client.NcmpOutEvent", + "additionalProperties": false, + "properties": { + "data": { + "$ref": "#/definitions/Data" + } + }, + "required": [ + "data" + ], + "title": "NcmpOutEvent" + }, + "Data": { + "type": "object", + "description": "Information about the targets and subscription", + "additionalProperties": false, + "properties": { + "subscriptionId": { + "type": "string", + "description": "The unique subscription id" + }, + "acceptedTargets": { + "type": "object", + "existingJavaType": "java.util.Collection", + "description": "Collection of accepted targets" + }, + "rejectedTargets": { + "type": "object", + "existingJavaType": "java.util.Collection", + "description": "Collection of rejected targets" + }, + "pendingTargets": { + "type": "object", + "existingJavaType": "java.util.Collection", + "description": "Collection of pending targets" + } + }, + "required": [ + "subscriptionId", + "acceptedTargets", + "rejectedTargets", + "pendingTargets" + ], + "title": "Data" + } + } + + +} \ No newline at end of file -- cgit