From bcce9e2fc330b9d70ea193c5a8255e8112579564 Mon Sep 17 00:00:00 2001 From: Loren Norman Date: Wed, 8 Nov 2023 15:24:44 -0500 Subject: [PATCH] try with "required" --- boards/magic_schema.json | 48 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/boards/magic_schema.json b/boards/magic_schema.json index 60dd4b9..56dbc0f 100644 --- a/boards/magic_schema.json +++ b/boards/magic_schema.json @@ -48,36 +48,36 @@ "type": "object", "required": [ "name", "type" ], "additionalProperties": false, - "properties": { - "oneOf": [ - { - "isPin": { "type": "boolean" }, + "oneOf": [ + { "required": [ "isPin" ], + "properties": { + "isPin": { "type": "boolean", "const": true }, "name": { "type": "string" }, "type": { "type": "string" }, "pinName": { "type": "string" }, "mode": { "type": "string" }, "direction": { "type": "string" } - }, - { - "isPixel": { "type": "boolean", "const": true } - }, - { - "isI2C": { "type": "boolean", "const": true } - }, - { - "isPWM": { "type": "boolean", "const": true } - }, - { - "isServo": { "type": "boolean", "const": true } - }, - { - "isUART": { "type": "boolean", "const": true } - }, - { - "isDS18X20": { "type": "boolean", "const": true } } - ] - } + }, + { "properties": { + "isPixel": { "type": "boolean", "const": true } + }}, + { "properties": { + "isI2C": { "type": "boolean", "const": true } + }}, + { "properties": { + "isPWM": { "type": "boolean", "const": true } + }}, + { "properties": { + "isServo": { "type": "boolean", "const": true } + }}, + { "properties": { + "isUART": { "type": "boolean", "const": true } + }}, + { "properties": { + "isDS18X20": { "type": "boolean", "const": true } + }} + ] } } }