-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #945 from w3c-ccg/environmentFootprint
environment footprint
- Loading branch information
Showing
2 changed files
with
157 additions
and
0 deletions.
There are no files selected for viewing
145 changes: 145 additions & 0 deletions
145
docs/openapi/components/schemas/credentials/environmentalImpactCredential.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
$linkedData: | ||
term: environmentalImpactCredential | ||
'@id': https://w3id.org/traceability#environmentalImpactCredential | ||
title: environmentalImpactCredential | ||
tags: | ||
- Oil and Gas | ||
description: A credential that represents the environmental impact of a product or event. | ||
type: object | ||
properties: | ||
'@context': | ||
type: array | ||
readOnly: true | ||
const: | ||
- https://www.w3.org/2018/credentials/v1 | ||
- https://w3id.org/traceability/v1 | ||
default: | ||
- https://www.w3.org/2018/credentials/v1 | ||
- https://w3id.org/traceability/v1 | ||
items: | ||
type: string | ||
enum: | ||
- https://www.w3.org/2018/credentials/v1 | ||
- https://w3id.org/traceability/v1 | ||
type: | ||
type: array | ||
readOnly: true | ||
const: | ||
- VerifiableCredential | ||
- environmentalImpactCredential | ||
default: | ||
- VerifiableCredential | ||
- environmentalImpactCredential | ||
items: | ||
type: string | ||
enum: | ||
- VerifiableCredential | ||
- environmentalImpactCredential | ||
id: | ||
type: string | ||
format: uri | ||
issuanceDate: | ||
type: string | ||
format: date-time | ||
expirationDate: | ||
type: string | ||
format: date-time | ||
issuer: | ||
$ref: ../common/Organization.yml | ||
credentialSchema: | ||
type: object | ||
properties: | ||
id: | ||
title: Id | ||
description: The url of the schema file to validate the shape of the json object | ||
type: string | ||
format: uri | ||
example: https://w3id.org/traceability/openapi/components/schemas/credentials/environmentalImpactCredential.yml | ||
default: https://w3id.org/traceability/openapi/components/schemas/credentials/environmentalImpactCredential.yml | ||
readOnly: true | ||
type: | ||
title: Type | ||
description: The type of validation to be run against the defined schema | ||
const: OpenApiSpecificationValidator2022 | ||
credentialSubject: | ||
title: Environment Footprint | ||
description: Environmental impact of a product or event. | ||
type: object | ||
properties: | ||
impactTimeStart: | ||
type: string | ||
format: date-time | ||
title: Impact Start time | ||
description: the time when the activity impacting the environment started | ||
impactTimeEnd: | ||
type: string | ||
format: date-time | ||
title: Impact End Time | ||
description: the time when the activity impacting the environment ended | ||
pollutants: | ||
title: Pollutants | ||
description: a list of pollutants that we are tracking the environmental impact of, this is a small non-exhaustive list that we intend to expand. | ||
type: object | ||
properties: | ||
type: | ||
type: array | ||
readOnly: true | ||
const: | ||
- Pollutants | ||
default: | ||
- Pollutants | ||
items: | ||
type: string | ||
enum: | ||
- Pollutants | ||
CO2: | ||
title: CO2 | ||
description: amount of carbon dioxide released into the atmosphere, measured in kilograms | ||
CH4: | ||
title: CH4 | ||
description: amount of methane released into the atmosphere, measured in kilograms | ||
NO2: | ||
title: NO2 | ||
description: amount of nitrogen dioxide released into the atmosphere, measured in kilograms | ||
CO2equivalent: | ||
title: CO2 Equivalent | ||
description: a calculated total of the CO2 equivalent of all the pollutants, measured in KG | ||
type: string | ||
proof: | ||
$ref: ../snippets/proof.yml | ||
additionalProperties: false | ||
required: | ||
- '@context' | ||
- type | ||
- issuanceDate | ||
- issuer | ||
- credentialSubject | ||
example: |- | ||
{ | ||
"@context": [ | ||
"https://www.w3.org/2018/credentials/v1", | ||
"https://w3id.org/traceability/v1" | ||
], | ||
"id": "http://example.com/dd0c6f9a-5df6-40a3-bb34-863cd1fda606", | ||
"type": [ | ||
"VerifiableCredential", | ||
"environmentalImpactCredential" | ||
], | ||
"issuer": { | ||
"type": [ | ||
"Organization" | ||
], | ||
"id": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U" | ||
}, | ||
"issuanceDate": "2022-11-01T10:58:45-04:00", | ||
"credentialSubject": { | ||
"impactTimeStart": "2024-03-10T10:58:45-04:00", | ||
"impactTimeEnd": "2024-03-19T10:58:45-04:00", | ||
"pollutants": { | ||
"CO2": "870", | ||
"CH4": "320", | ||
"NO2": "0" | ||
}, | ||
"CO2e": "1190" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters