Commits
Click on a commit to change the comparison rangeAdd Phase 1 of Custom Deployment SDK: Schema Converter
Implement JSON Schema to Python type converter for SDK generation.
This module converts JSON Schema definitions (from Pydantic models) to Python
type annotation strings suitable for TypedDict field definitions.
Features:
- Primitive types (string→str, integer→int, number→float, boolean→bool, null→None)
- Array/list conversion with recursive item types
- Object/dict conversion with additionalProperties variants
- Union types via anyOf/oneOf with proper flattening and deduplication
- Nullable patterns (T | None)
- Enum → Literal conversion with repr()-based escaping
- Reference resolution ($ref with #/definitions/ and #/$defs/)
- Tuple conversion via prefixItems
- Required vs optional field detection with default handling
- Circular reference detection
The converter uses bracket/quote-aware union splitting to correctly handle
nested types like `list[str | int]` and `Literal['a | b']`.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Remove errant `pytest.ini`