diff --git a/fastapi_gateway_auto_generate/domain/usecases/BuildRoutesUsecase.py b/fastapi_gateway_auto_generate/domain/usecases/BuildRoutesUsecase.py index 3fe04e5..9e5a514 100644 --- a/fastapi_gateway_auto_generate/domain/usecases/BuildRoutesUsecase.py +++ b/fastapi_gateway_auto_generate/domain/usecases/BuildRoutesUsecase.py @@ -132,7 +132,7 @@ def sort_elements_by_value(arguments): argument["type"] = param_type if not route_model.query_required[i]: - argument["value"] = default_values[query] + argument["value"] = default_values.get(query, None) argument["type"] = f"{param_type} | None" if route_model.query_is_cookie[i]: