Tweak examples to return empty arrays as [] instead of null

This commit is contained in:
Max Martens 2025-03-06 08:05:09 +01:00
parent cc7da9d69e
commit 712564001c
2 changed files with 14 additions and 14 deletions

View File

@ -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

View File

@ -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