From 712564001cad2d012cba0f692bd42438eb7a3319 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Thu, 6 Mar 2025 08:05:09 +0100 Subject: [PATCH] Tweak examples to return empty arrays as [] instead of null --- src/openapi/products/SE-products-SE.yaml | 14 +++++++------- src/openapi/products/SE-products-TP.yaml | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/openapi/products/SE-products-SE.yaml b/src/openapi/products/SE-products-SE.yaml index b2b6944..c8cd23d 100644 --- a/src/openapi/products/SE-products-SE.yaml +++ b/src/openapi/products/SE-products-SE.yaml @@ -54,7 +54,7 @@ paths: summary: List containing one product with many null attributes description: |- Most product attributes are optional on a database level and can thus be null; this example shows that all attributes as defined in the schema are always represented in the response, even if null. \ - **Empty lists/arrays show up as null, not as "[]"!** + **Empty lists/arrays show up as "[]", not as null!** value: { "Entries": [ @@ -64,8 +64,8 @@ paths: "productName": null, "productDescription": null, "productCategory": null, - "tokenTypes": null, - "sellableTouchPointIds": null, + "tokenTypes": [], + "sellableTouchPointIds": [], "amountInclTax": null, "imageReference": null, "productPageUrl": null, @@ -94,7 +94,7 @@ paths: "isTravelProduct": false, "name": "Barcode" }, - "tokenTypes": null, + "tokenTypes": [], "sellableTouchPointIds": [ 1, 2 @@ -127,7 +127,7 @@ paths: "isTravelProduct": false, "name": "Barcode" }, - "tokenTypes": null, + "tokenTypes": [], "sellableTouchPointIds": [ 3, 4 @@ -160,7 +160,7 @@ paths: "isTravelProduct": true, "name": "Afgekocht reisrecht" }, - "tokenTypes": null, + "tokenTypes": [], "sellableTouchpointIds": [ 4 ], @@ -192,7 +192,7 @@ paths: "isTravelProduct": false, "name": "Barcode" }, - "tokenTypes": null, + "tokenTypes": [], "sellableTouchPointIds": [ 3, 4 diff --git a/src/openapi/products/SE-products-TP.yaml b/src/openapi/products/SE-products-TP.yaml index 17305e4..aa34da5 100644 --- a/src/openapi/products/SE-products-TP.yaml +++ b/src/openapi/products/SE-products-TP.yaml @@ -54,7 +54,7 @@ paths: summary: List containing one product with many null attributes description: |- Most product attributes are optional on a database level and can thus be null; this example shows that all attributes as defined in the schema are always represented in the response, even if null. \ - **Empty lists/arrays show up as null, not as "[]"!** + **Empty lists/arrays show up as "[]", not as null!** value: { "Entries": [ @@ -64,8 +64,8 @@ paths: "productName": null, "productDescription": null, "productCategory": null, - "tokenTypes": null, - "sellableTouchPointIds": null, + "tokenTypes": [], + "sellableTouchPointIds": [], "amountInclTax": null, "imageReference": null, "productPageUrl": null, @@ -94,7 +94,7 @@ paths: "isTravelProduct": false, "name": "Barcode" }, - "tokenTypes": null, + "tokenTypes": [], "sellableTouchPointIds": [ 1, 2 @@ -127,7 +127,7 @@ paths: "isTravelProduct": false, "name": "Barcode" }, - "tokenTypes": null, + "tokenTypes": [], "sellableTouchPointIds": [ 3, 4 @@ -160,7 +160,7 @@ paths: "isTravelProduct": true, "name": "Afgekocht reisrecht" }, - "tokenTypes": null, + "tokenTypes": [], "sellableTouchpointIds": [ 4 ], @@ -192,7 +192,7 @@ paths: "isTravelProduct": false, "name": "Barcode" }, - "tokenTypes": null, + "tokenTypes": [], "sellableTouchPointIds": [ 3, 4