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

Feat/ams form additions #784

Merged
merged 12 commits into from
Oct 3, 2023
28 changes: 26 additions & 2 deletions docs/openapi/components/schemas/common/AgricultureProduct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ properties:
type: string
$linkedData:
term: plu
'@id': https://w3id.org/traceability#plu
'@id': https://www.ifpsglobal.com/PLU-Codes
gtin:
title: GTIN Code
description: >-
Expand Down Expand Up @@ -120,6 +120,27 @@ properties:
$linkedData:
term: productImageHash
'@id': https://w3id.org/traceability#productImageHash
variety:
title: Variety
description: "Additional details regarding the product. For example, in this case of potatoes this might include: russet, white, yellow flesh, etc."
rhofvendahl marked this conversation as resolved.
Show resolved Hide resolved
type: string
$linkedData:
term: variety
'@id': https://www.gs1.org/voc/consumerProductVariant
commodityDesignation:
title: Commodity Designation
description: "Additional product subcategories such as: frozen, fresh, sliced, canned, dried, dehydrated, etc."
type: string
$linkedData:
term: commodityDesignation
'@id': https://www.gs1.org/voc/additionalProductDescription
rhofvendahl marked this conversation as resolved.
Show resolved Hide resolved
packType:
title: Pack Type
description: "Details like: volume filled, tray pack, 18/lb consumer units, 10/5 pound bags, etc."
type: string
$linkedData:
term: packType
'@id': https://www.gs1.org/voc/packaging
additionalProperties: true
required:
- type
Expand Down Expand Up @@ -164,5 +185,8 @@ example: |-
"labelImageHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"name": "Avocados",
"productImageUrl": "https://img.example.org/102934920857/937/903/",
"productImageHash": "8kb47j986hklhde4rfh78okjhgjo08765fgu7tfg4t864fy876rfser45thj87f3"
"productImageHash": "8kb47j986hklhde4rfh78okjhgjo08765fgu7tfg4t864fy876rfser45thj87f3",
"variety": "Firm",
"commodityDesignation": "Whole, fresh",
"packType": "4-pack boxes"
}
81 changes: 81 additions & 0 deletions docs/openapi/components/schemas/common/ExtendedProduct.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
$linkedData:
term: ExtendedProduct
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a slighty off pattern here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest adding this to AgricultureProduct instead

'@id': https://w3id.org/traceability#ExtendedProduct
title: Extended Product
description: Extended product information.
type: object
properties:
type:
type: array
readOnly: true
const:
- ExtendedProduct
default:
- ExtendedProduct
items:
type: string
enum:
- ExtendedProduct
origination:
title: Origination
description: The place of origin.
$ref: ./Place.yml
$linkedData:
term: origination
'@id': https://service.unece.org/trade/uncefact/vocabulary/uncefact/#originLocation
supplier:
title: Supplier
description: The supplier for this product.
$ref: ./Organization.yml
$linkedData:
term: supplier
'@id': https://www.gs1.org/voc/manufacturer
htsCode:
title: HTS Code
description: The Harmonized Tariff Schedule (HTS) code.
type: string
$linkedData:
term: htsCode
'@id': https://service.unece.org/trade/uncefact/vocabulary/uncefact/#applicableTax
gtin:
title: GTIN
description: The Global Trade Item Number (GTIN).
type: string
$linkedData:
term: gtin
'@id': https://www.gs1.org/voc/gtin
additionalProperties: true
required:
- type
example: |-
{
"type": ["ExtendedProduct"],
"origination": {
"type": [
"Place"
],
"globalLocationNumber": "5449782976823",
"address": {
"type": [
"PostalAddress"
],
"name": "Miracle Produce",
"streetAddress": "853 Wisozk River",
"addressLocality": "New Noemyfort",
"addressRegion": "New Mexico",
"postalCode": "18047-2038",
"addressCountry": "Togo"
},
"unLocode": "DKCPH"
},
"supplier": {
"type" : ["Organization"],
"name": "Miracle Produce",
"description": "Organic fruits & vegetables",
"email": "[email protected]",
"phoneNumber": "+1-460-555-2604",
"url": "miracle.example.com"
},
"htsCode": "6603.20.3000",
"gtin": "614141007349"
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,22 @@ properties:
$linkedData:
term: auditProgramsRequested
'@id': https://www.gs1.org/voc/certificationType
countByInspector:
title: Count by Inspector
description: Whether the count of the packages was counted by the inspector.
type: boolean
$linkedData:
term: countByInspector
'@id': https://schema.org/values
extendedProduct:
title: Extended Product
description: Extended product information.
type: array
items:
$ref: ./ExtendedProduct.yml
$linkedData:
term: extendedProduct
'@id': https://www.gs1.org/voc/certificationSubject
additionalRemarks:
title: Additional Remarks
description: Any additional remarks regarding the application.
Expand Down Expand Up @@ -189,5 +205,39 @@ example: |-
"auditProgramsRequested": [
"Produce GAPs Harmonized Audit: Field Operations & Harvesting",
"Plant Systems Audit"
],
"countByInspector": true,
"extendedProduct": [
{
"type": ["ExtendedProduct"],
"origination": {
"type": [
"Place"
],
"globalLocationNumber": "5449782976823",
"address": {
"type": [
"PostalAddress"
],
"name": "Miracle Produce",
"streetAddress": "853 Wisozk River",
"addressLocality": "New Noemyfort",
"addressRegion": "New Mexico",
"postalCode": "18047-2038",
"addressCountry": "Togo"
},
"unLocode": "DKCPH"
},
"supplier": {
"type" : ["Organization"],
"name": "Miracle Produce",
"description": "Organic fruits & vegetables",
"email": "[email protected]",
"phoneNumber": "+1-460-555-2604",
"url": "miracle.example.com"
},
"htsCode": "6603.20.3000",
"gtin": "614141007349"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,9 @@ example: |-
},
"proof": {
"type": "Ed25519Signature2018",
"created": "2023-04-04T21:38:53Z",
"created": "2023-04-20T05:50:42Z",
"verificationMethod": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U#z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"proofPurpose": "assertionMethod",
"jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..NCrVGyaEDubvb5ReKCKiU6CK5KYKcOfgUE2wozM5o37ZNenrxbpReO2z-xME7VKvC25TDEeSnUCau3rZajsyCQ"
"jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..5DDErPMk272t1zoky2VfuBIPxoRp6q_SFyEZiCnpiwxd8cYNRKGyFkl8m5hccDgkfKQR39hVQk_IkdB46fWXBA"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,9 @@ example: |-
},
"proof": {
"type": "Ed25519Signature2018",
"created": "2023-04-04T21:38:58Z",
"created": "2023-04-20T05:50:44Z",
"verificationMethod": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U#z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"proofPurpose": "assertionMethod",
"jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..T9qRYE5iZPycFKUFV_kgb0uTw1RFabsDY2d4Q7_CaRkdatYuJqdDbA7dqD5Fkb0nzEaMOkODqUHkL5GBRkS6Cw"
"jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..sdUncbjXudycJCxDAJkA5XWCAN00H5R7hlMdYu3tGPrEDztfMRwlqgQYaZMzeTKoEDZ61AoT5MHEXYBc-iZBBQ"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ example: |-
},
"proof": {
"type": "Ed25519Signature2018",
"created": "2023-04-04T21:39:18Z",
"created": "2023-04-20T05:50:52Z",
"verificationMethod": "did:key:z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U#z6MktHQo3fRRohk44dsbE76CuiTpBmyMWq2VVjvV6aBSeE3U",
"proofPurpose": "assertionMethod",
"jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..ATyNemG9pm48sOITEigC1ugotbW3JdZYk4ycA33vuDc5g8qISp7TGqEdlTJSpFx83SELujocaIWfSzRYfjUCCw"
"jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19.._8ApOATCRkgBSh4p5FksMAJDSGwCMlcHnoHfrxwkj8IFiBzC-wtgUWwmyYffW4R0YVIWYf5LnBDM_WDFglV0Ag"
}
}