From 0446779a3c14f93a9491f1be7b29a73d03c29c06 Mon Sep 17 00:00:00 2001 From: Paul Pfeister Date: Mon, 6 May 2024 19:25:38 -0400 Subject: [PATCH] Simplify schema with defs --- sherlock/resources/data.schema.json | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/sherlock/resources/data.schema.json b/sherlock/resources/data.schema.json index 62418722..f7589134 100644 --- a/sherlock/resources/data.schema.json +++ b/sherlock/resources/data.schema.json @@ -23,17 +23,8 @@ }, "tags": { "oneOf": [ - { - "type": "string", - "enum": [ "adult", "gaming" ] - }, - { - "type": "array", - "items": { - "type": "string", - "enum": [ "adult", "gaming" ] - } - } + { "$ref": "#/$defs/tag" }, + { "type": "array", "items": { "$ref": "#/$defs/tag" } } ] }, "request_method": { @@ -78,5 +69,8 @@ }, "additionalProperties": false } + }, + "$defs": { + "tag": { "type": "string", "enum": [ "adult", "gaming" ] } } }