From 80d0434bb361072f5863f80beddf9d94f57fcf93 Mon Sep 17 00:00:00 2001 From: Paul Pfeister Date: Mon, 6 May 2024 18:49:48 -0400 Subject: [PATCH] Require keys based on errorType value --- sherlock/resources/data.schema.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sherlock/resources/data.schema.json b/sherlock/resources/data.schema.json index a3f270d..4e4a222 100644 --- a/sherlock/resources/data.schema.json +++ b/sherlock/resources/data.schema.json @@ -69,6 +69,12 @@ "properties": { "errorType": { "const": "status_code" } } } }, + "if": { "properties": { "errorType": { "const": "message" } } }, + "then": { "required": [ "errorMsg" ] }, + "else": { + "if": { "properties": { "errorType": { "const": "response_url" } } }, + "then": { "required": [ "errorUrl" ] } + }, "additionalProperties": false } }