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

project-schema.json: add benefits array #438

Merged
merged 11 commits into from
Nov 28, 2023
26 changes: 26 additions & 0 deletions docs/_static/i18n.csv
Original file line number Diff line number Diff line change
Expand Up @@ -407,3 +407,29 @@ completion/finalScopeDetails,Final scope details,True,
language,Language,True,
environment,Environment,False,
environment/goals,Environmental goals,False,
benefits,Benefits,False,
benefits,Benefit,False,
benefits/title,Title,True,
benefits/description,Description,True,
benefits/beneficiaries,Beneficiaries,False,
benefits/beneficiaries,Beneficiary,False,
benefits/beneficiaries/location,Location,False,
benefits/beneficiaries/location,Delivery Location,False,
benefits/beneficiaries/location/id,Identifier,True,
benefits/beneficiaries/location/description,Description,True,
benefits/beneficiaries/location/geometry,Geometry,False,
benefits/beneficiaries/location/geometry/type,Type,False,
benefits/beneficiaries/location/geometry/coordinates,Coordinates,False,
benefits/beneficiaries/location/gazetteer,Gazetteer,False,
benefits/beneficiaries/location/gazetteer/scheme,Gazetteer scheme,False,
benefits/beneficiaries/location/gazetteer/identifiers,Identifiers,False,
benefits/beneficiaries/location/uri,URI,True,
benefits/beneficiaries/location/address,Address,False,
benefits/beneficiaries/location/address,Address,False,
benefits/beneficiaries/location/address/streetAddress,Street address,True,
benefits/beneficiaries/location/address/locality,Locality,True,
benefits/beneficiaries/location/address/region,Region,True,
benefits/beneficiaries/location/address/postalCode,Postal code,True,
benefits/beneficiaries/location/address/countryName,Country name,True,
benefits/beneficiaries/description,Description,True,
benefits/beneficiaries/numberOfPeople,Number of people,False,
95 changes: 90 additions & 5 deletions docs/cost/ids/sustainability.md
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ Eg:
:columns: 8
OC4IDS mapping
^^^
Project level: Add the relevant code from the environmentalGoal codelist to the `environment.goals` array
Project level: Add the relevant codes from the environmentalGoal codelist to the `environment.goals` array
```json
{
"environment": {
Expand Down Expand Up @@ -1031,9 +1031,51 @@ Indirect\]
:columns: 8
OC4IDS mapping
^^^
Project level: Add a new `benefit` object to the `benefits` array and set `.title` to "Climate finance beneficiaries".

```json
For direct beneficiaries:

- Add a `Beneficiary` object to the `.beneficiaries` array.
- Set the `.description` to "direct beneficiaries".
- Set the number of people to `.numberOfPeople`.
- Add the location of the beneficiary population to `.location`

For indirect beneficiaries:

- Add a `Beneficiary` object to the `.beneficiaries` array.
- Set the `.description` to "indirect beneficiaries".
- Set the number of people to `.numberOfPeople`.
- Add the location of the beneficiary population to `.location`
```json
{
"benefits": [
{
"title": "Cliamte finance beneficiaries",
"beneficiaries": [
{
"description": "Direct beneficiaries",
"numberOfPeople": 1000,
"location": {
"id": "1",
"address": {
"countryName": "HT"
}
}
},
{
"description": "Indirect beneficiaries",
"numberOfPeople": 2000,
"location": {
"id": "1",
"address": {
"countryName": "HT"
}
}
}
]
}
]
}
```
````

Expand Down Expand Up @@ -1408,12 +1450,13 @@ gender empowerment
:columns: 8
OC4IDS mapping
^^^
Project level: For each impact identified add a `benefit` object to the `benefits` array and assign it a locally unique `id`. Set the `title` as the list code and add details explaining the benefit to `.description`.
Project level: For each impact identified add a `benefit` object to the `benefits` array.

- Set the `title` as the list code and add details explaining the benefit to `.description`.
```json
{
"benefits": [
{
"id": "1",
"title": "environmental",
"description": "The new water management plant will mean less water is removed from the delta meaning more is left in place for use by the local biome."
}
Expand Down Expand Up @@ -2023,9 +2066,51 @@ Indicate the number of direct and indirect project beneficiaries (E.g. direct: \
:columns: 8
OC4IDS mapping
^^^
Project level: Add a `benefit` object to the `benefits` array.

```json
For direct beneficiaries:

- Add a `Beneficiary` object to the `.beneficiaries` array.
- Set the `.description` to "direct beneficiaries".
- Set the number of people to `.numberOfPeople`.
- Add the location of the beneficiary population to `.location`

For indirect beneficiaries:

- Add a `Beneficiary` object to the `.beneficiaries` array.
- Set the `.description` to "indirect beneficiaries".
- Set the number of people to `.numberOfPeople`.
- Add the location of the beneficiary population to `.location`
```json
{
"benefits": [
{
"beneficiaries": [
{
"description": "Direct beneficiaries",
"numberOfPeople": 1000,
"location": {
"id": "1",
"address": {
"region": "Hampshire",
"countryName": "GB"
}
}
},
{
"description": "Indirect beneficiaries",
"numberOfPeople": 2000,
"location": {
"id": "1",
"address": {
"countryName": "GB"
}
}
}
]
}
]
}
```
````

Expand Down
15 changes: 14 additions & 1 deletion docs/examples/blank.json
Original file line number Diff line number Diff line change
Expand Up @@ -444,5 +444,18 @@
"goals": [
"string"
]
}
},
"benefits": [
{
"title": "string",
"description": "string",
"beneficiaries": [
{
"description": "string",
"location": {},
"numberOfPeople": "integer"
}
]
}
]
}
20 changes: 19 additions & 1 deletion docs/examples/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,25 @@
"goals": [
"climateChangeMitigation"
]
}
},
"benefits": [
{
"title": "Environmental",
"description": "The new water management plant will mean less water is removed from the delta meaning more is left in place for use by the local biome.",
"beneficiaries": [
{
"description": "Local population of water plant.",
"numberOfPeople": 1000,
"location": {
"id": "1",
"address": {
"countryName": "United Kingdom"
}
}
}
]
}
]
}
]
}
1 change: 1 addition & 0 deletions docs/reference/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* `ContractingProcesses.milestones`
* [#431](https://github.com/open-contracting/infrastructure/pull/431) - add `environment.goals`.
* [#427](https://github.com/open-contracting/infrastructure/pull/427) - add `Organization.beneficialOwners`
* [#438](https://github.com/open-contracting/infrastructure/pull/438) - add `benefits`.

### Codelists

Expand Down
81 changes: 81 additions & 0 deletions docs/reference/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ Each `Classification` has the following fields:

This sub-schema is referenced by the following properties:
* [`locations`](project-schema.json,,locations)
* [`Beneficiary/location`](project-schema.json,/definitions/Beneficiary,location)

Each `Location` has the following fields:

Expand All @@ -345,6 +346,11 @@ Each `Location` has the following fields:
:title: locations
```

```{jsoninclude} ../../docs/examples/example.json
:jsonpointer: /projects/0/benefits/0/beneficiaries/0/location
:title: benefits/0/beneficiaries/0/location
```

````

`````
Expand Down Expand Up @@ -602,6 +608,11 @@ Each `Address` has the following fields:
:title: parties/0/address
```

```{jsoninclude} ../../docs/examples/example.json
:jsonpointer: /projects/0/benefits/0/beneficiaries/0/location/address
:title: benefits/0/beneficiaries/0/location/address
```

````

`````
Expand Down Expand Up @@ -1079,3 +1090,73 @@ Each `MilestoneReference` has the following fields:
````

`````

### Benefit

`Benefit` is defined as:

```{field-description} ../../build/current_lang/project-schema.json /definitions/Benefit
```

This sub-schema is referenced by the following properties:
* [`benefits`](project-schema.json,,benefits)

Each `Benefit` has the following fields:

`````{tab-set}

````{tab-item} Schema

```{jsonschema} ../../build/current_lang/project-schema.json
:pointer: /definitions/Benefit
:collapse: title,description,beneficiaries
:addtargets:
```

````

````{tab-item} Examples

```{jsoninclude} ../../docs/examples/example.json
:jsonpointer: /projects/0/benefits
:title: benefits
```

````

`````

### Beneficiary

`Beneficiary` is defined as:

```{field-description} ../../build/current_lang/project-schema.json /definitions/Beneficiary
```

This sub-schema is referenced by the following properties:
* [`Benefit/beneficiaries`](project-schema.json,/definitions/Benefit,beneficiaries)

Each `Beneficiary` has the following fields:

`````{tab-set}

````{tab-item} Schema

```{jsonschema} ../../build/current_lang/project-schema.json
:pointer: /definitions/Beneficiary
:collapse: location,description,numberOfPeople
:addtargets:
```

````

````{tab-item} Examples

```{jsoninclude} ../../docs/examples/example.json
:jsonpointer: /projects/0/benefits/0/beneficiaries
:title: benefits/0/beneficiaries
```

````

`````
Loading