Skip to content

Commit

Permalink
Fix generate_code args
Browse files Browse the repository at this point in the history
  • Loading branch information
koxudaxi committed Jul 2, 2024
1 parent 2f41065 commit 311a138
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fastapi_code_generator/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def generate_code(
output_dir: Path,
template_dir: Optional[Path],
model_path: Optional[Path] = None,
enum_field_as_literal: Optional[str] = None,
custom_visitors: Optional[List[Path]] = [],
enum_field_as_literal: Optional[LiteralType] = None,
custom_visitors: Optional[List[Path]] = None,
disable_timestamp: bool = False,
generate_routers: Optional[bool] = None,
specify_tags: Optional[str] = None,
Expand All @@ -128,7 +128,8 @@ def generate_code(
template_dir = (
BUILTIN_MODULAR_TEMPLATE_DIR if generate_routers else BUILTIN_TEMPLATE_DIR
)

if not custom_visitors:
custom_visitors = []
data_model_types = get_data_model_types(output_model_type, python_version)

parser = OpenAPIParser(
Expand Down

0 comments on commit 311a138

Please sign in to comment.