Commit ef638f5
refactor: Use YAML anchors for DRY $parameters schema
Replace JSON Schema $ref with YAML anchors to achieve DRY schema while
avoiding Pydantic BaseModel generation that caused MyPy type errors.
- Add YAML anchor definition (x-parameters-definition) at top of schema
- Replace 71 $ref occurrences with anchor merges (<<: *parameters-definition)
- Generated models now use Dict[str, Any] instead of ParametersProp
- All 84 MyPy errors resolved with zero code changes to model_to_component_factory.py
This approach preserves DRY in the source YAML while generating type-compatible
Python models that work seamlessly with existing code.
Co-Authored-By: AJ Steers <[email protected]>1 parent b4f0e82 commit ef638f5
File tree
2 files changed
+502
-154
lines changed- airbyte_cdk/sources/declarative
- models
2 files changed
+502
-154
lines changed
0 commit comments