Skip to content

Commit 3f1a713

Browse files
committed
release-schema: update tag and publisher description for compiled releases
1 parent 0871878 commit 3f1a713

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

docs/schema/merging.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
An OCDS [record](../schema/records_reference) aggregates all the releases available for a contracting (or planning) process at a given time, and can include:
44

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.
77

88
**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:
99

@@ -18,7 +18,7 @@ Guidance: [Updates and deletions](../guidance/build/merging)
1818

1919
### Discarded fields
2020

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`.
2222

2323
* For a compiled release:
2424
* 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
2828
If `omitWhenMerged` is set to `false`, ignore it.
2929

3030
```{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.
3232
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".
3437
```
3538

3639
### Versioned values
@@ -87,6 +90,8 @@ To create a compiled or versioned release, you must:
8790
1. For a compiled release:
8891
1. Set `date` to the maximum `date` among the releases.
8992
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.
9095
1. Merge each release (**input**), in order, into the JSON object (**output**), as follows:
9196

9297
#### Object values

schema/dereferenced-release-schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"publisher": {
2929
"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.",
3131
"type": "object",
3232
"properties": {
3333
"scheme": {
@@ -69,7 +69,7 @@
6969
},
7070
"tag": {
7171
"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.",
7373
"type": "array",
7474
"items": {
7575
"type": "string"

schema/release-schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
},
2828
"publisher": {
2929
"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.",
3131
"omitWhenMerged": true,
3232
"$ref": "#/definitions/Identifier"
3333
},
3434
"tag": {
3535
"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.",
3737
"type": "array",
3838
"items": {
3939
"type": "string"

0 commit comments

Comments
 (0)