diff options
author | Bruno Sakoto <bruno.sakoto@bell.ca> | 2021-12-08 12:09:40 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-12-08 12:09:40 +0000 |
commit | 043a0ed45530842a8606a675cb71078ab055d2d5 (patch) | |
tree | ebdde1c446a92c95b26b8d24716771391c31ccbc /cps-events/src/test/resources | |
parent | eeef2ae7d17fcff7fbd33614972ad42f495e7998 (diff) | |
parent | a51102bd77465a85e41069d9c0f067adbe51f379 (diff) |
Merge "Upgrade event schema to support delete operation"
Diffstat (limited to 'cps-events/src/test/resources')
-rw-r--r-- | cps-events/src/test/resources/event-v1.json (renamed from cps-events/src/test/resources/bookstore-chapters.json) | 0 | ||||
-rw-r--r-- | cps-events/src/test/resources/event-v2-create-operation.json | 36 | ||||
-rw-r--r-- | cps-events/src/test/resources/event-v2-delete-operation.json | 13 | ||||
-rw-r--r-- | cps-events/src/test/resources/event-v2-with-additional-properties.json | 36 |
4 files changed, 85 insertions, 0 deletions
diff --git a/cps-events/src/test/resources/bookstore-chapters.json b/cps-events/src/test/resources/event-v1.json index 753426a60a..753426a60a 100644 --- a/cps-events/src/test/resources/bookstore-chapters.json +++ b/cps-events/src/test/resources/event-v1.json diff --git a/cps-events/src/test/resources/event-v2-create-operation.json b/cps-events/src/test/resources/event-v2-create-operation.json new file mode 100644 index 0000000000..92ecab34f9 --- /dev/null +++ b/cps-events/src/test/resources/event-v2-create-operation.json @@ -0,0 +1,36 @@ +{ + "schema": "urn:cps:org.onap.cps:data-updated-event-schema:v2", + "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" : "CREATE", + "data": { + "test:bookstore":{ + "bookstore-name": "Chapters", + "categories": [ + { + "code": "01", + "name": "SciFi", + "books": [ + { + "authors": [ + "Iain M. Banks" + ], + "lang": "en", + "price": 895, + "pub_year": "1994", + "title": "Feersum Endjinn" + } + ] + } + ] + } + } + } +} + diff --git a/cps-events/src/test/resources/event-v2-delete-operation.json b/cps-events/src/test/resources/event-v2-delete-operation.json new file mode 100644 index 0000000000..e003088bff --- /dev/null +++ b/cps-events/src/test/resources/event-v2-delete-operation.json @@ -0,0 +1,13 @@ +{ + "schema": "urn:cps:org.onap.cps:data-updated-event-schema:v2", + "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" + } +}
\ No newline at end of file diff --git a/cps-events/src/test/resources/event-v2-with-additional-properties.json b/cps-events/src/test/resources/event-v2-with-additional-properties.json new file mode 100644 index 0000000000..4e2db6898e --- /dev/null +++ b/cps-events/src/test/resources/event-v2-with-additional-properties.json @@ -0,0 +1,36 @@ +{ + "schema": "urn:cps:org.onap.cps:data-updated-event-schema:v2", + "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" : "CREATE", + "additionalField" : "value", + "data": { + "test:bookstore":{ + "bookstore-name": "Chapters", + "categories": [ + { + "code": "01", + "name": "SciFi", + "books": [ + { + "authors": [ + "Iain M. Banks" + ], + "lang": "en", + "price": 895, + "pub_year": "1994", + "title": "Feersum Endjinn" + } + ] + } + ] + } + } + } +} |