From 7a54379ba070fed51d0583a128a7404057c26b07 Mon Sep 17 00:00:00 2001 From: Mahmoud Alkhraishi Date: Tue, 25 Jun 2024 11:34:59 -0400 Subject: [PATCH] adds monthly aggregate delivery statement --- .../MonthlyAggregateDeliveryStatements.yml | 155 ++++++++++++++++++ .../environmentalImpactCredential.yml | 2 +- docs/openapi/openapi.yml | 12 ++ 3 files changed, 168 insertions(+), 1 deletion(-) create mode 100644 docs/openapi/components/schemas/credentials/MonthlyAggregateDeliveryStatements.yml diff --git a/docs/openapi/components/schemas/credentials/MonthlyAggregateDeliveryStatements.yml b/docs/openapi/components/schemas/credentials/MonthlyAggregateDeliveryStatements.yml new file mode 100644 index 000000000..117d68d13 --- /dev/null +++ b/docs/openapi/components/schemas/credentials/MonthlyAggregateDeliveryStatements.yml @@ -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" + } + } + ] + } + ] + } + } \ No newline at end of file diff --git a/docs/openapi/components/schemas/credentials/environmentalImpactCredential.yml b/docs/openapi/components/schemas/credentials/environmentalImpactCredential.yml index 0bc97fc4f..584550897 100644 --- a/docs/openapi/components/schemas/credentials/environmentalImpactCredential.yml +++ b/docs/openapi/components/schemas/credentials/environmentalImpactCredential.yml @@ -142,4 +142,4 @@ example: |- }, "CO2e": "1190" } - } + } \ No newline at end of file diff --git a/docs/openapi/openapi.yml b/docs/openapi/openapi.yml index 5096b8fba..3a7c485b9 100644 --- a/docs/openapi/openapi.yml +++ b/docs/openapi/openapi.yml @@ -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: