From 8be76f224fe2aa63823f4e1dc96792ac29673fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donn=C3=A9=20Napo?= Date: Wed, 24 Apr 2024 12:52:33 +0200 Subject: [PATCH] Whoops removed some crucial functionality... :') --- MycroForge.CLI/CodeGen/EntityLinker.EntityModel.cs | 2 +- MycroForge.CLI/Features/Api.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/MycroForge.CLI/CodeGen/EntityLinker.EntityModel.cs b/MycroForge.CLI/CodeGen/EntityLinker.EntityModel.cs index e6bd746..466866f 100644 --- a/MycroForge.CLI/CodeGen/EntityLinker.EntityModel.cs +++ b/MycroForge.CLI/CodeGen/EntityLinker.EntityModel.cs @@ -23,7 +23,7 @@ public partial class EntityLinker public string ClassName => _className; public string Path => _path; - public string FieldName => _className.ToLower().Underscore(); + public string FieldName => _className.Underscore().ToLower(); public string TableName => GetOriginalText(_tableCtx) .Replace("__tablename__", string.Empty) diff --git a/MycroForge.CLI/Features/Api.cs b/MycroForge.CLI/Features/Api.cs index 93068f6..1ddad1d 100644 --- a/MycroForge.CLI/Features/Api.cs +++ b/MycroForge.CLI/Features/Api.cs @@ -40,6 +40,12 @@ public sealed class Api : IFeature return; } + await Bash.ExecuteAsync( + "source .venv/bin/activate", + "python3 -m pip install fastapi uvicorn[standard]", + "python3 -m pip freeze > requirements.txt" + ); + await context.CreateFile("api/routers/hello.py", HelloRouter); var main = await context.ReadFile("main.py");