From 5e220488317051bc38cc7db7b26ca4a496d67c2f Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Mon, 23 Sep 2024 16:50:13 -0700 Subject: [PATCH 01/13] add instrument of trade Signed-off-by: Brent Zundel --- .../schemas/common/AgriculturePackage.yml | 24 ++++++ .../schemas/common/InstrumentOfTrade.yml | 77 +++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 docs/openapi/components/schemas/common/InstrumentOfTrade.yml diff --git a/docs/openapi/components/schemas/common/AgriculturePackage.yml b/docs/openapi/components/schemas/common/AgriculturePackage.yml index 8d9b346d7..61f428310 100644 --- a/docs/openapi/components/schemas/common/AgriculturePackage.yml +++ b/docs/openapi/components/schemas/common/AgriculturePackage.yml @@ -111,6 +111,15 @@ properties: $linkedData: term: harvest '@id': https://w3id.org/traceability#AgricultureActivity + instrumentOfTrade: + title: Instrument of International Trade + description: The materials used for shipping the product, such as boxes, pallets, etc. + type: array + items: + $ref: ./InstrumentOfTrade.yml + $linkedData: + term: instrumentOfTrade + '@id': https://w3id.org/traceability#InstrumentOfTrade additionalProperties: true required: - type @@ -200,4 +209,19 @@ example: |- "labelImageHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" } ] + instrumentOfTrade: [ + { + "type": ["InstrumentOfTrade"], + "packagingMaterial": "wood", + "ippcStamp": { + "originCountry": "US" + "providerCode": "000" + "treatmentCode": "HT" + } + }, + { + "type": ["InstrumentOfTrade"], + "packagingMaterial": "paper" + } + ] } diff --git a/docs/openapi/components/schemas/common/InstrumentOfTrade.yml b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml new file mode 100644 index 000000000..67dcd7c2e --- /dev/null +++ b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml @@ -0,0 +1,77 @@ +$linkedData: + term: InstrumentOfTrade + '@id': https://w3id.org/traceability#InstrumentOfTrade +title: Intrument of International Trade +description: >- + The actual packaging (container, crate, pallet, etc.) which is used to + transport goods. +type: object +properties: + type: + type: array + readOnly: true + const: + - InstrumentOfTrade + default: + - IntrumentOfTrade + items: + type: string + enum: + - InstrumentOfTrade + packagingMaterial: + title: Packaging Material + description: >- + The material used for packaging the goods e.g., wood, plastic, cardboard. + type: string + ippcStamp: + title: IPPC Stamp + description: IPPC Stamp information + type: description: >- + IPPC ISPM 15 stamp information as described in + https://www.ippc.int/en/publications/640/ + type: object: + properties: + originCountry: + title: Country + description: The two-letter ISO 3166-1 alpha-2 country code. + type: string + providerCode: + title: Provider Code + description: >- + The producer/treatment provider code is a unique code assigned by the + NPPO to the producer of the wood packaging material or treatment + provider who applies the marks or the entity otherwise responsible + to the NPPO for ensuring that appropriately treated wood is used and + properly marked (shown in the examples as “000”). The number and order + of digits and/or letters are assigned by the NPPO. + type: string + treatmentCode: + title: Treatment Code + description: >- + a treatment code using the appropriate abbreviation according to ISPM + 15 (HT, DH, MB or SF). + type: string + enum: + - HT + - DH + - MB + - SF + additionalProperties: true + required: + - originCountry + - providerCode + - treatmentCode +additionalProperties: true +required: + - type + - packagingMaterial +example: |- + { + "type": ["InstrumentOfTrade"], + "packagingMaterial": "wood", + "ippcStamp": { + "originCountry": "US" + "providerCode": "000" + "treatmentCode": "HT" + } + } \ No newline at end of file From b0f4f037948b2e864041aa22bc02ab7f94bcd9b6 Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Mon, 23 Sep 2024 17:03:16 -0700 Subject: [PATCH 02/13] fix typo Signed-off-by: Brent Zundel --- docs/openapi/components/schemas/common/InstrumentOfTrade.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/openapi/components/schemas/common/InstrumentOfTrade.yml b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml index 67dcd7c2e..154f0483c 100644 --- a/docs/openapi/components/schemas/common/InstrumentOfTrade.yml +++ b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml @@ -26,7 +26,8 @@ properties: ippcStamp: title: IPPC Stamp description: IPPC Stamp information - type: description: >- + type: object + description: >- IPPC ISPM 15 stamp information as described in https://www.ippc.int/en/publications/640/ type: object: From 68eacd06b2c80b976d619fdc35d4c00f8611db3c Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Mon, 23 Sep 2024 17:08:04 -0700 Subject: [PATCH 03/13] fix typo Signed-off-by: Brent Zundel --- docs/openapi/components/schemas/common/AgriculturePackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/openapi/components/schemas/common/AgriculturePackage.yml b/docs/openapi/components/schemas/common/AgriculturePackage.yml index 61f428310..08791c983 100644 --- a/docs/openapi/components/schemas/common/AgriculturePackage.yml +++ b/docs/openapi/components/schemas/common/AgriculturePackage.yml @@ -208,7 +208,7 @@ example: |- "labelImageUrl": "https://img.example.org/033383401508/640/480/", "labelImageHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" } - ] + ], instrumentOfTrade: [ { "type": ["InstrumentOfTrade"], From e958e80e5e74ead1dab8c5fff7e0e10dee2b468a Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Mon, 23 Sep 2024 17:10:17 -0700 Subject: [PATCH 04/13] remove changes from AgriculturePackage Signed-off-by: Brent Zundel --- .../schemas/common/AgriculturePackage.yml | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/docs/openapi/components/schemas/common/AgriculturePackage.yml b/docs/openapi/components/schemas/common/AgriculturePackage.yml index 08791c983..8d9b346d7 100644 --- a/docs/openapi/components/schemas/common/AgriculturePackage.yml +++ b/docs/openapi/components/schemas/common/AgriculturePackage.yml @@ -111,15 +111,6 @@ properties: $linkedData: term: harvest '@id': https://w3id.org/traceability#AgricultureActivity - instrumentOfTrade: - title: Instrument of International Trade - description: The materials used for shipping the product, such as boxes, pallets, etc. - type: array - items: - $ref: ./InstrumentOfTrade.yml - $linkedData: - term: instrumentOfTrade - '@id': https://w3id.org/traceability#InstrumentOfTrade additionalProperties: true required: - type @@ -208,20 +199,5 @@ example: |- "labelImageUrl": "https://img.example.org/033383401508/640/480/", "labelImageHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" } - ], - instrumentOfTrade: [ - { - "type": ["InstrumentOfTrade"], - "packagingMaterial": "wood", - "ippcStamp": { - "originCountry": "US" - "providerCode": "000" - "treatmentCode": "HT" - } - }, - { - "type": ["InstrumentOfTrade"], - "packagingMaterial": "paper" - } ] } From ed9a67239926e45634b68b04288f1370188e558b Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Mon, 23 Sep 2024 17:15:28 -0700 Subject: [PATCH 05/13] remove duplicate 'description' Signed-off-by: Brent Zundel --- docs/openapi/components/schemas/common/InstrumentOfTrade.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/openapi/components/schemas/common/InstrumentOfTrade.yml b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml index 154f0483c..84414fe33 100644 --- a/docs/openapi/components/schemas/common/InstrumentOfTrade.yml +++ b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml @@ -25,7 +25,6 @@ properties: type: string ippcStamp: title: IPPC Stamp - description: IPPC Stamp information type: object description: >- IPPC ISPM 15 stamp information as described in From 9c369fa75d645b05ee9bd757f72680907743f8da Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Mon, 23 Sep 2024 17:17:44 -0700 Subject: [PATCH 06/13] fix typo Signed-off-by: Brent Zundel --- docs/openapi/components/schemas/common/InstrumentOfTrade.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/openapi/components/schemas/common/InstrumentOfTrade.yml b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml index 84414fe33..450024b1e 100644 --- a/docs/openapi/components/schemas/common/InstrumentOfTrade.yml +++ b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml @@ -29,7 +29,7 @@ properties: description: >- IPPC ISPM 15 stamp information as described in https://www.ippc.int/en/publications/640/ - type: object: + type: object properties: originCountry: title: Country From e506e4522716a69be9194939d15b09041c4bcae5 Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Mon, 23 Sep 2024 17:23:08 -0700 Subject: [PATCH 07/13] fix typo Signed-off-by: Brent Zundel --- docs/openapi/components/schemas/common/InstrumentOfTrade.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/openapi/components/schemas/common/InstrumentOfTrade.yml b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml index 450024b1e..af6ed41fd 100644 --- a/docs/openapi/components/schemas/common/InstrumentOfTrade.yml +++ b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml @@ -29,7 +29,6 @@ properties: description: >- IPPC ISPM 15 stamp information as described in https://www.ippc.int/en/publications/640/ - type: object properties: originCountry: title: Country From 539189b36267a544dc3c600861c250df4d6d1c11 Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Mon, 23 Sep 2024 17:28:28 -0700 Subject: [PATCH 08/13] fix typo Signed-off-by: Brent Zundel --- docs/openapi/components/schemas/common/InstrumentOfTrade.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/openapi/components/schemas/common/InstrumentOfTrade.yml b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml index af6ed41fd..b8de994e1 100644 --- a/docs/openapi/components/schemas/common/InstrumentOfTrade.yml +++ b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml @@ -34,7 +34,7 @@ properties: title: Country description: The two-letter ISO 3166-1 alpha-2 country code. type: string - providerCode: + providerCode: title: Provider Code description: >- The producer/treatment provider code is a unique code assigned by the From 7c9eaec98a1e441d74c1b5799df93940a5da3f6a Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Mon, 23 Sep 2024 17:34:20 -0700 Subject: [PATCH 09/13] fix typos Signed-off-by: Brent Zundel --- .../openapi/components/schemas/common/InstrumentOfTrade.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/openapi/components/schemas/common/InstrumentOfTrade.yml b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml index b8de994e1..ed00202cb 100644 --- a/docs/openapi/components/schemas/common/InstrumentOfTrade.yml +++ b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml @@ -34,7 +34,7 @@ properties: title: Country description: The two-letter ISO 3166-1 alpha-2 country code. type: string - providerCode: + providerCode: title: Provider Code description: >- The producer/treatment provider code is a unique code assigned by the @@ -69,8 +69,8 @@ example: |- "type": ["InstrumentOfTrade"], "packagingMaterial": "wood", "ippcStamp": { - "originCountry": "US" - "providerCode": "000" + "originCountry": "US", + "providerCode": "000", "treatmentCode": "HT" } } \ No newline at end of file From d18d43e7febbdfdafebb555c3f699825de0a796e Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Mon, 23 Sep 2024 17:38:37 -0700 Subject: [PATCH 10/13] add intrument of trade to agriculture package schema Signed-off-by: Brent Zundel --- .../components/schemas/common/AgriculturePackage.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/openapi/components/schemas/common/AgriculturePackage.yml b/docs/openapi/components/schemas/common/AgriculturePackage.yml index 8d9b346d7..06fee708a 100644 --- a/docs/openapi/components/schemas/common/AgriculturePackage.yml +++ b/docs/openapi/components/schemas/common/AgriculturePackage.yml @@ -111,6 +111,15 @@ properties: $linkedData: term: harvest '@id': https://w3id.org/traceability#AgricultureActivity + instrumentOfTrade: + title: Instrument of International Trade + description: The materials used for shipping the product, such as boxes, pallets, etc. + type: array + items: + $ref: ./InstrumentOfTrade.yml + $linkedData: + term: instrumentOfTrade + '@id': https://w3id.org/traceability#InstrumentOfTrade additionalProperties: true required: - type From 468fc9ec26b6f00bad97d797c8f774dca4103025 Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Mon, 23 Sep 2024 17:47:25 -0700 Subject: [PATCH 11/13] add instrument of trade to example in agriculture package Signed-off-by: Brent Zundel --- .../schemas/common/AgriculturePackage.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/openapi/components/schemas/common/AgriculturePackage.yml b/docs/openapi/components/schemas/common/AgriculturePackage.yml index 06fee708a..b21574abe 100644 --- a/docs/openapi/components/schemas/common/AgriculturePackage.yml +++ b/docs/openapi/components/schemas/common/AgriculturePackage.yml @@ -208,5 +208,20 @@ example: |- "labelImageUrl": "https://img.example.org/033383401508/640/480/", "labelImageHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" } + ], + instrumentOfTrade: [ + { + "type": ["InstrumentOfTrade"], + "packagingMaterial": "wood", + "ippcStamp": { + "originCountry": "US", + "providerCode": "000", + "treatmentCode": "HT" + } + }, + { + "type": ["InstrumentOfTrade"], + "packagingMaterial": "paper" + } ] } From 7ab77787560a28cd12737a82a90031278b5c55f6 Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Mon, 23 Sep 2024 17:48:11 -0700 Subject: [PATCH 12/13] fix typos Signed-off-by: Brent Zundel --- docs/openapi/components/schemas/common/AgriculturePackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/openapi/components/schemas/common/AgriculturePackage.yml b/docs/openapi/components/schemas/common/AgriculturePackage.yml index b21574abe..1df70888d 100644 --- a/docs/openapi/components/schemas/common/AgriculturePackage.yml +++ b/docs/openapi/components/schemas/common/AgriculturePackage.yml @@ -209,7 +209,7 @@ example: |- "labelImageHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" } ], - instrumentOfTrade: [ + "instrumentOfTrade": [ { "type": ["InstrumentOfTrade"], "packagingMaterial": "wood", From 71e0c4230979364db6e95547682bcdc9277a8231 Mon Sep 17 00:00:00 2001 From: Brent Zundel Date: Tue, 24 Sep 2024 14:47:15 -0600 Subject: [PATCH 13/13] Apply suggestions from code review Co-authored-by: Ted Thibodeau Jr --- docs/openapi/components/schemas/common/AgriculturePackage.yml | 2 +- docs/openapi/components/schemas/common/InstrumentOfTrade.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/openapi/components/schemas/common/AgriculturePackage.yml b/docs/openapi/components/schemas/common/AgriculturePackage.yml index 1df70888d..1f623e07f 100644 --- a/docs/openapi/components/schemas/common/AgriculturePackage.yml +++ b/docs/openapi/components/schemas/common/AgriculturePackage.yml @@ -112,7 +112,7 @@ properties: term: harvest '@id': https://w3id.org/traceability#AgricultureActivity instrumentOfTrade: - title: Instrument of International Trade + title: Instrument of International Trade description: The materials used for shipping the product, such as boxes, pallets, etc. type: array items: diff --git a/docs/openapi/components/schemas/common/InstrumentOfTrade.yml b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml index ed00202cb..86423e72a 100644 --- a/docs/openapi/components/schemas/common/InstrumentOfTrade.yml +++ b/docs/openapi/components/schemas/common/InstrumentOfTrade.yml @@ -21,7 +21,7 @@ properties: packagingMaterial: title: Packaging Material description: >- - The material used for packaging the goods e.g., wood, plastic, cardboard. + The material used for packaging the goods, e.g., wood, plastic, cardboard. type: string ippcStamp: title: IPPC Stamp @@ -47,7 +47,7 @@ properties: treatmentCode: title: Treatment Code description: >- - a treatment code using the appropriate abbreviation according to ISPM + A treatment code using the appropriate abbreviation according to ISPM 15 (HT, DH, MB or SF). type: string enum: