File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -110,8 +110,8 @@ def generate_code(
110110 output_dir : Path ,
111111 template_dir : Optional [Path ],
112112 model_path : Optional [Path ] = None ,
113- enum_field_as_literal : Optional [str ] = None ,
114- custom_visitors : Optional [List [Path ]] = [] ,
113+ enum_field_as_literal : Optional [LiteralType ] = None ,
114+ custom_visitors : Optional [List [Path ]] = None ,
115115 disable_timestamp : bool = False ,
116116 generate_routers : Optional [bool ] = None ,
117117 specify_tags : Optional [str ] = None ,
@@ -128,7 +128,8 @@ def generate_code(
128128 template_dir = (
129129 BUILTIN_MODULAR_TEMPLATE_DIR if generate_routers else BUILTIN_TEMPLATE_DIR
130130 )
131-
131+ if not custom_visitors :
132+ custom_visitors = []
132133 data_model_types = get_data_model_types (output_model_type , python_version )
133134
134135 parser = OpenAPIParser (
You can’t perform that action at this time.
0 commit comments