Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

record_package_schema: fix record definition letter case #1241

Merged
merged 10 commits into from
Mar 15, 2021
5 changes: 4 additions & 1 deletion docs/history/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Per the [normative and non-normative content and changes policy](https://docs.go
### Schema

* [#1086](https://github.com/open-contracting/standard/pull/1086) Recommend the use of strings rather than integers for identifiers.
* [#1115](https://github.com/open-contracting/standard/pull/1115) Clarify when to have multiple suppliers per award
* [#1115](https://github.com/open-contracting/standard/pull/1115) Clarify when to have multiple suppliers per award.
* [#1200](https://github.com/open-contracting/standard/pull/1200) Deprecate the `tender.submissionMethod` field, because all codes from the `submissionMethod` codelist are deprecated.
* Add new fields to the release schema:
* [#1125](https://github.com/open-contracting/standard/pull/1125) `weight` to `Item.unit`
Expand All @@ -73,6 +73,9 @@ Per the [normative and non-normative content and changes policy](https://docs.go
* `Organization.id`: "This field need only be unique within the scope of the contracting process, but **should** be built with the following structure {identifier.scheme}-{identifier.id}(-{department-identifier}) where an organization identifier is available" ("may" replaced with "should")
* `Period.durationInDays`: "If a startDate and endDate are set, this field, if used, **must** be equal to the difference between startDate and endDate. Otherwise, if a startDate and maxExtentDate are set, this field, if used, **must** be equal to the difference between startDate and maxExtentDate." ("should" replaced with "must")
* `Contract.items`: "If the items contracted are identical to the items awarded, this field **should** be omitted." (rephrased)
* Record package schema:
* [#1241](https://github.com/open-contracting/standard/pull/1241) In the definition section, rename record to `Record` and add `LinkedRelease`.
* [#1241](https://github.com/open-contracting/standard/pull/1241) Align descriptions of `Record` `releases`, linked releases and embedded releases.
* Improve the clarity of field descriptions in the release package schema and record package schema:
* [#1067](https://github.com/open-contracting/standard/pull/1067) `Publisher.name`, to indicate that it is the organization or department responsible for publishing the OCDS version of the data.

Expand Down
2 changes: 1 addition & 1 deletion docs/schema/records_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ A linked release follows a simple schema:

```eval_rst
.. jsonschema:: ../../build/current_lang/record-package-schema.json
:pointer: /definitions/record/properties/releases/oneOf/0/items
:pointer: /definitions/LinkedRelease
```

For each `url` value, it must be possible for a consuming application to retrieve the release package at the URL and identify the release within it. Since a release package can contain multiple releases, for a linked release to identify a specific release via its `url` field, the `id` of the release must be appended to the release package URL using a fragment identifier.
Expand Down
120 changes: 62 additions & 58 deletions schema/record-package-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/record"
"$ref": "#/definitions/Record"
},
"uniqueItems": true
}
Expand All @@ -120,9 +120,9 @@
"version"
],
"definitions": {
"record": {
"Record": {
"title": "Record",
"description": "An OCDS record must provide a list of all the existing OCDS releases relating to a single contracting process and should provide a compiled release containing the current state of all fields in the release schema. An OCDS record may also provide a versioned history of all changes to the data in the compiled release.",
"description": "An OCDS record must provide a list of all the existing OCDS releases related to a single contracting process and should provide a compiled release containing the current state of all fields in the release schema. An OCDS record may also provide a versioned history of all changes to the data in the compiled release.",
"type": "object",
"properties": {
"ocid": {
Expand All @@ -132,71 +132,20 @@
},
"releases": {
"title": "Releases",
"description": "An array of linking identifiers or releases",
"description": "All the existing OCDS releases related to the contracting process. The releases MUST be sorted into date order in the array, from oldest (at position 0) to newest (last).",
"oneOf": [
{
"title": "Linked releases",
"description": "A list of objects that identify the releases associated with this Open Contracting ID. The releases MUST be sorted into date order in the array, from oldest (at position 0) to newest (last).",
"description": "A list of references to releases.",
"type": "array",
"items": {
"description": "Information to uniquely identify the release.",
"type": "object",
"properties": {
"url": {
"title": "Release URL",
"description": "The URL of the release which contains the URL of the package with the release `id` appended using a fragment identifier e.g. https://standard.open-contracting.org/{{version}}/{{lang}}/examples/tender.json#ocds-213czf-000-00001",
"type": [
"string",
"null"
],
"format": "uri"
},
"date": {
"title": "Release Date",
"description": "The date of the release. It should match the value of the `date` field of the release. This is used to sort the releases in the list in chronological order.",
"type": "string",
"format": "date-time"
},
"tag": {
"title": "Release Tag",
"description": "The tags of the release. It should match the value of the `tag` field of the release. This provides additional context when reviewing a record to see what types of releases are included for this ocid.",
"type": "array",
"items": {
"type": "string",
"enum": [
"planning",
"planningUpdate",
"tender",
"tenderAmendment",
"tenderUpdate",
"tenderCancellation",
"award",
"awardUpdate",
"awardCancellation",
"contract",
"contractUpdate",
"contractAmendment",
"implementation",
"implementationUpdate",
"contractTermination",
"compiled"
]
},
"codelist": "releaseTag.csv",
"openCodelist": false,
"minItems": 1
}
},
"required": [
"url",
"date"
]
"$ref": "#/definitions/LinkedRelease"
},
"minItems": 1
},
{
"title": "Embedded releases",
"description": "A list of releases, with all the data. The releases MUST be sorted into date order in the array, from oldest (at position 0) to newest (last).",
"description": "A list of releases, with all the data.",
"type": "array",
"items": {
"$ref": "https://standard.open-contracting.org/schema/1__1__5/release-schema.json"
Expand All @@ -220,6 +169,61 @@
"ocid",
"releases"
]
},
"LinkedRelease": {
"title": "Linked release",
"description": "A reference to a release.",
"type": "object",
"properties": {
"url": {
"title": "Release URL",
"description": "The URL of the release which contains the URL of the package with the release `id` appended using a fragment identifier e.g. https://standard.open-contracting.org/{{version}}/{{lang}}/examples/tender.json#ocds-213czf-000-00001",
"type": [
"string",
"null"
],
"format": "uri"
},
"date": {
"title": "Release Date",
"description": "The date of the release. It should match the value of the `date` field of the release. This is used to sort the releases in the list in chronological order.",
"type": "string",
"format": "date-time"
},
"tag": {
"title": "Release Tag",
"description": "The tags of the release. It should match the value of the `tag` field of the release. This provides additional context when reviewing a record to see what types of releases are included for this ocid.",
"type": "array",
"items": {
"type": "string",
"enum": [
"planning",
"planningUpdate",
"tender",
"tenderAmendment",
"tenderUpdate",
"tenderCancellation",
"award",
"awardUpdate",
"awardCancellation",
"contract",
"contractUpdate",
"contractAmendment",
"implementation",
"implementationUpdate",
"contractTermination",
"compiled"
]
},
"codelist": "releaseTag.csv",
"openCodelist": false,
"minItems": 1
}
},
"required": [
"url",
"date"
]
}
}
}