From c6bfcdbf109fba884124fae1bc2079d17645a888 Mon Sep 17 00:00:00 2001 From: Harry Ho Date: Mon, 29 Mar 2021 17:10:09 +0800 Subject: [PATCH] jsonschema: mirny: accept string enums for validating clk_sel --- .../coredevice/coredevice_generic.schema.json | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/artiq/coredevice/coredevice_generic.schema.json b/artiq/coredevice/coredevice_generic.schema.json index 00008b329..393745e22 100644 --- a/artiq/coredevice/coredevice_generic.schema.json +++ b/artiq/coredevice/coredevice_generic.schema.json @@ -364,17 +364,26 @@ "minItems": 1, "maxItems": 1 }, - "refclk": { - "type": "number", - "exclusiveMinimum": 0, + "refclk": { + "type": "number", + "exclusiveMinimum": 0, "default": 100e6 - }, - "clk_sel": { - "type": "integer", - "minimum": 0, - "maximum": 3, - "default": 0 - } + }, + "clk_sel": { + "oneOf": [ + { + "type": "integer", + "minimum": 0, + "maximum": 3, + "default": 0 + }, + { + "type": "string", + "enum": ["xo", "mmcx", "sma"], + "default": "xo" + } + ] + } }, "required": ["ports"] }