From 44374dceb4ca686a124d1f4db679b447a0970a27 Mon Sep 17 00:00:00 2001 From: Islam ElHakmi Date: Tue, 7 Apr 2020 12:32:28 +0200 Subject: [PATCH] fix: define the types of the option using oneOf --- src/options.json | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/options.json b/src/options.json index 5524fde..1a50d75 100644 --- a/src/options.json +++ b/src/options.json @@ -7,18 +7,22 @@ }, "encoding": { "description": "Specify the encoding which the file will be in-lined with.", - "type": ["boolean", "string"], - "enum": [ - "utf8", - "utf16le", - "latin1", - "base64", - "hex", - "ascii", - "binary", - "ucs2", - true, - false + "oneOf": [ + { + "enum": [ + "utf8", + "utf16le", + "latin1", + "base64", + "hex", + "ascii", + "binary", + "ucs2" + ] + }, + { + "type": "boolean" + } ] }, "generator": {