New Feature Summary
Currently, the (experimental) workflow description generation in workflow_helper.py manually constructs nested dictionaries, and the JSON structure is documented in the docstrings. This is error-prone and lacks strict schema validation. I'm proposing to update the relevant code to use pydantic models for the output structures for benefits like
- Validation: Guarantees the output matches the defined schema.
- Type Safety: Python type hints will be accurate and enforceable.
- Automatic documentation: we can use pydantic's export feature and sphinx's plugin to auto-generate documentation directly from code so that the documentation never drifts and be outdated.
Related
No response
Alternatives
No response
Additional context
No response