From f9b3b7c923171fbc375fb8da7ee549b32b0112ea Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Wed, 29 Jul 2020 18:27:11 +0200 Subject: [PATCH] Allow multiple types on potentially empty fields An empty value is not possible to convert as int. Allowing both integer and string will ensure reception of any value. --- openkarotz-openapi.json | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/openkarotz-openapi.json b/openkarotz-openapi.json index 3660f40..3302be7 100644 --- a/openkarotz-openapi.json +++ b/openkarotz-openapi.json @@ -53,11 +53,17 @@ "description": "Nombre de phrase(s) dans le cache TTS." }, "usb_stick_free_space": { - "type": "string", + "oneOf": [ + { "type": "string"}, + { "type": "integer"} + ], "description": "Place libre sur la clé USB (Version lisible)" }, "karotz_free_Space": { - "type": "string", + "oneOf": [ + { "type": "string"}, + { "type": "integer"} + ], "description": "Place libre dans le Karotz (Version lisible)" }, "eth_mac": { @@ -89,7 +95,10 @@ "description": "Espace utilisé dans la mémoire du Karotz" }, "usb_percent_used_space": { - "type":"integer", + "oneOf": [ + { "type": "string"}, + { "type": "integer"} + ], "description": "Espace utilisé sur la clef USB" }, "data_dir": {