From 119fbd408d73fb1fbfc61759ce207b442d4cde9d Mon Sep 17 00:00:00 2001 From: Russell Hofvendahl Date: Fri, 9 Feb 2024 09:08:35 -0800 Subject: [PATCH 1/2] feat: merge ppq587 duplicates --- .../USDAPPQ587PlantImportApplication.yml | 219 ++++++++++++------ .../common/USDAPPQ587PlantImportPermit.yml | 192 --------------- docs/openapi/openapi.yml | 12 - 3 files changed, 142 insertions(+), 281 deletions(-) delete mode 100644 docs/openapi/components/schemas/common/USDAPPQ587PlantImportPermit.yml diff --git a/docs/openapi/components/schemas/common/USDAPPQ587PlantImportApplication.yml b/docs/openapi/components/schemas/common/USDAPPQ587PlantImportApplication.yml index 545e0c058..6aec6a5e9 100644 --- a/docs/openapi/components/schemas/common/USDAPPQ587PlantImportApplication.yml +++ b/docs/openapi/components/schemas/common/USDAPPQ587PlantImportApplication.yml @@ -2,7 +2,7 @@ $linkedData: term: USDAPPQ587PlantImportApplication '@id': https://w3id.org/traceability#USDAPPQ587PlantImportApplication title: USDA PPQ 587 Application for Permit to Import Plants or Plant Products -description: USDA APHIS (Animal and Plant Health Inspection Service) PPQ (Plant Protection and Quarantine) 587, Application for Permit to Import Plants or Plant Products. +description: USDA APHIS (Animal and Plant Health Inspection Service) PPQ (Plant Protection and Quarantine) 587, Application for Permit to Import Plants or Plant Products type: object properties: type: @@ -18,41 +18,34 @@ properties: - USDAPPQ587PlantImportApplication applicant: title: Applicant - description: Details regarding the person responsible for the importation. Applicant must be a United States resident. Include the organization name and address, if applicable. - $ref: ./Person.yml + description: Organization that is applying for import. + $ref: ./Organization.yml $linkedData: term: applicant '@id': https://vocabulary.uncefact.org/associatedParty - plantProductsImported: - title: Plants or Plant Products to be Imported - description: Details regarding the plants or plant products to be imported - type: array - items: - $ref: ./AgricultureProduct.yml + shipment: + title: Shipment + description: Details for the shipment of agricultural goods. + $ref: ./AgricultureParcelDelivery.yml $linkedData: - term: plantProductsImported - '@id': https://vocabulary.uncefact.org/specifiedProduct + term: shipment + '@id': https://vocabulary.uncefact.org/transportPackage intendedUse: title: Intended Use - description: 'The intended use for these plants or plant products, such as: "Plants for planting (Nursery stock)"; "Small lots of seed"; "Fruit and vegetables"; or other.' + description: >- + The intended use for the imported products. Most commonly in USDAPPQ587PlantImportApplication + this would be "plants for planting", "small lots of seed", or "fruits and vegetables". type: string $linkedData: term: intendedUse '@id': https://vocabulary.uncefact.org/intendedUse - meansOfTransportation: - title: Means of Transportation - description: 'The means of transportation for these plants or plant products, such as: "Mail or Express carrier"; "Cargo shipment"; "Personal baggage or car"; or other.' + signatureDate: + title: Signature Date + description: Date when the application was signed by applicant. type: string $linkedData: - term: meansOfTransportation - '@id': https://vocabulary.uncefact.org/usedTransportMeans - date: - title: Date - description: The date of completion for this application. - type: string - $linkedData: - term: date - '@id': https://vocabulary.uncefact.org/creationDateTime + term: signatureDate + '@id': https://vocabulary.uncefact.org/issueDateTime additionalProperties: false required: - type @@ -61,67 +54,139 @@ example: |- "type": ["USDAPPQ587PlantImportApplication"], "applicant": { "type": [ - "Person" + "Organization" + ], + "name": "Ace Foodstuffs", + "description": "Agricultural goods shipping & distribution", + "email": "Hipolito58@acefoodstuffs.org", + "phoneNumber": "+1-133-555-3764", + "faxNumber": "+1-592-555-3697" + }, + "shipment": { + "type": [ + "AgricultureParcelDelivery" ], - "firstName": "Jocelyn", - "lastName": "Grates", - "email": "jgrates@example.com", - "phoneNumber": "+1-813-555-7325", - "worksFor": { + "deliveryAddress": { "type": [ - "Organization" + "PostalAddress" ], - "name": "New Fields Foodstuff logistics", - "description": "Agricultural goods distribution", - "email": "contact@example.net", - "phoneNumber": "+1-186-555-0607", - "faxNumber": "+1-956-555-3547" + "name": "Bartell - Doyle", + "streetAddress": "84189 Roberts Route", + "addressLocality": "Kautzerstad", + "addressRegion": "Louisiana", + "postalCode": "37950-5855", + "addressCountry": "Mongolia" }, - "jobTitle": "Principal Data Supervisor" - }, - "plantProductsImported": [ - { + "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": [ - "AgricultureProduct" + "Place" ], - "plu": "94225", - "countryOfOrigin": "United States", - "product": { + "globalLocationNumber": "2184109798407", + "geo": { + "type": [ + "GeoCoordinates" + ], + "latitude": "38.8485", + "longitude": "-34.0883" + }, + "address": { "type": [ - "Product" + "PostalAddress" ], - "manufacturer": { - "type": [ - "Organization" - ], - "email": "Ashlee.Grady@example.net", - "phoneNumber": "+1-753-555-1715" - }, - "name": "Avocados", - "description": "Avocados, 4 pack boxes", - "sizeOrAmount": { - "type": [ - "QuantitativeValue" - ], - "unitCode": "hg/ha", - "value": "60" - }, - "weight": { - "type": [ - "QuantitativeValue" - ], - "unitCode": "hg/ha", - "value": "6960" - }, - "sku": "81055399441" + "name": "Mills, Daugherty and Nader", + "streetAddress": "39514 Kulas Terrace", + "addressLocality": "East Avis", + "addressRegion": "Utah", + "postalCode": "45553", + "addressCountry": "Northern Mariana Islands" }, - "plantParts": "fruit", - "scientificName": "Persea americana", - "labelImageUrl": "https://img.example.org/033383401508/640/480/", - "labelImageHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + "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-413-555-8078", + "faxNumber": "+1-625-555-7496" + }, + "agriculturePackage": [ + { + "type": [ + "AgriculturePackage" + ] + } + ], + "shipper": { + "type": ["Organization"], + "name": "Green Fields", + "description": "Growing & packaging for high quality produce", + "email": "sales@greenfields.org", + "phoneNumber": "+1-630-555-9134" + }, + "purchaser": { + "type": ["Organization"], + "name": "Ace Foodstuffs", + "description": "Agricultural goods shipping & distribution", + "email": "Hipolito58@acefoodstuffs.org", + "phoneNumber": "+1-449-555-8392", + "faxNumber": "+1-542-555-0393" + }, + "carrier": { + "type": [ + "Organization" + ], + "email": "Adaline29@example.com", + "phoneNumber": "+1-191-555-8578" + }, + "broker": { + "type": ["Organization"], + "name": "Koch LLC", + "leiCode": "54321351219389121979" } - ], - "intendedUse": "Fruits and vegetables", - "meansOfTransportation": "Cargo shipment", - "date": "2022-08-10" + }, + "signatureDate": "2021-02-16", + "intendedUse": "fruits and vegetables" } diff --git a/docs/openapi/components/schemas/common/USDAPPQ587PlantImportPermit.yml b/docs/openapi/components/schemas/common/USDAPPQ587PlantImportPermit.yml deleted file mode 100644 index 10f6b0734..000000000 --- a/docs/openapi/components/schemas/common/USDAPPQ587PlantImportPermit.yml +++ /dev/null @@ -1,192 +0,0 @@ -$linkedData: - term: USDAPPQ587PlantImportPermit - '@id': https://w3id.org/traceability#USDAPPQ587PlantImportPermit -title: USDA PPQ 587 Application for Permit to Import Plants or Plant Products -description: USDA APHIS (Animal and Plant Health Inspection Service) PPQ (Plant Protection and Quarantine) 587, Application for Permit to Import Plants or Plant Products -type: object -properties: - type: - type: array - readOnly: true - const: - - USDAPPQ587PlantImportPermit - default: - - USDAPPQ587PlantImportPermit - items: - type: string - enum: - - USDAPPQ587PlantImportPermit - applicant: - title: Applicant - description: Organization that is applying for import. - $ref: ./Organization.yml - $linkedData: - term: applicant - '@id': https://vocabulary.uncefact.org/associatedParty - shipment: - title: Shipment - description: Details for the shipment of agricultural goods. - $ref: ./AgricultureParcelDelivery.yml - $linkedData: - term: shipment - '@id': https://vocabulary.uncefact.org/transportPackage - intendedUse: - title: Intended Use - description: >- - The intended use for the imported products. Most commonly in USDAPPQ587PlantImportPermit - this would be "plants for planting", "small lots of seed", or "fruits and vegetables". - type: string - $linkedData: - term: intendedUse - '@id': https://vocabulary.uncefact.org/intendedUse - signatureDate: - title: Signature Date - description: Date when the application was signed by applicant. - type: string - $linkedData: - term: signatureDate - '@id': https://vocabulary.uncefact.org/issueDateTime -additionalProperties: false -required: - - type -example: |- - { - "type": ["USDAPPQ587PlantImportPermit"], - "applicant": { - "type": [ - "Organization" - ], - "name": "Ace Foodstuffs", - "description": "Agricultural goods shipping & distribution", - "email": "Hipolito58@acefoodstuffs.org", - "phoneNumber": "+1-133-555-3764", - "faxNumber": "+1-592-555-3697" - }, - "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-413-555-8078", - "faxNumber": "+1-625-555-7496" - }, - "agriculturePackage": [ - { - "type": [ - "AgriculturePackage" - ] - } - ], - "shipper": { - "type": ["Organization"], - "name": "Green Fields", - "description": "Growing & packaging for high quality produce", - "email": "sales@greenfields.org", - "phoneNumber": "+1-630-555-9134" - }, - "purchaser": { - "type": ["Organization"], - "name": "Ace Foodstuffs", - "description": "Agricultural goods shipping & distribution", - "email": "Hipolito58@acefoodstuffs.org", - "phoneNumber": "+1-449-555-8392", - "faxNumber": "+1-542-555-0393" - }, - "carrier": { - "type": [ - "Organization" - ], - "email": "Adaline29@example.com", - "phoneNumber": "+1-191-555-8578" - }, - "broker": { - "type": ["Organization"], - "name": "Koch LLC", - "leiCode": "54321351219389121979" - } - }, - "signatureDate": "2021-02-16", - "intendedUse": "fruits and vegetables" - } \ No newline at end of file diff --git a/docs/openapi/openapi.yml b/docs/openapi/openapi.yml index 0d7741392..01cc6fae2 100644 --- a/docs/openapi/openapi.yml +++ b/docs/openapi/openapi.yml @@ -2048,18 +2048,6 @@ paths: $ref: './components/schemas/common/USDAPPQ587PlantImportApplication.yml' - /schemas/common/USDAPPQ587PlantImportPermit.yml: - get: - tags: - - common - responses: - '200': - content: - application/yml: - schema: - $ref: './components/schemas/common/USDAPPQ587PlantImportPermit.yml' - - /schemas/common/USDASpecialtyCrops237AForm.yml: get: tags: From 79c91e44237aa6bb64d4fcf735f832b54c58e3c3 Mon Sep 17 00:00:00 2001 From: Russell Hofvendahl Date: Mon, 11 Mar 2024 10:26:25 -0700 Subject: [PATCH 2/2] feat: minor syntax update ppq587 --- .../schemas/common/USDAPPQ587PlantImportApplication.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/openapi/components/schemas/common/USDAPPQ587PlantImportApplication.yml b/docs/openapi/components/schemas/common/USDAPPQ587PlantImportApplication.yml index 6aec6a5e9..5d86cd49e 100644 --- a/docs/openapi/components/schemas/common/USDAPPQ587PlantImportApplication.yml +++ b/docs/openapi/components/schemas/common/USDAPPQ587PlantImportApplication.yml @@ -33,7 +33,7 @@ properties: intendedUse: title: Intended Use description: >- - The intended use for the imported products. Most commonly in USDAPPQ587PlantImportApplication + The intended use for the imported products. Most commonly in USDAPPQ587PlantImportApplication, this would be "plants for planting", "small lots of seed", or "fruits and vegetables". type: string $linkedData: