Skip to content

Commit 6aeff6b

Browse files
committed
project root handling change
1 parent 196f2ab commit 6aeff6b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/serverless_openapi_generator/openapi_generator.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,10 @@ def main():
427427
# Execute the Pydantic schema generation if the source is provided
428428
if args.pydantic_source:
429429
print(f"--- Running Pydantic schema generation from: {args.pydantic_source} ---")
430-
source_path = Path(args.pydantic_source)
431-
project_root = source_path.parent
430+
project_root = Path(args.pydantic_source)
432431
output_dir = project_root / "openapi_models"
433432

434-
generated_schemas = pydantic_handler.generate_dto_schemas(source_path, output_dir, project_root)
433+
generated_schemas = pydantic_handler.generate_dto_schemas(project_root, output_dir, project_root)
435434
project_meta = pydantic_handler.load_project_meta(project_root)
436435

437436
serverless_config = pydantic_handler.generate_serverless_config(generated_schemas, project_meta, project_root)

0 commit comments

Comments
 (0)