From 5d7324e05ef67e250fca0b0ccd187b6402320960 Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Fri, 13 Sep 2024 15:06:18 -0600 Subject: [PATCH 1/9] Add Agriculture Activiy Credential Signed-off-by: Brent Zundel --- ...edentials-with-issuer-dependent-terms.json | 4 + .../AgricultureActivityCredential.yml | 280 ++++++++++++++++++ 2 files changed, 284 insertions(+) create mode 100644 docs/openapi/components/schemas/credentials/AgricultureActivityCredential.yml diff --git a/docs/credentials-with-issuer-dependent-terms.json b/docs/credentials-with-issuer-dependent-terms.json index 6f27b4815..e8086c55e 100644 --- a/docs/credentials-with-issuer-dependent-terms.json +++ b/docs/credentials-with-issuer-dependent-terms.json @@ -299,6 +299,10 @@ "type": "AgricultureCanineCard", "count": 20 }, + { + "type": "AgricultureActivityCredential", + "count": 0 + }, { "type": "ActivityPubActorCard", "count": 0 diff --git a/docs/openapi/components/schemas/credentials/AgricultureActivityCredential.yml b/docs/openapi/components/schemas/credentials/AgricultureActivityCredential.yml new file mode 100644 index 000000000..e82e710b3 --- /dev/null +++ b/docs/openapi/components/schemas/credentials/AgricultureActivityCredential.yml @@ -0,0 +1,280 @@ +$linkedData: + term: AgricultureActivityCredential + '@id': https://w3id.org/traceability#AgricultureActivityCredential +title: Agriculture Activity Credential +tags: + - Agriculture +description: >- + A credential asserting activities that take place on the farm that need to be + recorded, such as planting, harvesting, applying fertilizer, etc. +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 + - AgricultureActivityCredential + default: + - VerifiableCredential + - AgricultureActivityCredential + items: + type: string + enum: + - VerifiableCredential + - AgricultureActivityCredential + id: + type: string + name: + type: string + description: + type: string + issuanceDate: + type: string + format: date-time + expirationDate: + type: string + format: date-time + issuer: + $ref: ../snippets/IssuerOrganization.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/AgricultureActivityCredential.yml + default: https://w3id.org/traceability/openapi/components/schemas/credentials/AgricultureActivityCredential.yml + readOnly: true + type: + title: Type + description: The type of validation to be run against the defined schema + const: OpenApiSpecificationValidator2022 + credentialSubject: + title: Agriculture Activities array + type: object + properties: + agActivities: + type: array + items: + $ref: ../common/AgricultureActivity.yml +additionalProperties: false +required: + - '@context' + - type + - id + - issuanceDate + - expirationDate + - issuer + - credentialSubject +example: |- + { + "type": [ + "VerifiableCredential", + "AgricultureActivityCredential" + ], + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/traceability/v1" + ], + "id": "urn:uuid:2385e117-8011-4n15-bcae-64e4e26856c8", + "name": "Agriculture Activies Credential", + "description": "These agriculture activities are hereby recorded", + "issuer": { + "type": [ + "Organization" + ], + "id": "did:web:organization.example.com", + "name": "Binky's Farm" + }, + "issuanceDate": "2022-01-13T09:16:46Z", + "expirationDate": "2122-01-13T09:16:46Z", + "credentialSubject": { + "agActivities": [ + { + "type": ["AgricultureActivity"], + "farm": { + "type": [ + "Person" + ], + "email": "Elaina.Wiza@example.org", + "phoneNumber": "+1-980-555-6819" + }, + "actor": [ + { + "type": [ + "Person" + ], + "firstName": "Karson", + "lastName": "Mante", + "email": "Alexandrea_Wisozk44@example.org", + "phoneNumber": "+1-688-555-6847", + "worksFor": { + "type": [ + "Organization" + ], + "name": "Jimbo's Awesome Farm", + "description": "Organic fruits & vegetables", + "email": "Chloe.Ondricka42@jimbofarm.example.org", + "phoneNumber": "+1-155-555-9176", + "faxNumber": "+1-701-555-0319" + }, + "jobTitle": "Chief Markets Agent" + } + ], + "field": { + "type": [ + "Place" + ], + "globalLocationNumber": "9339929638102", + "geo": { + "type": [ + "GeoCoordinates" + ], + "latitude": "40.9090", + "longitude": "151.8748" + }, + "unLocode": "DKCPH" + }, + "activityDate": "2020-02-15", + "activityType": "spray", + "agricultureProduct": [ + { + "type": [ + "AgricultureProduct" + ], + "plu": "94225", + "unitQuantity": { + "type": [ + "QuantitativeValue" + ], + "unitCode": "boxes", + "value": "893" + }, + "product": { + "type": [ + "Product" + ], + "manufacturer": { + "type": [ + "Organization" + ], + "email": "Jeremie_Bauch@example.org", + "phoneNumber": "+1-540-555-5299" + }, + "name": "Avocados", + "description": "Avocados, 4 pack boxes", + "weight": { + "type": [ + "QuantitativeValue" + ], + "unitCode": "lbs", + "value": "1784" + }, + "sku": "563279941950" + }, + "scientificName": "Persea americana", + "labelImageUrl": "https://img.example.org/033383401508/640/480/", + "labelImageHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + { + "type": [ + "AgricultureProduct" + ], + "plu": "94225", + "product": { + "type": [ + "Product" + ], + "manufacturer": { + "type": [ + "Organization" + ], + "email": "Sven22@example.org", + "phoneNumber": "+1-516-555-4400" + }, + "name": "Tomatoes", + "description": "Tomatoes, Cartons", + "weight": { + "type": [ + "QuantitativeValue" + ], + "unitCode": "lbs", + "value": "640" + }, + "sku": "164664203943" + }, + "unitQuantity": { + "type": [ + "QuantitativeValue" + ], + "unitCode": "cartons", + "value": "348" + }, + "scientificName": "Solanum lycopersicum", + "labelImageUrl": "https://img.example.org/033383401508/640/480/", + "labelImageHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + ], + "observation": [ + { + "type": [ + "Observation" + ], + "date": "2019-12-11T03:50:55Z", + "property": { + "type": [ + "MechanicalProperty" + ], + "identifier": "ISO 3738", + "name": "Rockwell Hardness Test (Scale A)", + "description": "The Rockwell hardness test is an empirical indentation hardness test that can provide useful information about metallic materials." + }, + "measurement": { + "type": [ + "MeasuredValue" + ], + "value": "00.00", + "unitCode": "UNKNOWN" + } + }, + { + "type": [ + "Observation" + ], + "date": "2019-12-11T03:50:55Z", + "property": { + "type": [ + "ChemicalProperty" + ], + "name": "Technetium" + }, + "measurement": { + "type": [ + "MeasuredValue" + ], + "value": "100.00", + "unitCode": "P1" + } + } + ] + } + ] + } + } From 56476f6564eae8769198c8c0387a6c9e977230d2 Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Fri, 13 Sep 2024 15:26:51 -0600 Subject: [PATCH 2/9] add phytosanitary credential Signed-off-by: Brent Zundel --- .../credentials/PhytosanitaryCredential.yml | 379 ++++++++++++++++++ 1 file changed, 379 insertions(+) create mode 100644 docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml diff --git a/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml b/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml new file mode 100644 index 000000000..5cc91eb67 --- /dev/null +++ b/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml @@ -0,0 +1,379 @@ +$linkedData: + term: PhytosanitaryCredential + '@id': https://w3id.org/traceability#PhytosanitaryCredential +title: Phytosanitary Credential +tags: + - Agriculture +description: >- + Generalized credential of most common phytosanitary inspection data and + properties. +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 + - PhytosanitaryCredential + default: + - VerifiableCredential + - PhytosanitaryCredential + items: + type: string + enum: + - VerifiableCredential + - PhytosanitaryCredential + id: + type: string + name: + type: string + description: + type: string + issuanceDate: + type: string + format: date-time + expirationDate: + type: string + format: date-time + issuer: + $ref: ../snippets/IssuerOrganization.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/PhytosanitaryCredential.yml + default: https://w3id.org/traceability/openapi/components/schemas/credentials/PhytosanitaryCredential.yml + readOnly: true + type: + title: Type + description: The type of validation to be run against the defined schema + const: OpenApiSpecificationValidator2022 + credentialSubject: + title: Phytosanitary Claims + type: object + properties: + $ref: ../common/AgricultureActivity.yml +additionalProperties: false +required: + - '@context' + - type + - id + - issuanceDate + - expirationDate + - issuer + - credentialSubject +example: |- + { + "type": [ + "VerifiableCredential", + "PhytosanitaryCredential" + ], + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/traceability/v1" + ], + "id": "urn:uuid:2385e117-8011-4n15-bcae-64e4e26856c8", + "name": "Agriculture Activies Credential", + "description": "These agriculture activities are hereby recorded", + "issuer": { + "type": [ + "Organization" + ], + "id": "did:web:organization.example.com", + "name": "Binky's Farm" + }, + "issuanceDate": "2022-01-13T09:16:46Z", + "expirationDate": "2122-01-13T09:16:46Z", + "credentialSubject": { + "type": ["Phytosanitary"], + "facility": { + "type": [ + "Place" + ], + "globalLocationNumber": "6064198436045", + "geo": { + "type": [ + "GeoCoordinates" + ], + "latitude": "80.0906", + "longitude": "144.7640" + }, + "address": { + "type": [ + "PostalAddress" + ], + "name": "Von LLC", + "streetAddress": "825 Strosin Knoll", + "addressLocality": "West Alivia", + "addressRegion": "New Mexico", + "postalCode": "17004", + "addressCountry": "Cuba" + }, + "unLocode": "DKCPH" + }, + "inspector": { + "type": [ + "Inspector" + ], + "person": { + "type": [ + "Person" + ], + "firstName": "Magdalena", + "lastName": "Huels", + "email": "Rose.Runolfsson@example.org", + "phoneNumber": "+1-787-555-7633", + "worksFor": { + "type": [ + "Organization" + ], + "name": "Koepp - Grant", + "description": "Inverse disintermediate database", + "email": "Adeline96@example.com", + "phoneNumber": "+1-228-555-6425", + "faxNumber": "+1-891-555-2149" + }, + "jobTitle": "Customer Interactions Manager" + }, + "qualification": [ + { + "type": ["Qualification"], + "qualificationCategory": "International Markets Consultant", + "qualificationValue": "Planner" + }, + { + "type": ["Qualification"], + "qualificationCategory": "Central Operations Developer", + "qualificationValue": "Developer" + } + ] + }, + "shipment": { + "type": [ + "AgricultureParcelDelivery" + ], + "deliveryAddress": { + "type": [ + "PostalAddress" + ], + "name": "Bartell - Doyle", + "streetAddress": "84189 Roberts Route", + "addressLocality": "Kautzerstad", + "addressRegion": "Louisiana", + "postalCode": "37950-5855", + "addressCountry": "Mongolia" + }, + "originAddress": { + "type": [ + "PostalAddress" + ], + "name": "Marks, Runte and Bartell", + "streetAddress": "97696 Weissnat Pines", + "addressLocality": "Reynabury", + "addressRegion": "North Dakota", + "postalCode": "51361-9603", + "addressCountry": "Virgin Islands, U.S." + }, + "foreignPortExport": { + "type": [ + "Place" + ], + "globalLocationNumber": "4947538126450", + "geo": { + "type": [ + "GeoCoordinates" + ], + "latitude": "40.5464", + "longitude": "-37.6146" + }, + "address": { + "type": [ + "PostalAddress" + ], + "name": "Moen - Swift", + "streetAddress": "9746 Laron Gardens", + "addressLocality": "Port Flossie", + "addressRegion": "Hawaii", + "postalCode": "64687", + "addressCountry": "Djibouti" + }, + "unLocode": "DKCPH" + }, + "portOfEntry": { + "type": [ + "Place" + ], + "globalLocationNumber": "2184109798407", + "geo": { + "type": [ + "GeoCoordinates" + ], + "latitude": "38.8485", + "longitude": "-34.0883" + }, + "address": { + "type": [ + "PostalAddress" + ], + "name": "Mills, Daugherty and Nader", + "streetAddress": "39514 Kulas Terrace", + "addressLocality": "East Avis", + "addressRegion": "Utah", + "postalCode": "45553", + "addressCountry": "Northern Mariana Islands" + }, + "unLocode": "DKCPH" + }, + "deliveryMethod": "Truck transport", + "trackingNumber": "866440000109", + "expectedArrival": "2021-03-14", + "specialInstructions": "The package is top-heavy so handle with appropriate caution.", + "consignee": { + "type": [ + "Organization" + ], + "name": "Ace Foodstuffs", + "description": "Agricultural goods shipping & distribution", + "email": "Hipolito58@acefoodstuffs.org", + "phoneNumber": "+1-909-555-3974", + "faxNumber": "+1-455-555-7047" + }, + "agriculturePackage": [ + { + "type": [ + "AgriculturePackage" + ] + } + ], + "shipper": { + "type": ["Organization"], + "name": "Green Fields", + "description": "Growing & packaging for high quality produce", + "email": "sales@greenfields.org", + "phoneNumber": "+1-420-555-6663" + }, + "purchaser": { + "type": ["Organization"], + "name": "Ace Foodstuffs", + "description": "Agricultural goods shipping & distribution", + "email": "Hipolito58@acefoodstuffs.org", + "phoneNumber": "+1-111-555-4727", + "faxNumber": "+1-945-555-4783" + }, + "carrier": { + "type": [ + "Organization" + ], + "email": "Adaline29@example.com", + "phoneNumber": "+1-885-555-8926" + }, + "broker": { + "type": ["Organization"], + "name": "Koch LLC", + "leiCode": "54321351219389121979" + } + }, + "applicant": { + "type": ["Organization"], + "name": "Example Application Organization", + "email": "Talia.Abbott@example.net", + "phoneNumber": "+1-812-555-8615" + }, + "inspectionDate": "2020-03-15", + "inspectionType": "Food Safety", + "observation": [ + { + "type": [ + "Observation" + ], + "date": "2019-12-11T03:50:55Z", + "property": { + "type": [ + "ChemicalProperty" + ], + "name": "Radium" + }, + "measurement": { + "type": [ + "MeasuredValue" + ], + "value": "57.243", + "unitCode": "P1" + } + }, + { + "type": [ + "Observation" + ], + "date": "2019-12-11T03:50:55Z", + "property": { + "type": [ + "MechanicalProperty" + ], + "identifier": "ISO 1352", + "name": "Torque-controlled fatigue testing", + "description": "ISO 1352:2011 specifies the conditions for performing torsional, constant-amplitude, nominally elastic stress fatigue tests on metallic specimens without deliberately introducing stress concentrations. The tests are carried out at ambient temperature (ideally at between 10 °C and 35 °C) in air by applying a pure couple to the specimen about its longitudinal axis." + }, + "measurement": { + "type": [ + "MeasuredValue" + ], + "value": "00.00", + "unitCode": "UNKNOWN" + } + } + ], + "certificateNumber": "330893782475", + "plantOrg": { + "type": ["Organization"], + "name": "APHIS", + "description": "Animal and Plant Health Inspection Service", + "email": "Irwin_OConnell83@aphis.usda.gov", + "phoneNumber": "+1-404-555-5401", + "faxNumber": "+1-937-555-6293" + }, + "distinguishingMarks": "Enim repudiandae excepturi rem.", + "portOfEntry": { + "type": ["Place"], + "address": { + "type": ["PostalAddress"], + "addressLocality": "Mariannaton", + "addressRegion": "Utah" + } + }, + "additionalDeclaration": "Similique excepturi non tempore provident iure.", + "disinfectionDate": "2021-02-22", + "disinfectionTreatment": "Fumigant - Methyl Bromide - Structure Fumigation", + "disinfectionChemical": "Methyl Bromide", + "disinfectionDuration": "79 minutes", + "disinfectionTemperature": { + "type": ["MeasuredValue"], + "value": "2", + "unitCode": "Celsius" + }, + "disinfectionConcentration": { + "type": ["MeasuredValue"], + "value": "21", + "unitCode": "Percent" + }, + "signatureDate": "2021-03-12" + } + } From 113461a4da4cf9a2bc600f8f69767edfdeff4375 Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Fri, 13 Sep 2024 15:28:48 -0600 Subject: [PATCH 3/9] fix up creds Signed-off-by: Brent Zundel --- .../AgricultureActivityCredential.yml | 6 ++- .../credentials/PhytosanitaryCredential.yml | 50 ++++++++++++++----- 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/docs/openapi/components/schemas/credentials/AgricultureActivityCredential.yml b/docs/openapi/components/schemas/credentials/AgricultureActivityCredential.yml index e82e710b3..8081e5351 100644 --- a/docs/openapi/components/schemas/credentials/AgricultureActivityCredential.yml +++ b/docs/openapi/components/schemas/credentials/AgricultureActivityCredential.yml @@ -108,7 +108,9 @@ example: |- "credentialSubject": { "agActivities": [ { - "type": ["AgricultureActivity"], + "type": [ + "AgricultureActivity" + ], "farm": { "type": [ "Person" @@ -277,4 +279,4 @@ example: |- } ] } - } + } \ No newline at end of file diff --git a/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml b/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml index 5cc91eb67..a09406700 100644 --- a/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml +++ b/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml @@ -103,7 +103,9 @@ example: |- "issuanceDate": "2022-01-13T09:16:46Z", "expirationDate": "2122-01-13T09:16:46Z", "credentialSubject": { - "type": ["Phytosanitary"], + "type": [ + "Phytosanitary" + ], "facility": { "type": [ "Place" @@ -155,12 +157,16 @@ example: |- }, "qualification": [ { - "type": ["Qualification"], + "type": [ + "Qualification" + ], "qualificationCategory": "International Markets Consultant", "qualificationValue": "Planner" }, { - "type": ["Qualification"], + "type": [ + "Qualification" + ], "qualificationCategory": "Central Operations Developer", "qualificationValue": "Developer" } @@ -264,14 +270,18 @@ example: |- } ], "shipper": { - "type": ["Organization"], + "type": [ + "Organization" + ], "name": "Green Fields", "description": "Growing & packaging for high quality produce", "email": "sales@greenfields.org", "phoneNumber": "+1-420-555-6663" }, "purchaser": { - "type": ["Organization"], + "type": [ + "Organization" + ], "name": "Ace Foodstuffs", "description": "Agricultural goods shipping & distribution", "email": "Hipolito58@acefoodstuffs.org", @@ -286,13 +296,17 @@ example: |- "phoneNumber": "+1-885-555-8926" }, "broker": { - "type": ["Organization"], + "type": [ + "Organization" + ], "name": "Koch LLC", "leiCode": "54321351219389121979" } }, "applicant": { - "type": ["Organization"], + "type": [ + "Organization" + ], "name": "Example Application Organization", "email": "Talia.Abbott@example.net", "phoneNumber": "+1-812-555-8615" @@ -343,7 +357,9 @@ example: |- ], "certificateNumber": "330893782475", "plantOrg": { - "type": ["Organization"], + "type": [ + "Organization" + ], "name": "APHIS", "description": "Animal and Plant Health Inspection Service", "email": "Irwin_OConnell83@aphis.usda.gov", @@ -352,9 +368,13 @@ example: |- }, "distinguishingMarks": "Enim repudiandae excepturi rem.", "portOfEntry": { - "type": ["Place"], + "type": [ + "Place" + ], "address": { - "type": ["PostalAddress"], + "type": [ + "PostalAddress" + ], "addressLocality": "Mariannaton", "addressRegion": "Utah" } @@ -365,15 +385,19 @@ example: |- "disinfectionChemical": "Methyl Bromide", "disinfectionDuration": "79 minutes", "disinfectionTemperature": { - "type": ["MeasuredValue"], + "type": [ + "MeasuredValue" + ], "value": "2", "unitCode": "Celsius" }, "disinfectionConcentration": { - "type": ["MeasuredValue"], + "type": [ + "MeasuredValue" + ], "value": "21", "unitCode": "Percent" }, "signatureDate": "2021-03-12" } - } + } \ No newline at end of file From d624dd168d52328a857566712bdbc5786f02ddd2 Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Fri, 13 Sep 2024 15:32:35 -0600 Subject: [PATCH 4/9] fix link Signed-off-by: Brent Zundel --- .../components/schemas/credentials/PhytosanitaryCredential.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml b/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml index a09406700..79d0196bd 100644 --- a/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml +++ b/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml @@ -70,7 +70,7 @@ properties: title: Phytosanitary Claims type: object properties: - $ref: ../common/AgricultureActivity.yml + $ref: ../common/Phytosanitary.yml additionalProperties: false required: - '@context' From 7408ec3450674e1d573d8b7b1bafe28f9f1db800 Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Fri, 13 Sep 2024 15:36:13 -0600 Subject: [PATCH 5/9] fix phyto Signed-off-by: Brent Zundel --- .../schemas/credentials/PhytosanitaryCredential.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml b/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml index 79d0196bd..a0d1a4c35 100644 --- a/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml +++ b/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml @@ -67,10 +67,7 @@ properties: description: The type of validation to be run against the defined schema const: OpenApiSpecificationValidator2022 credentialSubject: - title: Phytosanitary Claims - type: object - properties: - $ref: ../common/Phytosanitary.yml + $ref: ../common/Phytosanitary.yml additionalProperties: false required: - '@context' From 7729d7d8bbaa04995d2548afe6363b238f1f4cfc Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Fri, 13 Sep 2024 15:46:13 -0600 Subject: [PATCH 6/9] add ppq203 Signed-off-by: Brent Zundel --- ...APPQ203ForeignSiteInspectionCredential.yml | 366 ++++++++++++++++++ 1 file changed, 366 insertions(+) create mode 100644 docs/openapi/components/schemas/credentials/USDAPPQ203ForeignSiteInspectionCredential.yml diff --git a/docs/openapi/components/schemas/credentials/USDAPPQ203ForeignSiteInspectionCredential.yml b/docs/openapi/components/schemas/credentials/USDAPPQ203ForeignSiteInspectionCredential.yml new file mode 100644 index 000000000..c83cf80fa --- /dev/null +++ b/docs/openapi/components/schemas/credentials/USDAPPQ203ForeignSiteInspectionCredential.yml @@ -0,0 +1,366 @@ +$linkedData: + term: USDAPPQ203ForeignSiteInspectionCredential + '@id': https://w3id.org/traceability#USDAPPQ203ForeignSiteInspectionCredential +title: USDA PPQ203 Foreign Site Inspection Credential +tags: + - Agriculture +description: >- + USDA APHIS (Animal and Plant Health Inspection Service) PPQ (Plant Protection + and Quarantine) 203, Foreign Site Certificate of Inspection and/or Treatment. +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 + - USDAPPQ203ForeignSiteInspectionCredential + default: + - VerifiableCredential + - USDAPPQ203ForeignSiteInspectionCredential + items: + type: string + enum: + - VerifiableCredential + - USDAPPQ203ForeignSiteInspectionCredential + id: + type: string + name: + type: string + description: + type: string + issuanceDate: + type: string + format: date-time + expirationDate: + type: string + format: date-time + issuer: + $ref: ../snippets/IssuerOrganization.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/USDAPPQ203ForeignSiteInspectionCredential.yml + default: https://w3id.org/traceability/openapi/components/schemas/credentials/USDAPPQ203ForeignSiteInspectionCredential.yml + readOnly: true + type: + title: Type + description: The type of validation to be run against the defined schema + const: OpenApiSpecificationValidator2022 + credentialSubject: + $ref: ../common/USDAPPQ203ForeignSiteInspection.yml +additionalProperties: false +required: + - '@context' + - type + - id + - issuanceDate + - expirationDate + - issuer + - credentialSubject +example: |- + { + "type": [ + "VerifiableCredential", + "USDAPPQ203ForeignSiteInspectionCredential" + ], + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/traceability/v1" + ], + "id": "urn:uuid:2385e117-8011-4n15-bcae-64e4e26856c8", + "name": "Agriculture Activies Credential", + "description": "These agriculture activities are hereby recorded", + "issuer": { + "type": [ + "Organization" + ], + "id": "did:web:organization.example.com", + "name": "Binky's Farm" + }, + "issuanceDate": "2022-01-13T09:16:46Z", + "expirationDate": "2122-01-13T09:16:46Z", + "credentialSubject": { + "type": ["USDAPPQ203ForeignSiteInspection"], + "certificateNumber": "3812549", + "commonInfo": { + "type": ["AgricultureInspectionCommonInfo"], + "applicant": { + "type" : ["Organization"], + "name": "Miracle Produce", + "description": "Organic fruits & vegetables", + "email": "contact@example.com", + "phoneNumber": "+1-497-555-3690", + "url": "miracle.example.com" + }, + "facility": { + "type": [ + "Place" + ], + "globalLocationNumber": "5449782976823", + "geo": { + "type": [ + "GeoCoordinates" + ], + "latitude": "-79.6395", + "longitude": "178.5353" + }, + "address": { + "type": [ + "PostalAddress" + ], + "name": "Miracle Produce", + "streetAddress": "853 Wisozk River", + "addressLocality": "New Noemyfort", + "addressRegion": "New Mexico", + "postalCode": "18047-2038", + "addressCountry": "Togo" + }, + "unLocode": "DKCPH" + }, + "inspector": { + "type": [ + "Inspector" + ], + "person": { + "type": [ + "Person" + ], + "firstName": "Jason", + "lastName": "Grant", + "email": "Santa43@example.org", + "phoneNumber": "+1-497-555-1059", + "worksFor": { + "type": [ + "Organization" + ], + "name": "Glayson & Co. Inspections", + "description": "Agricultural cleanliness & grade assurance", + "email": "Marina96@glaysonco.net", + "phoneNumber": "+1-222-555-0444", + "faxNumber": "+1-000-555-1363" + }, + "jobTitle": "Principal Data Supervisor" + }, + "qualification": [ + { + "type": ["Qualification"], + "qualificationCategory": "Agricultural Security Analyst", + "qualificationValue": "Executive" + }, + { + "type": ["Qualification"], + "qualificationCategory": "Future Metrics Planner", + "qualificationValue": "Coordinator" + }, + { + "type": ["Qualification"], + "qualificationCategory": "Internal Identity Agent", + "qualificationValue": "Assistant" + } + ] + }, + "delegateOf": { + "type": ["Organization"], + "name": "Glayson & Co. Inspections", + "description": "Agricultural cleanliness & grade assurance", + "email": "Marina96@glaysonco.net", + "phoneNumber": "+1-054-555-6437", + "faxNumber": "+1-397-555-4376" + }, + "regulatoryAgency": { + "type": ["Organization"], + "name": "CDFA", + "description": "California Department of Food and Agriculture", + "email": "relations@example.org", + "phoneNumber": "+1-338-555-2432", + "faxNumber": "+1-957-555-0146" + }, + "inspectionStarted": "2020-03-15T14:30-08:00", + "inspectionEnded": "2020-03-15T17:30-08:00" + }, + "shipment": { + "type": [ + "AgricultureParcelDelivery" + ], + "deliveryAddress": { + "type": [ + "PostalAddress" + ], + "name": "Industrial Distributions", + "streetAddress": "853 Wisozk River", + "addressLocality": "New Noemyfort", + "addressRegion": "New Mexico", + "postalCode": "18047-2038", + "addressCountry": "Togo" + }, + "originAddress": { + "type": [ + "PostalAddress" + ], + "name": "Green Fields", + "streetAddress": "97696 Weissnat Pines", + "addressLocality": "Reynabury", + "addressRegion": "North Dakota", + "postalCode": "51361-9603", + "addressCountry": "U.S." + }, + "deliveryMethod": "Truck transport", + "trackingNumber": "866440000109", + "expectedArrival": "2021-03-14", + "specialInstructions": "The package is delicate so handle with appropriate caution.", + "consignee": { + "type": [ + "Organization" + ], + "name": "Ace Foodstuffs", + "description": "Agricultural goods shipping & distribution", + "email": "Hipolito58@acefoodstuffs.org", + "phoneNumber": "+1-233-555-6933", + "faxNumber": "+1-625-555-9260" + }, + "agriculturePackage": [ + { + "type": [ + "AgriculturePackage" + ], + "packageName": "Avocados, Bulk", + "grade": "AA", + "responsibleParty": { + "type": ["Organization"], + "name": "Example Responsible Party Organization", + "email": "Chadrick_Gibson@example.com", + "phoneNumber": "+1-224-555-4962" + }, + "voicePickCode": "4642", + "harvestDate": "2021-03-14", + "labelImageUrl": "https://img.example.org/640/480/", + "labelImageHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "agricultureProduct": [ + { + "type": [ + "AgricultureProduct" + ], + "plu": "94225", + "product": { + "type": [ + "Product" + ], + "manufacturer": { + "type": [ + "Organization" + ], + "email": "Ashlee.Grady@example.net", + "phoneNumber": "+1-622-555-1265" + }, + "name": "Avocados", + "description": "Avocados, 4 pack boxes", + "weight": { + "type": [ + "QuantitativeValue" + ], + "unitCode": "hg/ha", + "value": "6960" + }, + "sku": "81055399441" + }, + "scientificName": "Persea americana", + "labelImageUrl": "https://img.example.org/033383401508/640/480/", + "labelImageHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + ] + } + ], + "shipper": { + "type": ["Organization"], + "name": "Green Fields", + "description": "Growing & packaging for high quality produce", + "email": "sales@greenfields.org", + "phoneNumber": "+1-054-555-7293" + }, + "purchaser": { + "type": ["Organization"], + "name": "Ace Foodstuffs", + "description": "Agricultural goods shipping & distribution", + "email": "Hipolito58@acefoodstuffs.org", + "phoneNumber": "+1-482-555-0143", + "faxNumber": "+1-730-555-8614" + }, + "carrier": { + "type": [ + "Organization" + ], + "email": "Adaline29@example.com", + "phoneNumber": "+1-476-555-6947" + }, + "broker": { + "type": ["Organization"], + "name": "Cole United", + "leiCode": "54321351219389121979" + } + }, + "signatureDate": "2021-02-27", + "inspectionType": "Package audit", + "observations": [ + { + "type": [ + "Observation" + ], + "date": "2019-12-11T03:50:55Z", + "property": { + "type": [ + "ChemicalProperty" + ], + "name": "Radon" + }, + "measurement": { + "type": [ + "MeasuredValue" + ], + "value": "58.340", + "unitCode": "P1" + } + }, + { + "type": [ + "Observation" + ], + "date": "2019-12-11T03:50:55Z", + "property": { + "type": [ + "MechanicalProperty" + ], + "identifier": "ISO 1352", + "name": "Torque-controlled fatigue testing", + "description": "ISO 1352:2011 specifies the conditions for performing torsional, constant-amplitude, nominally elastic stress fatigue tests on metallic specimens without deliberately introducing stress concentrations. The tests are carried out at ambient temperature (ideally at between 10 °C and 35 °C) in air by applying a pure couple to the specimen about its longitudinal axis." + }, + "measurement": { + "type": [ + "MeasuredValue" + ], + "value": "00.00", + "unitCode": "UNKNOWN" + } + } + ] + } + } \ No newline at end of file From 5269483faccc9c952c79f0d10134b0eaa3bdfa4c Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Fri, 13 Sep 2024 15:47:50 -0600 Subject: [PATCH 7/9] add dependent terms Signed-off-by: Brent Zundel --- docs/credentials-with-issuer-dependent-terms.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/credentials-with-issuer-dependent-terms.json b/docs/credentials-with-issuer-dependent-terms.json index e8086c55e..f2dc4a842 100644 --- a/docs/credentials-with-issuer-dependent-terms.json +++ b/docs/credentials-with-issuer-dependent-terms.json @@ -23,6 +23,10 @@ "type": "USMCACertificationOfOrigin", "count": 6 }, + { + "type": "USDAPPQ203ForeignSiteInspectionCredential", + "count": 0 + } { "type": "ThingCredential", "count": 0 From f8f89cd25ae296236f126aeac9ac67bd76883dee Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Fri, 13 Sep 2024 16:47:51 -0600 Subject: [PATCH 8/9] fix linting Signed-off-by: Brent Zundel --- ...APPQ203ForeignSiteInspectionCredential.yml | 48 ++++++++++++++----- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/docs/openapi/components/schemas/credentials/USDAPPQ203ForeignSiteInspectionCredential.yml b/docs/openapi/components/schemas/credentials/USDAPPQ203ForeignSiteInspectionCredential.yml index c83cf80fa..5413de2e5 100644 --- a/docs/openapi/components/schemas/credentials/USDAPPQ203ForeignSiteInspectionCredential.yml +++ b/docs/openapi/components/schemas/credentials/USDAPPQ203ForeignSiteInspectionCredential.yml @@ -100,12 +100,18 @@ example: |- "issuanceDate": "2022-01-13T09:16:46Z", "expirationDate": "2122-01-13T09:16:46Z", "credentialSubject": { - "type": ["USDAPPQ203ForeignSiteInspection"], + "type": [ + "USDAPPQ203ForeignSiteInspection" + ], "certificateNumber": "3812549", "commonInfo": { - "type": ["AgricultureInspectionCommonInfo"], + "type": [ + "AgricultureInspectionCommonInfo" + ], "applicant": { - "type" : ["Organization"], + "type": [ + "Organization" + ], "name": "Miracle Produce", "description": "Organic fruits & vegetables", "email": "contact@example.com", @@ -163,24 +169,32 @@ example: |- }, "qualification": [ { - "type": ["Qualification"], + "type": [ + "Qualification" + ], "qualificationCategory": "Agricultural Security Analyst", "qualificationValue": "Executive" }, { - "type": ["Qualification"], + "type": [ + "Qualification" + ], "qualificationCategory": "Future Metrics Planner", "qualificationValue": "Coordinator" }, { - "type": ["Qualification"], + "type": [ + "Qualification" + ], "qualificationCategory": "Internal Identity Agent", "qualificationValue": "Assistant" } ] }, "delegateOf": { - "type": ["Organization"], + "type": [ + "Organization" + ], "name": "Glayson & Co. Inspections", "description": "Agricultural cleanliness & grade assurance", "email": "Marina96@glaysonco.net", @@ -188,7 +202,9 @@ example: |- "faxNumber": "+1-397-555-4376" }, "regulatoryAgency": { - "type": ["Organization"], + "type": [ + "Organization" + ], "name": "CDFA", "description": "California Department of Food and Agriculture", "email": "relations@example.org", @@ -246,7 +262,9 @@ example: |- "packageName": "Avocados, Bulk", "grade": "AA", "responsibleParty": { - "type": ["Organization"], + "type": [ + "Organization" + ], "name": "Example Responsible Party Organization", "email": "Chadrick_Gibson@example.com", "phoneNumber": "+1-224-555-4962" @@ -291,14 +309,18 @@ example: |- } ], "shipper": { - "type": ["Organization"], + "type": [ + "Organization" + ], "name": "Green Fields", "description": "Growing & packaging for high quality produce", "email": "sales@greenfields.org", "phoneNumber": "+1-054-555-7293" }, "purchaser": { - "type": ["Organization"], + "type": [ + "Organization" + ], "name": "Ace Foodstuffs", "description": "Agricultural goods shipping & distribution", "email": "Hipolito58@acefoodstuffs.org", @@ -313,7 +335,9 @@ example: |- "phoneNumber": "+1-476-555-6947" }, "broker": { - "type": ["Organization"], + "type": [ + "Organization" + ], "name": "Cole United", "leiCode": "54321351219389121979" } From d98e6cc27a03f062506df7f671fdf795bb5afdc0 Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Mon, 16 Sep 2024 13:50:08 -0600 Subject: [PATCH 9/9] Apply suggestions from code review Co-authored-by: Ted Thibodeau Jr --- .../components/schemas/credentials/PhytosanitaryCredential.yml | 2 +- .../credentials/USDAPPQ203ForeignSiteInspectionCredential.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml b/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml index a0d1a4c35..ce113520f 100644 --- a/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml +++ b/docs/openapi/components/schemas/credentials/PhytosanitaryCredential.yml @@ -56,7 +56,7 @@ properties: properties: id: title: Id - description: The url of the schema file to validate the shape of the json object + description: The URL of the schema file to be used to validate the shape of the JSON object type: string format: uri example: https://w3id.org/traceability/openapi/components/schemas/credentials/PhytosanitaryCredential.yml diff --git a/docs/openapi/components/schemas/credentials/USDAPPQ203ForeignSiteInspectionCredential.yml b/docs/openapi/components/schemas/credentials/USDAPPQ203ForeignSiteInspectionCredential.yml index 5413de2e5..67859e330 100644 --- a/docs/openapi/components/schemas/credentials/USDAPPQ203ForeignSiteInspectionCredential.yml +++ b/docs/openapi/components/schemas/credentials/USDAPPQ203ForeignSiteInspectionCredential.yml @@ -56,7 +56,7 @@ properties: properties: id: title: Id - description: The url of the schema file to validate the shape of the json object + description: The URL of the schema file to be used to validate the shape of the JSON object type: string format: uri example: https://w3id.org/traceability/openapi/components/schemas/credentials/USDAPPQ203ForeignSiteInspectionCredential.yml