From 922aa7d480497e9f6f0c0bb6066010874741fe56 Mon Sep 17 00:00:00 2001 From: Garry Trinder Date: Thu, 18 Jan 2024 14:37:47 +0000 Subject: [PATCH 1/2] Update mockresponseplugin.schema.json schema --- schemas/v1.0/mockresponseplugin.schema.json | 59 ++++++++++++--------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/schemas/v1.0/mockresponseplugin.schema.json b/schemas/v1.0/mockresponseplugin.schema.json index 49212055..490257e4 100644 --- a/schemas/v1.0/mockresponseplugin.schema.json +++ b/schemas/v1.0/mockresponseplugin.schema.json @@ -5,7 +5,7 @@ "type": "object", "properties": { "$schema": { - "type":"string" + "type": "string" }, "mocks": { "type": "array", @@ -41,33 +41,40 @@ ] }, "response": { - "body": { - "type": [ - "object", - "string" - ] - }, - "code": { - "type": "integer" - }, - "headers": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": [ - "name", - "value" + "type": "object", + "properties": { + "body": { + "type": [ + "object", + "string" ] + }, + "statusCode": { + "type": "integer" + }, + "headers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ] + } } - } + }, + "required": [ + "statusCode", + "body" + ] } }, "required": [ From f3793050f5828252eaaf0b79b07e52a8e4219f5c Mon Sep 17 00:00:00 2001 From: Garry Trinder Date: Thu, 18 Jan 2024 14:43:59 +0000 Subject: [PATCH 2/2] Remove unnecessary required fields in schema files --- schemas/v1.0/genericrandomerrorplugin.schema.json | 6 +----- schemas/v1.0/mockresponseplugin.schema.json | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/schemas/v1.0/genericrandomerrorplugin.schema.json b/schemas/v1.0/genericrandomerrorplugin.schema.json index 7a199bfb..1a0a0c62 100644 --- a/schemas/v1.0/genericrandomerrorplugin.schema.json +++ b/schemas/v1.0/genericrandomerrorplugin.schema.json @@ -39,11 +39,7 @@ ] } } - }, - "required": [ - "statusCode", - "body" - ] + } } } }, diff --git a/schemas/v1.0/mockresponseplugin.schema.json b/schemas/v1.0/mockresponseplugin.schema.json index 490257e4..5eff6d1f 100644 --- a/schemas/v1.0/mockresponseplugin.schema.json +++ b/schemas/v1.0/mockresponseplugin.schema.json @@ -70,11 +70,7 @@ ] } } - }, - "required": [ - "statusCode", - "body" - ] + } } }, "required": [