From 1fd075717b1c99519b47b888abef057845a4b1ad Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Thu, 28 Sep 2023 20:17:24 +0200 Subject: [PATCH] siteContact required across all app types --- schema/schema.json | 123 +++++++++++++++++---------------- types/schema/data/Applicant.ts | 2 +- 2 files changed, 65 insertions(+), 60 deletions(-) diff --git a/schema/schema.json b/schema/schema.json index f2129bdd..4467656c 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -1,7 +1,7 @@ { - "$id": "@next", + "$id": "--no-top-ref", + "$ref": "#/definitions/Schema", "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, "definitions": { "AddressInput": { "$id": "#AddressInput", @@ -88,6 +88,7 @@ "address", "agent", "contact", + "siteContact", "type" ], "type": "object" @@ -857,7 +858,8 @@ "required": [ "type", "contact", - "address" + "address", + "siteContact" ], "type": "object" }, @@ -12810,6 +12812,64 @@ ], "description": "An individual result of this application" }, + "Schema": { + "additionalProperties": false, + "description": "Root of PlanX's Digital Planning Schema", + "properties": { + "data": { + "additionalProperties": false, + "properties": { + "applicant": { + "$ref": "#/definitions/Applicant" + }, + "application": { + "$ref": "#/definitions/Application" + }, + "property": { + "$ref": "#/definitions/Property" + }, + "proposal": { + "$ref": "#/definitions/Proposal" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "required": [ + "applicant", + "property", + "application", + "proposal", + "user" + ], + "type": "object" + }, + "files": { + "items": { + "$ref": "#/definitions/File" + }, + "type": "array" + }, + "metadata": { + "$ref": "#/definitions/Metadata" + }, + "responses": { + "$ref": "#/definitions/Responses" + }, + "result": { + "$ref": "#/definitions/Result" + } + }, + "required": [ + "data", + "result", + "metadata", + "responses", + "files" + ], + "title": "Digital Planning Data Schema", + "type": "object" + }, "SiteContact": { "$id": "#SiteContact", "anyOf": [ @@ -13005,60 +13065,5 @@ ], "type": "object" } - }, - "description": "Root of PlanX's Digital Planning Schema", - "properties": { - "data": { - "additionalProperties": false, - "properties": { - "applicant": { - "$ref": "#/definitions/Applicant" - }, - "application": { - "$ref": "#/definitions/Application" - }, - "property": { - "$ref": "#/definitions/Property" - }, - "proposal": { - "$ref": "#/definitions/Proposal" - }, - "user": { - "$ref": "#/definitions/User" - } - }, - "required": [ - "applicant", - "property", - "application", - "proposal", - "user" - ], - "type": "object" - }, - "files": { - "items": { - "$ref": "#/definitions/File" - }, - "type": "array" - }, - "metadata": { - "$ref": "#/definitions/Metadata" - }, - "responses": { - "$ref": "#/definitions/Responses" - }, - "result": { - "$ref": "#/definitions/Result" - } - }, - "required": [ - "data", - "result", - "metadata", - "responses", - "files" - ], - "title": "Digital Planning Data Schema", - "type": "object" + } } \ No newline at end of file diff --git a/types/schema/data/Applicant.ts b/types/schema/data/Applicant.ts index fdfbbde6..55a4a09a 100644 --- a/types/schema/data/Applicant.ts +++ b/types/schema/data/Applicant.ts @@ -16,7 +16,7 @@ export interface BaseApplicant { interest?: 'owner.sole' | 'owner.co' | 'tenant' | 'occupier'; contact: UserContact; address: UserAddress; - siteContact?: SiteContact; + siteContact: SiteContact; } /**