def validate_schema(self):
"""
Method to validate the JSON data against the schema
Args:
Returns:
str: An error message if schema validation fails
"""
if not self.schema:
raise ValueError("Schema has not been populated yet. Cannot validate.")
try:
jsonschema.validate(self.config, self.schema)
except jsonschema.ValidationError as e:
return e
return None
评论列表
文章目录