From 8ff4b622d7e3e8180d6537efa5ef739fcb7ae301 Mon Sep 17 00:00:00 2001 From: Koudai Aono Date: Fri, 3 Dec 2021 03:50:17 +0900 Subject: [PATCH] Fix model file --- fastapi_code_generator/__main__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fastapi_code_generator/__main__.py b/fastapi_code_generator/__main__.py index 0330982..6631be1 100644 --- a/fastapi_code_generator/__main__.py +++ b/fastapi_code_generator/__main__.py @@ -30,6 +30,8 @@ def main( input_text: str = input_file.read() if model_file: model_path = Path(model_file).with_suffix('.py') + else: + model_path = MODEL_PATH return generate_code(input_name, input_text, output_dir, template_dir, model_path)