From ce2c80283ced164afc30a3a1b7651391c6447f56 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 11 Oct 2024 09:12:40 +1100 Subject: [PATCH 1/2] Bump datafoodconsortium-connector from 1.0.0.pre.alpha.12 to 1.0.0.pre.alpha.13 Changed - Use nil as default value for all types except arrays. --- Gemfile.lock | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f18294b3bb..3bd6dacdf6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -246,7 +246,7 @@ GEM activerecord (>= 5.a) database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) - datafoodconsortium-connector (1.0.0.pre.alpha.12) + datafoodconsortium-connector (1.0.0.pre.alpha.13) virtual_assembly-semantizer (~> 1.0, >= 1.0.5) date (3.3.4) debug (1.9.2) @@ -379,13 +379,14 @@ GEM bindata faraday (~> 2.0) faraday-follow_redirects - json-ld (3.3.1) + json-ld (3.3.2) htmlentities (~> 4.3) json-canonicalization (~> 1.0) link_header (~> 0.0, >= 0.0.8) multi_json (~> 1.15) rack (>= 2.2, < 4) rdf (~> 3.3) + rexml (~> 3.2) json-schema (4.1.1) addressable (>= 2.8) json_spec (1.1.5) From 3e7145934697564f1a81f2b59f7385bbf6151c84 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 11 Oct 2024 09:15:42 +1100 Subject: [PATCH 2/2] Update API doc --- swagger/dfc.yaml | 69 +++--------------------------------------------- 1 file changed, 4 insertions(+), 65 deletions(-) diff --git a/swagger/dfc.yaml b/swagger/dfc.yaml index 68e1524b1f..c1d6b6d034 100644 --- a/swagger/dfc.yaml +++ b/swagger/dfc.yaml @@ -64,8 +64,6 @@ paths: dfc-b:hasPostalCode: '20170' dfc-b:hasCity: Herndon dfc-b:hasCountry: Australia - dfc-b:latitude: 0.0 - dfc-b:longitude: 0.0 dfc-b:region: Victoria '404': description: not found @@ -94,39 +92,20 @@ paths: "@context": https://www.datafoodconsortium.org "@id": http://test.host/api/dfc/affiliate_sales_data "@type": dfc-b:Person - dfc-b:logo: '' - dfc-b:firstName: '' - dfc-b:familyName: '' dfc-b:affiliates: "@type": dfc-b:Enterprise dfc-b:hasAddress: "@type": dfc-b:Address - dfc-b:hasStreet: '' dfc-b:hasPostalCode: '20170' - dfc-b:hasCity: '' - dfc-b:hasCountry: '' - dfc-b:latitude: 0.0 - dfc-b:longitude: 0.0 - dfc-b:region: '' - dfc-b:logo: '' - dfc-b:name: '' - dfc-b:hasDescription: '' - dfc-b:VATnumber: '' dfc-b:supplies: "@type": dfc-b:SuppliedProduct - dfc-b:name: 'Product #3 - 7198' - dfc-b:description: '' + dfc-b:name: 'Product #3 - 3355' dfc-b:hasQuantity: "@type": dfc-b:QuantitativeValue dfc-b:hasUnit: dfc-m:Gram dfc-b:value: 1.0 - dfc-b:alcoholPercentage: 0.0 - dfc-b:lifetime: '' - dfc-b:usageOrStorageCondition: '' - dfc-b:totalTheoreticalStock: 0.0 dfc-b:concernedBy: "@type": dfc-b:OrderLine - dfc-b:description: '' dfc-b:quantity: "@type": dfc-b:QuantitativeValue dfc-b:hasUnit: dfc-m:Piece @@ -136,30 +115,15 @@ paths: dfc-b:value: 10.0 dfc-b:partOf: "@type": dfc-b:Order - dfc-b:orderNumber: '' - dfc-b:date: '' dfc-b:belongsTo: "@type": dfc-b:SaleSession - dfc-b:beginDate: '' - dfc-b:endDate: '' - dfc-b:quantity: 0.0 dfc-b:objectOf: "@type": dfc-b:Coordination dfc-b:coordinatedBy: "@type": dfc-b:Enterprise dfc-b:hasAddress: "@type": dfc-b:Address - dfc-b:hasStreet: '' dfc-b:hasPostalCode: '20170' - dfc-b:hasCity: '' - dfc-b:hasCountry: '' - dfc-b:latitude: 0.0 - dfc-b:longitude: 0.0 - dfc-b:region: '' - dfc-b:logo: '' - dfc-b:name: '' - dfc-b:hasDescription: '' - dfc-b:VATnumber: '' '400': description: bad request "/api/dfc/enterprises/{enterprise_id}/catalog_items": @@ -187,7 +151,6 @@ paths: "@graph": - "@id": http://test.host/api/dfc/persons/12345 "@type": dfc-b:Person - dfc-b:logo: '' dfc-b:affiliates: http://test.host/api/dfc/enterprises/10000 - "@id": http://test.host/api/dfc/enterprises/10000 "@type": dfc-b:Enterprise @@ -212,10 +175,6 @@ paths: "@type": dfc-b:QuantitativeValue dfc-b:hasUnit: dfc-m:Gram dfc-b:value: 1.0 - dfc-b:alcoholPercentage: 0.0 - dfc-b:lifetime: '' - dfc-b:usageOrStorageCondition: '' - dfc-b:totalTheoreticalStock: 0.0 ofn:spree_product_id: 90000 ofn:spree_product_uri: http://test.host/api/dfc/enterprises/10000?spree_product_id=90000 - "@id": http://test.host/api/dfc/enterprises/10000/offers/10001 @@ -396,14 +355,11 @@ paths: "@graph": - "@id": http://test.host/api/dfc/persons/12345 "@type": dfc-b:Person - dfc-b:logo: '' dfc-b:affiliates: http://test.host/api/dfc/enterprise_groups/60000 - "@id": http://test.host/api/dfc/enterprise_groups/60000 "@type": dfc-b:Enterprise - dfc-b:logo: '' dfc-b:name: Sustainable Farmers dfc-b:hasDescription: this is a group - dfc-b:VATnumber: '' dfc-b:affiliatedBy: http://test.host/api/dfc/enterprises/10000 "/api/dfc/enterprise_groups/{id}": get: @@ -429,10 +385,8 @@ paths: - "@id": http://test.host/api/dfc/enterprise_groups/60000 "@type": dfc-b:Enterprise dfc-b:hasAddress: http://test.host/api/dfc/addresses/40000 - dfc-b:logo: '' dfc-b:name: Sustainable Farmers dfc-b:hasDescription: this is a group - dfc-b:VATnumber: '' dfc-b:affiliatedBy: http://test.host/api/dfc/enterprises/10000 - "@id": http://test.host/api/dfc/addresses/40000 "@type": dfc-b:Address @@ -440,8 +394,6 @@ paths: dfc-b:hasPostalCode: '20170' dfc-b:hasCity: Herndon dfc-b:hasCountry: Australia - dfc-b:latitude: 0.0 - dfc-b:longitude: 0.0 dfc-b:region: Victoria "/api/dfc/enterprises/{id}": get: @@ -485,7 +437,6 @@ paths: dfc-b:affiliates: http://test.host/api/dfc/enterprise_groups/60000 - "@id": http://test.host/api/dfc/enterprises/10000#mainContact "@type": dfc-b:Person - dfc-b:logo: '' dfc-b:firstName: Fred dfc-b:familyName: Farmer - "@id": http://test.host/api/dfc/addresses/40000 @@ -494,8 +445,6 @@ paths: dfc-b:hasPostalCode: '20170' dfc-b:hasCity: Herndon dfc-b:hasCountry: Australia - dfc-b:latitude: 0.0 - dfc-b:longitude: 0.0 dfc-b:region: Victoria - "@id": http://test.host/api/dfc/enterprises/10000/supplied_products/10001 "@type": dfc-b:SuppliedProduct @@ -505,10 +454,7 @@ paths: "@type": dfc-b:QuantitativeValue dfc-b:hasUnit: dfc-m:Gram dfc-b:value: 1.0 - dfc-b:alcoholPercentage: 0.0 - dfc-b:lifetime: '' - dfc-b:usageOrStorageCondition: '' - dfc-b:totalTheoreticalStock: 0.0 + dfc-b:image: http://test.host/rails/active_storage/url/logo-white.png ofn:spree_product_id: 90000 ofn:spree_product_uri: http://test.host/api/dfc/enterprises/10000?spree_product_id=90000 ofn:image: http://test.host/rails/active_storage/url/logo-white.png @@ -593,7 +539,6 @@ paths: "@context": https://www.datafoodconsortium.org "@id": http://test.host/api/dfc/persons/10000 "@type": dfc-b:Person - dfc-b:logo: '' '404': description: not found "/api/dfc/enterprises/{enterprise_id}/social_medias/{name}": @@ -659,12 +604,9 @@ paths: "@type": dfc-b:QuantitativeValue dfc-b:hasUnit: dfc-m:Gram dfc-b:value: 6.0 - dfc-b:alcoholPercentage: 0.0 - dfc-b:lifetime: '' - dfc-b:usageOrStorageCondition: '' - dfc-b:totalTheoreticalStock: 0.0 ofn:spree_product_id: 90000 ofn:spree_product_uri: http://test.host/api/dfc/enterprises/10000?spree_product_id=90000 + dfc-b:image: http://test.host/rails/active_storage/url/logo-white.png ofn:image: http://test.host/rails/active_storage/url/logo-white.png requestBody: content: @@ -721,10 +663,7 @@ paths: "@type": dfc-b:QuantitativeValue dfc-b:hasUnit: dfc-m:Gram dfc-b:value: 1.0 - dfc-b:alcoholPercentage: 0.0 - dfc-b:lifetime: '' - dfc-b:usageOrStorageCondition: '' - dfc-b:totalTheoreticalStock: 0.0 + dfc-b:image: http://test.host/rails/active_storage/url/logo-white.png ofn:spree_product_id: 90000 ofn:spree_product_uri: http://test.host/api/dfc/enterprises/10000?spree_product_id=90000 ofn:image: http://test.host/rails/active_storage/url/logo-white.png