Skip to content

Commit

Permalink
adds monthly aggregate delivery statement
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhraisha committed Jun 25, 2024
1 parent aa4fe1f commit 7a54379
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
$linkedData:
term: MonthlyAggregateDeliveryStatementCredential
'@id': https://w3id.org/traceability#MonthlyAggregateDeliveryStatementCredential
title: Monthly Aggregate Delivery Statement Credential
tags:
- Oil and Gas
description: >-
Credential containing aggregate statements indicating item(s) delivered during the month
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
- MonthlyAggregateDeliveryStatementCredential
default:
- VerifiableCredential
- MonthlyAggregateDeliveryStatementCredential
items:
type: string
enum:
- VerifiableCredential
- MonthlyAggregateDeliveryStatementCredential
id:
type: string
name:
type: string
description:
type: string
issuanceDate:
type: string
issuer:
$ref: ../common/Organization.yml
credentialSchema:
type: object
properties:
id:
title: Id
description: The URL of the schema file to use to validate the shape of the JSON object
type: string
format: uri
example: https://w3id.org/traceability/openapi/components/schemas/credentials/MonthlyAggregateDeliveryStatementCredential.yml
default: https://w3id.org/traceability/openapi/components/schemas/credentials/MonthlyAggregateDeliveryStatementCredential.yml
readonly: true
type:
title: Type
description: The type of validation to be run against the defined schema
const: OpenApiSpecificationValidator2022
credentialSubject:
type:
type: array
readOnly: true
const:
- MonthlyAggregateDeliveryStatementCredential
default:
- MonthlyAggregateDeliveryStatementCredential
items:
type: string
enum:
- MonthlyAggregateDeliveryStatementCredential
deliveryStatements:
type: array
readOnly: true
$ref: ../common/DeliveryStatement.yml
proof:
$ref: ../snippets/proof.yml
additionalProperties: false
required:
- '@context'
- type
- issuanceDate
- issuer
- credentialSubject
example: |-
{
"type": [
"VerifiableCredential",
"MonthlyAggregateDeliveryStatementCredential"
],
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/traceability/v1"
],
"id": "did:web:organization.example.com",
"issuer": {
"type": [
"Organization"
],
"id": "did:web:organization.example.com",
"name": "Everything Garden Stuff"
},
"issuanceDate": "2022-01-13T09:16:46Z",
"credentialSubject": {
"type": [
"MonthlyAggregateDeliveryStatementCredential"
],
"deliveryStatements": [
{
"type": [
"DeliveryStatement"
],
"commodity": {
"type": [
"Commodity"
],
"commodityCode": "2714.10.00.00",
"commodityCodeType": "HTS"
},
"deliveredDate": "2019-12-11T03:50:55Z",
"deliveredVolume": {
"type": [
"MeasuredValue"
],
"value": "8806",
"unitCode": "dth"
},
"observation": [
{
"type": [
"Observation"
],
"property": {
"type": [
"ChemicalProperty"
],
"name": "Heat Content"
},
"measurement": {
"type": [
"MeasuredValue"
],
"value": "50000",
"unitCode": "BTU"
}
}
]
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ example: |-
},
"CO2e": "1190"
}
}
}
12 changes: 12 additions & 0 deletions docs/openapi/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2720,6 +2720,18 @@ paths:
$ref: './components/schemas/credentials/MonthlyAdvanceManifestCredential.yml'


/schemas/credentials/MonthlyAggregateDeliveryStatements.yml:
get:
tags:
- credentials
responses:
'200':
content:
application/yml:
schema:
$ref: './components/schemas/credentials/MonthlyAggregateDeliveryStatements.yml'


/schemas/credentials/MultiModalBillOfLadingCredential.yml:
get:
tags:
Expand Down

0 comments on commit 7a54379

Please sign in to comment.