def get_schema_validator(self, schema_name):
if schema_name not in self.schemas:<EOL><INDENT>schema_file = self.get_schema_file(schema_name)<EOL>with open(schema_file) as f:<EOL><INDENT>try:<EOL><INDENT>jsn_schema = json.load(f)<EOL><DEDENT>except ValueError as ex:<EOL><INDENT>log.error("<STR_LIT>", schema_file)<EOL>raise ex<EOL><DEDENT><DEDENT>schemas_folder = self.get_schemas_folder()<EOL>root_schema_path = self.get_schema_path(schemas_folder)<EOL>resolver = jsonschema.RefResolver(root_schema_path, None)<EOL>self.schemas[schema_name] = (jsn_schema, resolver)<EOL><DEDENT>else:<EOL><INDENT>jsn_schema, resolver = self.schemas[schema_name]<EOL><DEDENT>validator = jsonschema.Draft4Validator(schema=jsn_schema, resolver=resolver)<EOL>return validator<EOL>
Had to remove the id property from map.json or it uses URLs for validation
See various issues at https://github.com/Julian/jsonschema/pull/306