forked from cleveragents/cleveragents-core
2f69358dcf
All 3 simulations tested with the fixed generate prompt that passes the original DoD to the LLM. Results: - SIM12 (Rate Limiter): 7 files — algorithms.py, store.py, middleware.py, config.py, example_app.py, requirements.txt, __init__.py - SIM14 (JSON Validator): 6 files — validator.py, types.py, errors.py, cli.py, requirements.txt, __init__.py - SIM17 (API Tester): 7 files — runner.py, assertions.py, variables.py, reporter.py, cli.py, requirements.txt, test_suite_example.yaml All Python files pass compile() syntax check. All DoD files present. Files written directly via --output-dir, no manual cleanup needed.
38 lines
933 B
Python
38 lines
933 B
Python
"""JSON Schema Validator Package
|
|
|
|
A from-scratch implementation of JSON schema validation supporting:
|
|
- Basic JSON types (string, number, integer, boolean, array, object, null)
|
|
- String constraints (minLength, maxLength, pattern)
|
|
- Numeric constraints (minimum, maximum)
|
|
- Enum constraints
|
|
- Nested object and array validation
|
|
- Required field validation
|
|
- Detailed error reporting with JSON path tracking
|
|
"""
|
|
|
|
from .validator import SchemaValidator
|
|
from .errors import ValidationError
|
|
from .types import (
|
|
validate_string,
|
|
validate_number,
|
|
validate_integer,
|
|
validate_boolean,
|
|
validate_array,
|
|
validate_object,
|
|
validate_null
|
|
)
|
|
|
|
__version__ = "1.0.0"
|
|
__author__ = "JSON Schema Validator"
|
|
|
|
__all__ = [
|
|
"SchemaValidator",
|
|
"ValidationError",
|
|
"validate_string",
|
|
"validate_number",
|
|
"validate_integer",
|
|
"validate_boolean",
|
|
"validate_array",
|
|
"validate_object",
|
|
"validate_null"
|
|
] |