Skip to content

Commit 64a75dd

Browse files
authored
Merge pull request #91 from gchq/gh-75-update-delta
PR for #75 - Add concept of a Delta to `UpdateComplexType`
2 parents 4b7013d + f58c459 commit 64a75dd

File tree

2 files changed

+52
-4
lines changed

2 files changed

+52
-4
lines changed

event-logging.xsd

+28-4
Original file line numberDiff line numberDiff line change
@@ -3020,19 +3020,43 @@
30203020
</xs:complexType>
30213021
<xs:complexType name="UpdateComplexType">
30223022
<xs:annotation>
3023-
<xs:documentation>Describes the update/modification/change to a file, object, entity, piece of data, etc.</xs:documentation>
3023+
<xs:documentation>Describes the update/modification/change to a file, object, entity, piece of data, etc. The update can be recorded by providing the Before and After state to describe the change. Alternatively, if the change is a small change to an object with many parts, it may be preferable to record the individual changes rather than the whole state. As a minimum the After state should be recorded to describe the object being changed with/without the detail of its state.</xs:documentation>
30243024
</xs:annotation>
30253025
<xs:sequence minOccurs="1" maxOccurs="1">
30263026
<xs:element name="Before" type="evt:MultiObjectComplexType" minOccurs="0" maxOccurs="1">
30273027
<xs:annotation>
3028-
<xs:documentation>Describes the state of one or more object properties before it was changed.</xs:documentation>
3028+
<xs:documentation>Describes the state of one or more object properties before it was changed. Essentially a snapshot of the object before the change.</xs:documentation>
30293029
</xs:annotation>
30303030
</xs:element>
3031-
<xs:element name="After" type="evt:MultiObjectComplexType" minOccurs="1" maxOccurs="1">
3031+
<xs:element name="After" type="evt:MultiObjectComplexType" maxOccurs="1">
30323032
<xs:annotation>
3033-
<xs:documentation>Describes the state of one or more object properties after it was changed.</xs:documentation>
3033+
<xs:documentation>Describes the state of one or more object properties after it was changed. Essentially a snapshot of the object after the change.</xs:documentation>
30343034
</xs:annotation>
30353035
</xs:element>
3036+
<xs:element minOccurs="0" name="Changes">
3037+
<xs:annotation>
3038+
<xs:documentation>Describe one or more differences that have been applied to an object. When using this element, the object that the changes/differences are applied to should be described in the After element.</xs:documentation>
3039+
</xs:annotation>
3040+
<xs:complexType>
3041+
<xs:sequence>
3042+
<xs:element name="Add" type="evt:MultiObjectComplexType" minOccurs="0">
3043+
<xs:annotation>
3044+
<xs:documentation>Describes the addition of one of more parts of an object or entity. For example if the user is adding two files to a zip file containing 1000 files, this can be recorded as the addition of the two files. The details of the zip file can be recorded in the After element without the need to record the before and after state of all 1000/1002 files.</xs:documentation>
3045+
</xs:annotation>
3046+
</xs:element>
3047+
<xs:element name="Replace" type="evt:MultiObjectComplexType" minOccurs="0">
3048+
<xs:annotation>
3049+
<xs:documentation>Describes the replacement of one of more parts of an object or entity. For example if the user is updating a single file in a zip file containing 1000 files, this can be recorded as the replacement of just that file. The details of the zip file can be record in the After element without the need to recorded the before and after state of all 1000 files.</xs:documentation>
3050+
</xs:annotation>
3051+
</xs:element>
3052+
<xs:element name="Remove" type="evt:MultiObjectComplexType" minOccurs="0">
3053+
<xs:annotation>
3054+
<xs:documentation>Describes the removal of one of more parts of an object or entity. For example if the user is removing two files from a zip file containing 1000 files, this can be recorded as the addition of the two files. The details of the zip file can be recorded in the After element without the need to record the before and after state of all 1000/998 files.</xs:documentation>
3055+
</xs:annotation>
3056+
</xs:element>
3057+
</xs:sequence>
3058+
</xs:complexType>
3059+
</xs:element>
30363060
<xs:element name="Outcome" type="evt:OutcomeComplexType" minOccurs="0" maxOccurs="1">
30373061
<xs:annotation>
30383062
<xs:documentation>Used to determine if the action was successful. If omitted it is assumed that the event was successful and was permitted.</xs:documentation>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
* Issue **#75** : Add `Changes` element to `Update` to allow recording of a change where the before/after state is not known or is too large to record, e.g. adding a user to an long allow-list.
2+
3+
4+
```sh
5+
# ********************************************************************************
6+
# Issue title: Add concept of a Delta to `UpdateComplexType`
7+
# Issue link: https://github.com/gchq/event-logging-schema/issues/75
8+
# ********************************************************************************
9+
10+
# ONLY the top line will be included as a change entry in the CHANGELOG.
11+
# The entry should be in GitHub flavour markdown and should be written on a SINGLE
12+
# line with no hard breaks. You can have multiple change files for a single GitHub issue.
13+
# The entry should be written in the imperative mood, i.e. 'Fix nasty bug' rather than
14+
# 'Fixed nasty bug'.
15+
#
16+
# Examples of acceptable entries are:
17+
#
18+
#
19+
# * Issue **123** : Fix bug with an associated GitHub issue in this repository
20+
#
21+
# * Issue **namespace/other-repo#456** : Fix bug with an associated GitHub issue in another repository
22+
#
23+
# * Fix bug with no associated GitHub issue.
24+
```

0 commit comments

Comments
 (0)