You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/schema/merging.md
+10-5Lines changed: 10 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@
2
2
3
3
An OCDS [record](../schema/records_reference) aggregates all the releases available for a contracting (or planning) process at a given time, and can include:
4
4
5
-
* a compiled release, which expresses the current state of the contracting (or planning) process, by showing only the most recent field values
6
-
* a versioned release, which expresses all historical states of the contracting (or planning) process, by showing all the field values over time
5
+
* a compiled release, which expresses the current state of the contracting (or planning) process, by showing only the most recent field values.
6
+
* a versioned release, which expresses all historical states of the contracting (or planning) process, by showing all the field values over time.
7
7
8
8
**Merging** is the process of combining individual releases with the same OCDS version into a compiled or versioned release, described in more detail below. At a high level:
9
9
@@ -18,7 +18,7 @@ Guidance: [Updates and deletions](../guidance/build/merging)
18
18
19
19
### Discarded fields
20
20
21
-
In the release schema, `"omitWhenMerged": true` is declared on fields that must be discarded during merging. These are presently: `id`, `date` and `tag`.
21
+
In the release schema, `"omitWhenMerged": true` is declared on fields that must be discarded during merging. These are presently: `id`, `date``publisher`and `tag`.
22
22
23
23
* For a compiled release:
24
24
* Both the fields and their values are discarded, because they are metadata about the individual releases; the compiled release replaces these with its own metadata.
@@ -28,9 +28,12 @@ In the release schema, `"omitWhenMerged": true` is declared on fields that must
28
28
If `omitWhenMerged` is set to `false`, ignore it.
29
29
30
30
```{note}
31
-
The compiled release presently uses the same schema as the release schema, which means that the `id`, `date` and `tag` fields are required in a compiled release. We invite discussion on whether to change these requirements in a separate compiled release schema in issue [#330](https://github.com/open-contracting/standard/issues/330).
31
+
The compiled release uses the same schema as the release schema, which means that the `id`, `date` and `tag` fields are required in a compiled release.
32
32
33
-
In the meantime, an intermediate solution is to set `tag` to `["compiled"]`, `date` to the maximum `date` among the individual releases used to create the compiled release, and `id` to `{ocid}-{date}`, like in the [reference implementation](#reference-implementation) of the merge routine.
33
+
These fields must be set with values that reflect the compiled release, like in the [reference implementation](#reference-implementation) of the merge routine:
34
+
* `id` should be set to `{ocid}-{date}`
35
+
* `date` should be set to the maximum `date` among the individual releases used to create the compiled release.
36
+
* `tag` should accumulate all `tag` values from the individual releases together with the tag "compiled".
34
37
```
35
38
36
39
### Versioned values
@@ -87,6 +90,8 @@ To create a compiled or versioned release, you must:
87
90
1. For a compiled release:
88
91
1. Set `date` to the maximum `date` among the releases.
89
92
1. Set `id` to `{ocid}-{date}`.
93
+
1. Set `tag` to include all tag values from the individual releases together with "compiled".
94
+
1. If using set `publisher` to the publisher of the compiled release.
90
95
1. Merge each release (**input**), in order, into the JSON object (**output**), as follows:
Copy file name to clipboardExpand all lines: schema/dereferenced-release-schema.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@
27
27
},
28
28
"publisher": {
29
29
"title": "Publisher",
30
-
"description": "The original publisher of this release.",
30
+
"description": "The original publisher of the release. For a compiled release this may differ from the publisher(s) of the individual releases about the contracting process.",
31
31
"type": "object",
32
32
"properties": {
33
33
"scheme": {
@@ -69,7 +69,7 @@
69
69
},
70
70
"tag": {
71
71
"title": "Release Tag",
72
-
"description": "A tag labeling the release, using the the open [releaseTag](https://standard.open-contracting.org/{{version}}/{{lang}}/schema/codelists/#release-tag) codelist. Tags distinguish, for example, planning and contracting processes and the stages of contracting processes. Codes outside the releaseTag codelist might indicate, for example, the notice or form to which the release corresponds, or the event that triggered the publication of the release. Planning processes must not use the 'tender' code, even if they use `tender` fields.",
72
+
"description": "A tag labeling the release, using the the open [releaseTag](https://standard.open-contracting.org/{{version}}/{{lang}}/schema/codelists/#release-tag) codelist. Tags distinguish, for example, planning and contracting processes and the stages of contracting processes. Codes outside the releaseTag codelist might indicate, for example, the notice or form to which the release corresponds, or the event that triggered the publication of the release. Planning processes must not use the 'tender' code, even if they use `tender` fields. For a compiled release all the tags used in the individual releases for the contracting process should be included together with the 'compiled' tag.",
Copy file name to clipboardExpand all lines: schema/release-schema.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -27,13 +27,13 @@
27
27
},
28
28
"publisher": {
29
29
"title": "Publisher",
30
-
"description": "The original publisher of this release.",
30
+
"description": "The original publisher of the release. For a compiled release this may differ from the publisher(s) of the individual releases about the contracting process.",
31
31
"omitWhenMerged": true,
32
32
"$ref": "#/definitions/Identifier"
33
33
},
34
34
"tag": {
35
35
"title": "Release Tag",
36
-
"description": "A tag labeling the release, using the the open [releaseTag](https://standard.open-contracting.org/{{version}}/{{lang}}/schema/codelists/#release-tag) codelist. Tags distinguish, for example, planning and contracting processes and the stages of contracting processes. Codes outside the releaseTag codelist might indicate, for example, the notice or form to which the release corresponds, or the event that triggered the publication of the release. Planning processes must not use the 'tender' code, even if they use `tender` fields.",
36
+
"description": "A tag labeling the release, using the the open [releaseTag](https://standard.open-contracting.org/{{version}}/{{lang}}/schema/codelists/#release-tag) codelist. Tags distinguish, for example, planning and contracting processes and the stages of contracting processes. Codes outside the releaseTag codelist might indicate, for example, the notice or form to which the release corresponds, or the event that triggered the publication of the release. Planning processes must not use the 'tender' code, even if they use `tender` fields. For a compiled release all the tags used in the individual releases for the contracting process should be included together with the 'compiled' tag.",
0 commit comments