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

adds monthly aggregate delivery statement #959

Merged
merged 5 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
$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
nissimsan marked this conversation as resolved.
Show resolved Hide resolved
proof:
$ref: ../snippets/proof.yml
additionalProperties: false
required:
mkhraisha marked this conversation as resolved.
Show resolved Hide resolved
- '@context'
- type
- id
- 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",
nissimsan marked this conversation as resolved.
Show resolved Hide resolved
nissimsan marked this conversation as resolved.
Show resolved Hide resolved
"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
Loading