fix:yapi
This commit is contained in:
Binary file not shown.
@@ -20,22 +20,22 @@ logger = logging.getLogger(__name__)
|
||||
class ValidationResult:
|
||||
"""Validation result container"""
|
||||
|
||||
def __init__(self, is_valid: bool, errors: List[str] = None, warnings: List[str] = None):
|
||||
def __init__(self, passed: bool, errors: List[str] = None, warnings: List[str] = None):
|
||||
"""
|
||||
Initialize a validation result
|
||||
|
||||
Args:
|
||||
is_valid: Whether the data is valid according to the schema
|
||||
passed: Whether the data is valid according to the schema
|
||||
errors: List of error messages (if any)
|
||||
warnings: List of warning messages (if any)
|
||||
"""
|
||||
self.is_valid = is_valid
|
||||
self.passed = passed
|
||||
self.errors = errors or []
|
||||
self.warnings = warnings or []
|
||||
|
||||
def __str__(self) -> str:
|
||||
"""String representation of validation result"""
|
||||
status = "Valid" if self.is_valid else "Invalid"
|
||||
status = "Valid" if self.passed else "Invalid"
|
||||
result = f"Validation Result: {status}\n"
|
||||
|
||||
if self.errors:
|
||||
|
||||
Reference in New Issue
Block a user