Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titleAdded operation property in content
{
  	"definitions": {
		...
    	"Content": {
			"properties": {
				"operation": {
          			"description": "The operation supported by the ",
          			"type": "string",
          			"enum": ["CREATE", "UPDATE", "DELETE"]
        			}
				...
			}
		}
	}
}
Optional Data field

...

The existing 'data' section in the content should not be provided in the delete event . So, we need to make the 'data' field and it should be marked as optional. As we are deleting a mandatory field, the change is still backwards compatible. 

...

Code Block
languagejs
titleDelete event
{
  "schema": "urn:cps:org.onap.cps:data-updated-event-schema:v1v2",
  "id": "77b8f114-4562-4069-8234-6d059ff742ac",
  "source": "urn:cps:org.onap.cps",
  "type": "org.onap.cps.data-updated-event",
  "content": {
    "observedTimestamp": "2020-12-01T00:00:00.000+0000",
    "dataspaceName": "my-dataspace",
    "schemaSetName": "bookstore-schemaset",
    "anchorName": "chapters",
    "operation": "DELETE"
  }
}

...

  • when an anchor is deleted or
  • delete Data Node is called with root xpathXPath.

We are adding a new operation field in the event and the values for all the existing scenarios must be provided as per the Operation section of the proposal.

...