Summary
In src/utils/openapi_schema_dumper.py, the dump_openapi_schema function's models parameter is typed as a bare list, which lacks a type parameter and does not fully satisfy the coding guideline requiring complete type annotations for all function parameters. Additionally, the docstring is missing a Returns: section, which is required per project conventions and is present in the docstrings of config_dumper.py and models_dumper.py.
Affected code
- File:
src/utils/openapi_schema_dumper.py
- Function:
dump_openapi_schema(models: list, filename: str) -> None
Required changes
- Update the
models parameter annotation to a parameterized type, e.g. list[type[BaseModel]] (importing BaseModel from pydantic if not already imported).
- Add a
Returns: section to the docstring documenting the None return value, matching the style used in config_dumper.py and models_dumper.py.
Rationale
Ensures consistency with the project's coding guidelines requiring complete type annotations and full Google-style docstrings (with Parameters:, Returns:, and Raises: sections where applicable).
Acceptance criteria
models parameter has a complete, parameterized type annotation.
- Docstring includes a
Returns: section.
- No behavioral changes to
dump_openapi_schema.
References
Summary
In
src/utils/openapi_schema_dumper.py, thedump_openapi_schemafunction'smodelsparameter is typed as a barelist, which lacks a type parameter and does not fully satisfy the coding guideline requiring complete type annotations for all function parameters. Additionally, the docstring is missing aReturns:section, which is required per project conventions and is present in the docstrings ofconfig_dumper.pyandmodels_dumper.py.Affected code
src/utils/openapi_schema_dumper.pydump_openapi_schema(models: list, filename: str) -> NoneRequired changes
modelsparameter annotation to a parameterized type, e.g.list[type[BaseModel]](importingBaseModelfrompydanticif not already imported).Returns:section to the docstring documenting theNonereturn value, matching the style used inconfig_dumper.pyandmodels_dumper.py.Rationale
Ensures consistency with the project's coding guidelines requiring complete type annotations and full Google-style docstrings (with
Parameters:,Returns:, andRaises:sections where applicable).Acceptance criteria
modelsparameter has a complete, parameterized type annotation.Returns:section.dump_openapi_schema.References