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 --- .../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 ++++++ 4 files changed, 405 insertions(+) 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/ncmp') 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