From 3aeecfa24dcd1e6f906469be71b5e7b7ec4ce39e Mon Sep 17 00:00:00 2001 From: jan-karwowski <41698320+jan-karwowski@users.noreply.github.com> Date: Tue, 9 Jan 2024 18:49:38 +0100 Subject: [PATCH] Fix data types in opeanapi description (#2433) * In Openapi schema mark fields that return only date as date next_due_data and last_uset were using date-time format instead of date * In Openapi description fix type product_barcodes to be array Openapi schema should say thatn product_barcodes field in ProductDetailsResponse is an array of ProductBarcode not a single object. Make the value an array not a single field * In openapi schema fix purchased date format in stock log entry It should be just date not a date-time format. --------- Co-authored-by: Jan Karwowski --- grocy.openapi.json | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/grocy.openapi.json b/grocy.openapi.json index c21c0aa5..0f0b994b 100644 --- a/grocy.openapi.json +++ b/grocy.openapi.json @@ -4733,7 +4733,10 @@ "$ref": "#/components/schemas/Product" }, "product_barcodes": { - "$ref": "#/components/schemas/ProductBarcode" + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductBarcode" + } }, "quantity_unit_stock": { "$ref": "#/components/schemas/QuantityUnit" @@ -4753,7 +4756,7 @@ }, "last_used": { "type": "string", - "format": "date-time" + "format": "date" }, "stock_amount": { "type": "number" @@ -4763,7 +4766,7 @@ }, "next_due_date": { "type": "string", - "format": "date-time" + "format": "date" }, "last_price": { "type": "number", @@ -5326,7 +5329,7 @@ }, "purchased_date": { "type": "string", - "format": "date-time" + "format": "date" }, "used_date": { "type": "string",