Repository: NREL/hescore-hpxml

Issue:
Update JSON schema for townhouse walls
See https://github.com/NREL/OpenStudio-HEScore/issues/263#issuecomment-985162181

When a building has `shape: town_house`, we need to restrict the walls available:
- If `town_house_walls: back_front`, prevent `side: left` and `side: right` walls
- If `town_house_walls: back_right_front`, prevent `side: left` walls
- If `town_house_walls: back_right_left`, prevent `side: right` walls

Discussion:

Patch:
diff --git a/hescorehpxml/schemas/hescore_json.schema.json b/hescorehpxml/schemas/hescore_json.schema.json
index 41b970ea..12ee25b5 100644
--- a/hescorehpxml/schemas/hescore_json.schema.json
+++ b/hescorehpxml/schemas/hescore_json.schema.json
@@ -1,84 +1,70 @@
 {
     "$schema": "http://json-schema.org/draft-07/schema",
+    "$id": "https://github.com/NREL/hescore-hpxml/blob/master/hescorehpxml/schemas/hescore_json.schema.json",
     "type": "object",
     "title": "HEScore JSON Schema",
     "additionalProperties": false,
     "properties": {
         "building_address": {
-            "$id": "#/properties/building_address",
             "type": "object",
             "additionalProperties": false,
             "properties": {
                 "address": {
-                    "$id": "#/properties/building_address/properties/address",
                     "type": "string"
                 },
                 "city": {
-                    "$id": "#/properties/building_address/properties/city",
                     "type": "string"
                 },
                 "state": {
-                    "$id": "#/properties/building_address/properties/state",
                     "type": "string"
                 },
                 "zip_code": {
-                    "$id": "#/properties/building_address/properties/zip_code",
                     "type": "string",
                     "pattern": "^[0-9]{5}$"
                 },
                 "assessment_type": {
-                    "$id": "#/properties/building_address/properties/assessment_type",
                     "type": "string"
                 },
                 "external_building_id": {
-                    "$id": "#/properties/building_address/properties/external_building_id",
                     "type": "string",
                     "description": " Allows an organization to assign an ID to the building for that organization's internal use. This field has no impact within the HES system, except that it can be filtered on in some of the retrieve_* methods."
                 }
             }
         },
         "hpwes": {
-            "$id": "#/properties/hpwes",
             "type": "object",
             "additionalProperties": false,
             "properties": {
                 "improvement_installation_start_date": {
-                    "$id": "#/properties/building/properties/improvement_installation_start_date",
                     "type": "string",
                     "format": "date",
                     "description": "The date on which HPwES upgrade installation began, in YYYY-MM-DD format"
                 },
                 "improvement_installation_completion_date": {
-                    "$id": "#/properties/building/properties/improvement_installation_completion_date",
                     "type": "string",
                     "format": "date",
                     "description": "The date on which HPwES upgrade installation was completed, in YYYY-MM-DD format"
                 },
                 "contractor_zip_code": {
-                    "$id": "#/properties/building/properties/contractor_zip_code",
                     "type": "string",
                     "pattern": "^[0-9]{5}$",
                     "description": "Five-digit postal code of the contractor installing the HPwES upgrades"
                 },
                 "contractor_business_name": {
-                    "$id": "#/properties/building/properties/contractor_business_name",
                     "type": "string",
                     "description": "The name of the contracting business installing the HPwES upgrades"
                 },
                 "is_income_eligible_program": {
-                    "$id": "#/properties/building/properties/is_income_eligible_program",
                     "type": "boolean",
                     "description": "Whether or not the HPwES upgrades were performed for a homeowner participating in an income-eligible program"
                 }
             }
         },
         "building": {
-            "$id": "#/properties/building",
             "type": "object",
             "additionalProperties": false,
             "properties": {
                 "about": {
-                    "$id": "#/properties/building/properties/about",
                     "type": "object",
                     "required": [
                         "assessment_date",
@@ -94,85 +80,71 @@
                     "additionalProperties": false,
                     "properties": {
                         "assessment_date": {
-                            "$id": "#/properties/building/properties/about/properties/assessment_date",
                             "type": "string",
                             "format": "date",
                             "description": "Date the assessment was performed"
                         },
                         "comments": {
-                            "$id": "#/properties/building/properties/about/properties/comments",
                             "type": ["string", "null"],
                             "description": "Free text comment field"
                         },
                         "comment_api_only": {
-                            "$id": "#/properties/building/properties/about/properties/comment_api_only",
                             "type": "string",
                             "description": "Pass through field for use by api users"
                         },
                         "shape": {
-                            "$id": "#/properties/building/properties/about/properties/shape",
                             "type": "string",
                             "enum": ["rectangle", "town_house"],
                             "description": "House shape"
                         },
                         "town_house_walls": {
-                            "$id": "#/properties/building/properties/about/properties/town_house_walls",
                             "type": "string",
                             "enum": ["back_front", "back_right_front", "back_front_left"],
                             "description": "Which townhouse walls are exposed (only used if shape is town_house)"
                         },
                         "year_built": {
-                            "$id": "#/properties/building/properties/about/properties/year_built",
                             "type": "integer",
                             "minimum": 1600,
                             "description": "Year building was built"
                         },
                         "number_bedrooms": {
-                            "$id": "#/properties/building/properties/about/properties/number_bedrooms",
                             "type": "integer",
                             "minimum": 1,
                             "maximum": 10,
                             "description": "Number of bedrooms in house"
                         },
                         "num_floor_above_grade": {
-                            "$id": "#/properties/building/properties/about/properties/num_floor_above_grade",
                             "type": "integer",
                             "minimum": 1,
                             "maximum": 4,
                             "description": "Number of floors above grade"
                         },
                         "floor_to_ceiling_height": {
-                            "$id": "#/properties/building/properties/about/properties/floor_to_ceiling_height",
                             "type": "integer",
                             "minimum": 6,
                             "maximum": 12,
                             "description": "Floor to ceiling height (feet)"
                         },
                         "conditioned_floor_area": {
-                            "$id": "#/properties/building/properties/about/properties/conditioned_floor_area",
                             "type": "integer",
                             "minimum": 250,
                             "maximum": 25000,
                             "description": "Total conditioned floor area (square feet)"
                         },
                         "orientation": {
-                            "$id": "#/properties/building/properties/about/properties/orientation",
                             "type": "string",
                             "enum": ["north", "north_east", "east", "south_east", "south", "south_west", "west", "north_west"],
                             "description": "Orientation of the front door"
                         },
                         "blower_door_test": {
-                            "$id": "#/properties/building/properties/about/properties/blower_door_test",
                             "type": "boolean",
                             "description": "Was a blower door test performed on this house?"
                         },
                         "air_sealing_present": {
-                            "$id": "#/properties/building/properties/about/properties/air_sealing_present",
                             "type": "boolean",
                             "description": "Has the building been air sealed? (only used if blower_door_test is false)"
                         },
                         "envelope_leakage": {
-                            "$id": "#/properties/building/properties/about/properties/envelope_leakage",
                             "type": "integer",
                             "minimum": 0,
                             "maximum": 25000,
@@ -237,7 +209,6 @@
                     ]
                 },
                 "zone": {
-                    "$id": "#/properties/building/properties/zone",
                     "type": "object",
                     "required": [
                         "wall_construction_same",
@@ -246,14 +217,12 @@
                     "additionalProperties": false,
                     "properties": {
                         "zone_roof": {
-                            "$id": "#/properties/building/properties/zone/properties/zone_roof",
                             "type": "array",
                             "description": "Inputs about the construction of the roof(s)",
                             "additionalItems": false,
                             "minItems": 0,
                             "maxItems": 2,
                             "items": {
-                                "$id": "#/properties/building/properties/zone/properties/zone_roof/items",
                                 "type": "object",
                                 "required": [
                                     "roof_name"
@@ -261,20 +230,17 @@
                                 "additionalProperties": false,
                                 "properties": {
                                     "roof_name": {
-                                        "$id": "#/properties/building/properties/zone/properties/zone_roof/items/properties/roof_name",
                                         "type": "string",
                                         "enum": ["roof1", "roof2"],
                                         "description": "Name of this roof instance"
                                     },
                                     "roof_area": {
-                                        "$id": "#/properties/building/properties/zone/properties/zone_roof/items/properties/roof_area",
                                         "type": "number",
                                         "minimum": 1,
                                         "maximum": 25000,
                                         "description": "Area of this roof element"
                                     },
                                     "roof_assembly_code": {
-                                        "$id": "#/properties/building/properties/zone/properties/zone_roof/items/properties/roof_assembly_code",
                                         "type": "string",
                                         "enum": ["rfwf00co", "rfwf00wo", "rfwf00rc", "rfwf00lc", "rfwf00tg",
                                                  "rfwf11co", "rfwf11wo", "rfwf11rc", "rfwf11lc", "rfwf11tg",
@@ -294,26 +260,22 @@
                                         "description": "Roof construction assembly code"
                                     },
                                     "roof_color": {
-                                        "$id": "#/properties/building/properties/zone/properties/zone_roof/items/properties/roof_color",
                                         "type": "string",
                                         "enum": ["white", "light", "medium", "medium_dark", "dark", "cool_color"],
                                         "description": "Color of roof exterior surface"
                                     },
                                     "roof_absorptance": {
-                                        "$id": "#/properties/building/properties/zone/properties/zone_roof/items/properties/roof_absorptance",
                                         "type": "number",
                                         "minimum": 0,
                                         "maximum": 1,
                                         "description": "Absorptance of exterior surface (only used if roof_color is cool_color)"
                                     },
                                     "roof_type": {
-                                        "$id": "#/properties/building/properties/zone/properties/zone_roof/items/properties/roof_type",
                                         "type": "string",
                                         "enum": ["vented_attic", "cond_attic", "cath_ceiling"],
                                         "description": "Type of roof"
                                     },
                                     "ceiling_assembly_code": {
-                                        "$id": "#/properties/building/properties/zone/properties/zone_roof/items/properties/ceiling_assembly_code",
                                         "type": "string",
                                         "enum": ["ecwf00", "ecwf03", "ecwf06", "ecwf09", "ecwf11", "ecwf19",
                                                  "ecwf21", "ecwf25", "ecwf30", "ecwf38", "ecwf44", "ecwf49",
@@ -321,26 +283,22 @@
                                         "description": "Ceiling construction assembly code (required unless roof_type is cath_ceiling)"
                                     },
                                     "zone_skylight": {
-                                        "$id": "#/properties/building/properties/zone/properties/zone_roof/items/properties/zone_skylight",
                                         "type": "object",
                                         "description": "Inputs about the skylights on this roof",
                                         "additionalProperties": false,
                                         "properties": {
                                             "skylight_area": {
-                                                "$id": "#/properties/building/properties/zone/properties/zone_roof/items/properties/zone_skylight/properties/skylight_area",
                                                 "type": "number",
                                                 "minimum": 0,
                                                 "maximum": 300,
                                                 "description": "Area of skylights (square feet)"
                                             },
                                             "skylight_method": {
-                                                "$id": "#/properties/building/properties/zone/properties/zone_roof/items/properties/zone_skylight/properties/skylight_method",
                                                 "type": "string",
                                                 "enum": ["code", "custom"],
                                                 "description": "Construction method to use for skylights"
                                             },
                                             "skylight_code": {
-                                                "$id": "#/properties/building/properties/zone/properties/zone_roof/items/properties/zone_skylight/properties/skylight_code",
                                                 "type": "string",
                                                 "enum": ["scna", "scnw", "stna", "stnw", "dcaa", "dcab", "dcaw",
                                                          "dtaa", "dtab", "dtaw", "dpeaw", "dpeaab", "dpeaaw",
@@ -348,21 +306,18 @@
                                                 "description": "Assembly code for skylights (only used if skylight_method is code)"
                                             },
                                             "skylight_u_value": {
-                                                "$id": "#/properties/building/properties/zone/properties/zone_roof/items/properties/zone_skylight/properties/skylight_u_value",
                                                 "type": "number",
                                                 "minimum": 0.01,
                                                 "maximum": 5,
                                                 "description": "U-value of skylights (Btu/sf-hr-F) (only used if skylight_method is custom)"
                                             },
                                             "skylight_shgc": {
-                                                "$id": "#/properties/building/properties/zone/properties/zone_roof/items/properties/zone_skylight/properties/skylight_shgc",
                                                 "type": "number",
                                                 "exclusiveMinimum": 0,
                                                 "exclusiveMaximum": 1,
                                                 "description": "Solar heat gain coefficient of skylights (only used if skylight_method is custom)"
                                             },
                                             "solar_screen": {
-                                                "$id": "#/properties/building/properties/zone/properties/zone_roof/items/properties/zone_skylight/properties/solar_screen",
                                                 "type": "boolean",
                                                 "description": "Does this window have a solar screen?"
                                             }
@@ -501,7 +456,6 @@
                             }
                         },
                         "zone_floor": {
-                            "$id": "#/properties/building/properties/zone/properties/zone_floor",
                             "type": "array",
                             "description": "Inputs about the construction of the floor(s)",
                             "additionalItems": false,
@@ -515,33 +469,28 @@
                                 "additionalProperties": false,
                                 "properties": {
                                     "floor_name": {
-                                        "$id": "#/properties/building/properties/zone/properties/zone_floor/items/properties/floor_name",
                                         "type": "string",
                                         "enum": ["floor1", "floor2"],
                                         "description": "Name of this floor instance"
                                     },
                                     "floor_area": {
-                                        "$id": "#/properties/building/properties/zone/properties/zone_floor/items/properties/floor_area",
                                         "type": "number",
                                         "minimum": 1,
                                         "maximum": 25000,
                                         "description": "Area of this foundation type"
                                     },
                                     "foundation_type": {
-                                        "$id": "#/properties/building/properties/zone/properties/zone_floor/items/properties/foundation_type",
                                         "type": "string",
                                         "enum": ["uncond_basement", "cond_basement", "vented_crawl", "unvented_crawl", "slab_on_grade"],
                                         "description": "Type of foundation"
                                     },
                                     "foundation_insulation_level": {
-                                        "$id": "#/properties/building/properties/zone/properties/zone_floor/items/properties/foundation_insulation_level",
                                         "type": "integer",
                                         "minimum": 0,
                                         "maximum": 19,
                                         "description": "Foundation wall / slab edge insulation R-value (sf-hr-F/Btu)"
                                     },
                                     "floor_assembly_code": {
-                                        "$id": "#/properties/building/properties/zone/properties/zone_floor/items/properties/floor_assembly_code",
                                         "type": "string",
                                         "enum": ["efwf00ca", "efwf11ca", "efwf13ca", "efwf15ca", "efwf19ca",
                                                  "efwf21ca", "efwf25ca", "efwf30ca", "efwf38ca"],
@@ -596,12 +545,10 @@
                             }
                         },
                         "wall_construction_same": {
-                            "$id": "#/properties/building/properties/zone/properties/wall_construction_same",
                             "type": "boolean",
                             "description": "Do all the walls have the same construction?"
                         },
                         "window_construction_same": {
-                            "$id": "#/properties/building/properties/zone/properties/window_construction_same",
                             "type": "boolean",
                             "description": "Do all the windows have the same construction?"
                         },
@@ -617,7 +564,6 @@
                                 "additionalProperties": false,
                                 "properties": {
                                     "side": {
-                                        "$id": "#side",
                                         "type": "string",
                                         "enum": ["front", "back", "right", "left"],
                                         "description": "Side this wall faces"
@@ -699,18 +645,15 @@
                     }
                 },
                 "systems": {
-                    "$id": "#/properties/building/properties/systems",
                     "type": "object",
                     "additionalProperties": false,
                     "properties": {
                         "hvac": {
-                            "$id": "#/properties/building/properties/systems/properties/hvac",
                             "type": "array",
                             "additionalItems": false,
                             "minItems": 0,
                             "maxItems": 2,
                             "items": {
-                                "$id": "#/properties/building/properties/systems/properties/hvac/items/",
                                 "type": "object",
                                 "required": [
                                     "hvac_name"
@@ -718,13 +661,11 @@
                                 "additionalProperties": false,
                                 "properties": {
                                     "hvac_name": {
-                                        "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/hvac_name",
                                         "type": "string",
                                         "enum": ["hvac1", "hvac2"],
                                         "description": "Name of this system instance"
                                     },
                                     "hvac_fraction": {
-                                        "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/hvac_fraction",
                                         "type": "number",
                                         "minimum": 0,
                                         "maximum": 1,
@@ -736,43 +677,36 @@
                                         }
                                     },
                                     "heating": {
-                                        "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/heating",
                                         "type": "object",
                                         "description": "Inputs about the heating system",
                                         "additionalProperties": false,
                                         "properties": {
                                             "type": {
-                                                "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/heating/properties/type",
                                                 "type": "string",
                                                 "enum": ["heat_pump", "central_furnace", "wall_furnace", "baseboard", 
                                                          "boiler", "gchp", "wood_stove", "mini_split", "none"],
                                                 "description": "Heating equipment type"
                                             },
                                             "fuel_primary": {
-                                                "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/heating/properties/fuel_primary",
                                                 "type": "string",
                                                 "enum": ["electric", "natural_gas", "lpg", "fuel_oil", "cord_wood", "pellet_wood"],
                                                 "description": "Primary heating fuel"
                                             },
                                             "efficiency_method": {
-                                                "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/heating/properties/efficiency_method",
                                                 "type": "string",
                                                 "enum": ["user", "shipment_weighted"],
                                                 "description": "Method to determine heating efficiency"
                                             },
                                             "year": {
-                                                "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/heating/properties/year",
                                                 "type": "integer",
                                                 "minimum": 1970,
                                                 "description": "Year equipment was manufactured (only used if efficiency_method is shipment_weighted)"
                                             },
                                             "efficiency": {
-                                                "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/heating/properties/efficiency",
                                                 "type": "number",
                                                 "$comment": "Additional requirements for this property apply based on the heating system type"
                                             },
                                             "efficiency_level": {
-                                                "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/heating/properties/efficiency_level",
                                                 "type": "string",
                                                 "enum": ["energy_star"],
                                                 "description": "Efficiency level upgrade of the heating system (Optional)"
@@ -853,36 +787,30 @@
                                         ]
                                     },
                                     "cooling": {
-                                        "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/cooling",
                                         "type": "object",
                                         "description": "Inputs about the cooling system",
                                         "additionalProperties": false,
                                         "properties": {
                                             "type": {
-                                                "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/cooling/properties/type",
                                                 "type": "string",
                                                 "enum": ["packaged_dx", "split_dx", "heat_pump", "gchp", "dec", "mini_split", "none"],
                                                 "description": "Cooling equipment type"
                                             },
                                             "efficiency_method": {
-                                                "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/cooling/properties/efficiency_method",
                                                 "type": "string",
                                                 "enum": ["user", "shipment_weighted"],
                                                 "description": "Method to determine cooling efficiency"
                                             },
                                             "year": {
-                                                "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/cooling/properties/year",
                                                 "type": "integer",
                                                 "minimum": 1970,
                                                 "description": "Year equipment was manufactured (only used if efficiency_method is shipment_weighted)"
                                             },
                                             "efficiency": {
-                                                "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/cooling/properties/efficiency",
                                                 "type": "number",
                                                 "$comment": "Additional requirements for this property apply based on the cooling system type"
                                             },
                                             "efficiency_level": {
-                                                "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/cooling/properties/efficiency_level",
                                                 "type": "string",
                                                 "enum": ["energy_star"],
                                                 "description": "Efficiency level upgrade of the cooling system (Optional)"
@@ -1723,43 +1651,36 @@
                                 ],
                                 "definitions": {
                                     "def_hvac_distribution": {
-                                        "$id": "#/properties/building/properties/systems/properties/hvac/items/definitions/def_hvac_distribution",
                                         "type": "array",
                                         "description": "Inputs about the ducts",
                                         "additionalItems": false,
                                         "minItems": 0,
                                         "maxItems": 3,
                                         "items": {
-                                            "$id": "#/properties/building/properties/systems/properties/hvac/items/definitions/def_hvac_distribution_items",
                                             "type": "object",
                                             "additionalProperties": false,
                                             "properties": {
                                                 "name": {
-                                                    "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/hvac_distribution/items/properties/name",
                                                     "type": "string",
                                                     "enum": ["duct1", "duct2", "duct3"],
                                                     "description": "Name of distribution system"
                                                 },
                                                 "location": {
-                                                    "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/hvac_distribution/items/properties/location",
                                                     "type": "string",
                                                     "enum": ["cond_space", "uncond_basement", "unvented_crawl", "vented_crawl", "uncond_attic"],
                                                     "description": "Location of distribution system"
                                                 },
                                                 "fraction": {
-                                                    "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/hvac_distribution/items/properties/fraction",
                                                     "type": "number",
                                                     "minimum": 0,
                                                     "maximum": 1,
                                                     "description": "Fraction of total duct length"
                                                 },
                                                 "insulated": {
-                                                    "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/hvac_distribution/items/properties/insulated",
                                                     "type": "boolean",
                                                     "description": "Are the ducts insulated?"
                                                 },
                                                 "sealed": {
-                                                    "$id": "#/properties/building/properties/systems/properties/hvac/items/properties/hvac_distribution/items/properties/sealed",
                                                     "type": "boolean",
                                                     "description": "Are the ducts sealed?"
                                                 }
@@ -1786,7 +1707,6 @@
                             }
                         },
                         "domestic_hot_water": {
-                            "$id": "#/properties/building/properties/systems/properties/domestic_hot_water",
                             "type": "object",
                             "required": [
                                 "category",
@@ -1795,42 +1715,35 @@
                             "additionalProperties": false,
                             "properties": {
                                 "category": {
-                                    "$id": "#/properties/building/properties/systems/properties/domestic_hot_water/properties/category",
                                     "type": "string",
                                     "enum": ["unit", "combined"],
                                     "description": "Water heater category"
                                 },
                                 "type": {
-                                    "$id": "#/properties/building/properties/systems/properties/domestic_hot_water/properties/type",
                                     "type": "string",
                                     "enum": ["storage", "indirect", "tankless_coil", "tankless", "heat_pump"],
                                     "description": "Water heater type"
                                 },
                                 "fuel_primary": {
-                                    "$id": "#/properties/building/properties/systems/properties/domestic_hot_water/properties/fuel_primary",
                                     "type": "string",
                                     "enum": ["electric", "natural_gas", "lpg", "fuel_oil"],
                                     "description": "Primary water heater fuel"
                                 },
                                 "efficiency_method": {
-                                    "$id": "#/properties/building/properties/systems/properties/domestic_hot_water/properties/efficiency_method",
                                     "type": "string",
                                     "enum": ["user", "uef", "shipment_weighted"],
                                     "description": "Method to determine water heater efficiency"
                                 },
                                 "year": {
-                                    "$id": "#/properties/building/properties/systems/properties/domestic_hot_water/properties/year",
                                     "type": "integer",
                                     "minimum": 1972,
                                     "description": "Year water heater was manufactured (only used if efficiency_method is shipment_weighted)"
                                 },
                                 "energy_factor": {
-                                    "$id": "#/properties/building/properties/systems/properties/domestic_hot_water/properties/energy_factor",
                                     "type": "number",
                                     "description": "Energy factor of water heater (only used if efficiency_method is user or uef)"
                                 },
                                 "efficiency_level": {
-                                    "$id": "#/properties/building/properties/systems/properties/domestic_hot_water/properties/efficiency_level",
                                     "type": "string",
                                     "enum": ["energy_star"],
                                     "description": "Efficiency level upgrade of the domestic hot water system (Optional)"
@@ -1979,48 +1892,40 @@
                             ]
                         },
                         "generation": {
-                            "$id": "#/properties/building/properties/systems/properties/generation",
                             "type": "object",
                             "additionalProperties": false,
                             "properties": {
                                 "solar_electric": {
-                                    "$id": "#/properties/building/properties/systems/properties/generation/items/properties/solar_electric",
                                     "type": "object",
                                     "additionalProperties": false,
                                     "properties": {
                                         "capacity_known": {
-                                            "$id": "#/properties/building/properties/systems/properties/generation/items/properties/solar_electric/capacity_known",
                                             "type": "boolean",
                                             "description": "Is the capacity known?"
                                         },
                                         "system_capacity": {
-                                            "$id": "#/properties/building/properties/systems/properties/generation/items/properties/solar_electric/system_capacity",
                                             "type": "number",
                                             "minimum": 0.05,
                                             "maximum": 100,
                                             "description": "DC capacity of system (kW) (only used if capacity_known is true)"
                                         },
                                         "num_panels": {
-                                            "$id": "#/properties/building/properties/systems/properties/generation/items/properties/solar_electric/num_panels",
                                             "type": "integer",
                                             "minimum": 1,
                                             "maximum": 100,
                                             "description": "Number of panels in the system (only used if capacity_known is false)"
                                         },
                                         "year": {
-                                            "$id": "#/properties/building/properties/systems/properties/generation/items/properties/solar_electric/year",
                                             "type": "integer",
                                             "minimum": 2000,
                                             "description": "Year system was installed"
                                         },
                                         "array_azimuth": {
-                                            "$id": "#/properties/building/properties/systems/properties/generation/items/properties/solar_electric/array_azimuth",
                                             "type": "string",
                                             "enum": ["north", "north_east", "east", "south_east", "south", "south_west", "west", "north_west"],
                                             "description": "Direction panels face"
                                         },
                                         "array_tilt": {
-                                            "$id": "#/properties/building/properties/systems/properties/generation/items/properties/solar_electric/array_tilt",
                                             "type": "string",
                                             "enum": ["flat", "low_slope", "medium_slope", "steep_slope"],
                                             "description": "Tilt of panels"
@@ -2599,6 +2504,28 @@
             },
             "error_msg": "zone_wall/side[\"left\"] requires \"side\" and \"wall_assembly_code\""
         },
+        "def_right_wall_not_allowed_constraint": {
+            "not": {
+                "contains": {
+                    "properties": {
+                        "side": {"const": "right"}
+                    },
+                    "required": ["side"]
+                }
+            },
+            "error_msg": "zone_wall/side[\"right\"] not allowed"
+        },
+        "def_left_wall_not_allowed_constraint": {
+            "not": {
+                "contains": {
+                    "properties": {
+                        "side": {"const": "left"}
+                    },
+                    "required": ["side"]
+                }
+            },
+            "error_msg": "zone_wall/side[\"left\"] not allowed"
+        },
         "def_back_wall_has_same_construction_constraint": {
             "contains": {
                 "properties": {
@@ -3134,6 +3061,7 @@
                 {"$ref": "#/definitions/def_front_wall_constraint"},
                 {"$ref": "#/definitions/def_back_wall_has_same_construction_constraint"},
                 {"$ref": "#/definitions/def_right_wall_has_same_construction_constraint"},
+                {"$ref": "#/definitions/def_left_wall_not_allowed_constraint"},
                 {"$ref": "#/definitions/def_front_window_constraint"}
             ]
         },
@@ -3142,6 +3070,7 @@
                 {"$ref": "#/definitions/def_front_wall_constraint"},
                 {"$ref": "#/definitions/def_back_wall_has_same_construction_constraint"},
                 {"$ref": "#/definitions/def_right_wall_has_same_construction_constraint"},
+                {"$ref": "#/definitions/def_left_wall_not_allowed_constraint"},
                 {"$ref": "#/definitions/def_front_window_constraint"},
                 {"$ref": "#/definitions/def_back_window_constraint"},
                 {"$ref": "#/definitions/def_right_window_constraint"}
@@ -3152,6 +3081,7 @@
                 {"$ref": "#/definitions/def_front_wall_constraint"},
                 {"$ref": "#/definitions/def_back_wall_constraint"},
                 {"$ref": "#/definitions/def_right_wall_constraint"},
+                {"$ref": "#/definitions/def_left_wall_not_allowed_constraint"},
                 {"$ref": "#/definitions/def_front_window_constraint"}
             ]
         },
@@ -3160,6 +3090,7 @@
                 {"$ref": "#/definitions/def_front_wall_constraint"},
                 {"$ref": "#/definitions/def_back_wall_constraint"},
                 {"$ref": "#/definitions/def_right_wall_constraint"},
+                {"$ref": "#/definitions/def_left_wall_not_allowed_constraint"},
                 {"$ref": "#/definitions/def_front_window_constraint"},
                 {"$ref": "#/definitions/def_back_window_constraint"},
                 {"$ref": "#/definitions/def_right_window_constraint"}
@@ -3170,6 +3101,7 @@
                 {"$ref": "#/definitions/def_front_wall_constraint"},
                 {"$ref": "#/definitions/def_back_wall_has_same_construction_constraint"},
                 {"$ref": "#/definitions/def_left_wall_has_same_construction_constraint"},
+                {"$ref": "#/definitions/def_right_wall_not_allowed_constraint"},
                 {"$ref": "#/definitions/def_front_window_constraint"}
             ]
         },
@@ -3178,6 +3110,7 @@
                 {"$ref": "#/definitions/def_front_wall_constraint"},
                 {"$ref": "#/definitions/def_back_wall_has_same_construction_constraint"},
                 {"$ref": "#/definitions/def_left_wall_has_same_construction_constraint"},
+                {"$ref": "#/definitions/def_right_wall_not_allowed_constraint"},
                 {"$ref": "#/definitions/def_front_window_constraint"},
                 {"$ref": "#/definitions/def_back_window_constraint"},
                 {"$ref": "#/definitions/def_left_window_constraint"}
@@ -3188,6 +3121,7 @@
                 {"$ref": "#/definitions/def_front_wall_constraint"},
                 {"$ref": "#/definitions/def_back_wall_constraint"},
                 {"$ref": "#/definitions/def_left_wall_constraint"},
+                {"$ref": "#/definitions/def_right_wall_not_allowed_constraint"},
                 {"$ref": "#/definitions/def_front_window_constraint"}
             ]
         },
@@ -3196,6 +3130,7 @@
                 {"$ref": "#/definitions/def_front_wall_constraint"},
                 {"$ref": "#/definitions/def_back_wall_constraint"},
                 {"$ref": "#/definitions/def_left_wall_constraint"},
+                {"$ref": "#/definitions/def_right_wall_not_allowed_constraint"},
                 {"$ref": "#/definitions/def_front_window_constraint"},
                 {"$ref": "#/definitions/def_back_window_constraint"},
                 {"$ref": "#/definitions/def_left_window_constraint"}
@@ -3205,6 +3140,8 @@
             "allOf": [
                 {"$ref": "#/definitions/def_front_wall_constraint"},
                 {"$ref": "#/definitions/def_back_wall_has_same_construction_constraint"},
+                {"$ref": "#/definitions/def_left_wall_not_allowed_constraint"},
+                {"$ref": "#/definitions/def_right_wall_not_allowed_constraint"},
                 {"$ref": "#/definitions/def_front_window_constraint"}
             ]
         },
@@ -3212,6 +3149,8 @@
             "allOf": [
                 {"$ref": "#/definitions/def_front_wall_constraint"},
                 {"$ref": "#/definitions/def_back_wall_has_same_construction_constraint"},
+                {"$ref": "#/definitions/def_left_wall_not_allowed_constraint"},
+                {"$ref": "#/definitions/def_right_wall_not_allowed_constraint"},
                 {"$ref": "#/definitions/def_front_window_constraint"},
                 {"$ref": "#/definitions/def_back_window_constraint"}
             ]
@@ -3220,6 +3159,8 @@
             "allOf": [
                 {"$ref": "#/definitions/def_front_wall_constraint"},
                 {"$ref": "#/definitions/def_back_wall_constraint"},
+                {"$ref": "#/definitions/def_left_wall_not_allowed_constraint"},
+                {"$ref": "#/definitions/def_right_wall_not_allowed_constraint"},
                 {"$ref": "#/definitions/def_front_window_constraint"}
             ]
         },
@@ -3227,6 +3168,8 @@
             "allOf": [
                 {"$ref": "#/definitions/def_front_wall_constraint"},
                 {"$ref": "#/definitions/def_back_wall_constraint"},
+                {"$ref": "#/definitions/def_left_wall_not_allowed_constraint"},
+                {"$ref": "#/definitions/def_right_wall_not_allowed_constraint"},
                 {"$ref": "#/definitions/def_front_window_constraint"},
                 {"$ref": "#/definitions/def_back_window_constraint"}
             ]


Test patch:
diff --git a/tests/test_schema.py b/tests/test_schema.py
index 345af60a..6727078c 100644
--- a/tests/test_schema.py
+++ b/tests/test_schema.py
@@ -307,6 +307,12 @@ def test_invalid_wall(hpxml_filebase):
         assert '\"wall_assembly_code\" is not allowed for zone_wall/side[\"back\"]' in errors
         assert '\"wall_assembly_code\" is not allowed for zone_wall/side[\"right\"]' in errors
 
+    if hpxml_filebase == 'townhouse_walls':
+        js3 = copy.deepcopy(js)
+        js3['building']['zone']['zone_wall'].append({'side': 'right'})
+        errors = get_error_messages(js3, js_schema)
+        assert 'zone_wall/side[\"right\"] not allowed' in errors
+
 
 @pytest.mark.parametrize('hpxml_filebase', hescore_examples)
 def test_invalid_window(hpxml_filebase):