From bd667f5b78772897ab15a5ba2833c03306522436 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Fri, 2 Feb 2024 11:15:11 +0100 Subject: [PATCH 1/4] add listed building grades --- types/enums/PlanningConstraints.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/enums/PlanningConstraints.ts b/types/enums/PlanningConstraints.ts index 82166d7b..faf25c0d 100644 --- a/types/enums/PlanningConstraints.ts +++ b/types/enums/PlanningConstraints.ts @@ -18,6 +18,9 @@ export const PlanningDesignations = { 'flood.zone.2': 'Flood Risk Zone 2 - Medium risk', 'flood.zone.3': 'Flood Risk Zone 3 - High risk', listed: 'Listed Building', + 'listed.gradeI': 'Listed Building - Grade I', + 'listed.gradeII': 'Listed Building - Grade II', + 'listed.gradeII*': 'Listed Building - Grade II*', locallyListed: 'Locally Listed Building', monument: 'Site of a Scheduled Monument', 'nature.ASNW': 'Ancient Semi-Natural Woodland (ASNW)', From d1e0da823a603f53e0aef4ec7c90bdd7a57ac4e7 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Fri, 2 Feb 2024 11:15:52 +0100 Subject: [PATCH 2/4] generate schema --- schema/schema.json | 231 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 231 insertions(+) diff --git a/schema/schema.json b/schema/schema.json index f910edb4..2976a506 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -4056,6 +4056,75 @@ ], "type": "object" }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Listed Building - Grade I", + "type": "string" + }, + "intersects": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "listed.gradeI", + "type": "string" + } + }, + "required": [ + "description", + "intersects", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Listed Building - Grade II", + "type": "string" + }, + "intersects": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "listed.gradeII", + "type": "string" + } + }, + "required": [ + "description", + "intersects", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Listed Building - Grade II*", + "type": "string" + }, + "intersects": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "listed.gradeII*", + "type": "string" + } + }, + "required": [ + "description", + "intersects", + "value" + ], + "type": "object" + }, { "additionalProperties": false, "properties": { @@ -5132,6 +5201,168 @@ ], "type": "object" }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Listed Building - Grade I", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "intersects": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "listed.gradeI", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "intersects", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Listed Building - Grade II", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "intersects": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "listed.gradeII", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "intersects", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "description": { + "const": "Listed Building - Grade II*", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "intersects": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "listed.gradeII*", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "intersects", + "value" + ], + "type": "object" + }, { "additionalProperties": false, "properties": { From 80b62cd6bea89aceb5397ae0d32a8458155f68d2 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Mon, 5 Feb 2024 11:31:47 +0100 Subject: [PATCH 3/4] align variables to planx-new change --- types/enums/PlanningConstraints.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/enums/PlanningConstraints.ts b/types/enums/PlanningConstraints.ts index faf25c0d..b8dd4ae7 100644 --- a/types/enums/PlanningConstraints.ts +++ b/types/enums/PlanningConstraints.ts @@ -18,9 +18,9 @@ export const PlanningDesignations = { 'flood.zone.2': 'Flood Risk Zone 2 - Medium risk', 'flood.zone.3': 'Flood Risk Zone 3 - High risk', listed: 'Listed Building', - 'listed.gradeI': 'Listed Building - Grade I', - 'listed.gradeII': 'Listed Building - Grade II', - 'listed.gradeII*': 'Listed Building - Grade II*', + 'listed.grade.I': 'Listed Building - Grade I', + 'listed.grade.II': 'Listed Building - Grade II', + 'listed.grade.II*': 'Listed Building - Grade II*', locallyListed: 'Locally Listed Building', monument: 'Site of a Scheduled Monument', 'nature.ASNW': 'Ancient Semi-Natural Woodland (ASNW)', From 35ae43145b2f1c1067e66c775dfc6aa26b40418f Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Mon, 5 Feb 2024 11:33:59 +0100 Subject: [PATCH 4/4] rebuild schema json too --- schema/schema.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/schema/schema.json b/schema/schema.json index 2976a506..6c123aee 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -4068,7 +4068,7 @@ "type": "boolean" }, "value": { - "const": "listed.gradeI", + "const": "listed.grade.I", "type": "string" } }, @@ -4091,7 +4091,7 @@ "type": "boolean" }, "value": { - "const": "listed.gradeII", + "const": "listed.grade.II", "type": "string" } }, @@ -4114,7 +4114,7 @@ "type": "boolean" }, "value": { - "const": "listed.gradeII*", + "const": "listed.grade.II*", "type": "string" } }, @@ -5243,7 +5243,7 @@ "type": "boolean" }, "value": { - "const": "listed.gradeI", + "const": "listed.grade.I", "type": "string" } }, @@ -5297,7 +5297,7 @@ "type": "boolean" }, "value": { - "const": "listed.gradeII", + "const": "listed.grade.II", "type": "string" } }, @@ -5351,7 +5351,7 @@ "type": "boolean" }, "value": { - "const": "listed.gradeII*", + "const": "listed.grade.II*", "type": "string" } },