Skip to content

Commit

Permalink
Add Agriculture Activiy Credential
Browse files Browse the repository at this point in the history
Signed-off-by: Brent Zundel <[email protected]>
  • Loading branch information
brentzundel committed Sep 13, 2024
1 parent d06f32a commit 5d7324e
Show file tree
Hide file tree
Showing 2 changed files with 284 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/credentials-with-issuer-dependent-terms.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@
"type": "AgricultureCanineCard",
"count": 20
},
{
"type": "AgricultureActivityCredential",
"count": 0
},
{
"type": "ActivityPubActorCard",
"count": 0
Expand Down
Original file line number Diff line number Diff line change
@@ -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": "[email protected]",
"phoneNumber": "+1-980-555-6819"
},
"actor": [
{
"type": [
"Person"
],
"firstName": "Karson",
"lastName": "Mante",
"email": "[email protected]",
"phoneNumber": "+1-688-555-6847",
"worksFor": {
"type": [
"Organization"
],
"name": "Jimbo's Awesome Farm",
"description": "Organic fruits & vegetables",
"email": "[email protected]",
"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": "[email protected]",
"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": "[email protected]",
"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"
}
}
]
}
]
}
}

0 comments on commit 5d7324e

Please sign in to comment.