diff --git a/CHANGELOG.md b/CHANGELOG.md index 52caf6e5..995255f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,39 @@ # TopModel.Generator (`modgen`) +## 1.40.0 + +- [#328](https://github.com/klee-contrib/topmodel/pull/328) - Propriétés comme paramètres de mapper `from` + + **breaking change** + Il n'est plus possible de spécifier `this` dans un mapping explicite de classe dans un mapper `from`, il faut utiliser une composition à la place. + + Par exemple : + + ```yaml + mappers: + from: + - params: + - class: MyDto + - class: MySubDto + mappings: + Sub: this + ``` + + devient + + ```yaml + mappers: + from: + - params: + - class: MyDto + - property: + composition: MySubDto + name: Sub + comment: Instance de 'MySubDto' + ``` + + Cela ne fonctionne qu'en génération C#, le générateur JPA ignore les mappings de propriétés. + ## 1.39.9 (Corrige le numéro de version qui incluait le hash du dernier commit suite à la montée de version du SDK .NET) diff --git a/TopModel.Core/TopModel.Core.csproj b/TopModel.Core/TopModel.Core.csproj index 6d92fc44..c35ea9f4 100644 --- a/TopModel.Core/TopModel.Core.csproj +++ b/TopModel.Core/TopModel.Core.csproj @@ -10,7 +10,7 @@ ../.nupkg - 1.39.9 + 1.40.0 false JabX;gideruette Librairie de modélisation TopModel. diff --git a/TopModel.Generator.Core/TopModel.Generator.Core.csproj b/TopModel.Generator.Core/TopModel.Generator.Core.csproj index 74317d27..c64bc997 100644 --- a/TopModel.Generator.Core/TopModel.Generator.Core.csproj +++ b/TopModel.Generator.Core/TopModel.Generator.Core.csproj @@ -10,7 +10,7 @@ ../.nupkg - 1.39.9 + 1.40.0 false JabX;gideruette Librarie de base pour écrire un générateur TopModel. diff --git a/TopModel.Generator/Program.cs b/TopModel.Generator/Program.cs index b099f4c4..0dbe69ae 100644 --- a/TopModel.Generator/Program.cs +++ b/TopModel.Generator/Program.cs @@ -178,6 +178,7 @@ void HandleFile(FileInfo file) var generators = baseGenerators .Concat(config.CustomGenerators.SelectMany(cg => new DirectoryInfo(Path.Combine(Path.GetFullPath(cg, new FileInfo(fullName).DirectoryName!), "bin")).GetFiles("TopModel.Generator.*.dll", SearchOption.AllDirectories))) + .Where(a => a.FullName.Contains($"net{Environment.Version.Major}.{Environment.Version.Minor}")) .DistinctBy(a => a.Name) .Select(f => Assembly.LoadFrom(f.FullName)) .SelectMany(a => a.GetExportedTypes()) diff --git a/TopModel.Generator/TopModel.Generator.csproj b/TopModel.Generator/TopModel.Generator.csproj index d043d172..a4de233a 100644 --- a/TopModel.Generator/TopModel.Generator.csproj +++ b/TopModel.Generator/TopModel.Generator.csproj @@ -13,7 +13,7 @@ true ../.nupkg modgen - 1.39.9 + 1.40.0 false JabX;gideruette Générateur de modèle TopModel. diff --git a/TopModel.ModelGenerator/TmdClass.cs b/TopModel.ModelGenerator/TmdClass.cs index 3736959d..9fcf152b 100644 --- a/TopModel.ModelGenerator/TmdClass.cs +++ b/TopModel.ModelGenerator/TmdClass.cs @@ -22,6 +22,7 @@ public class TmdClass #nullable enable public string? Extends { get; set; } + public List> Values { get; set; } = new(); public TmdFile? File { get; set; } diff --git a/TopModel.Utils/TopModel.Utils.csproj b/TopModel.Utils/TopModel.Utils.csproj index 8e2b855f..22c70b70 100644 --- a/TopModel.Utils/TopModel.Utils.csproj +++ b/TopModel.Utils/TopModel.Utils.csproj @@ -10,7 +10,7 @@ ../.nupkg - 1.39.9 + 1.40.0 false JabX;gideruette Utilitaires TopModel. diff --git a/TopModel.VSCode/package-lock.json b/TopModel.VSCode/package-lock.json index 788e1ddb..5a1912fa 100644 --- a/TopModel.VSCode/package-lock.json +++ b/TopModel.VSCode/package-lock.json @@ -1,12 +1,12 @@ { "name": "topmodel", - "version": "1.39.1", + "version": "1.40.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "topmodel", - "version": "1.39.1", + "version": "1.40.0", "dependencies": { "mermaid": "8.14.0", "mobx": "6.11.0", diff --git a/TopModel.VSCode/package.json b/TopModel.VSCode/package.json index 1b1a861b..24cab02b 100644 --- a/TopModel.VSCode/package.json +++ b/TopModel.VSCode/package.json @@ -20,7 +20,7 @@ "directory": "TopModel.VSCode", "type": "git" }, - "version": "1.39.1", + "version": "1.40.0", "engines": { "vscode": "^1.84.1" }, diff --git a/docs/_coverpage.md b/docs/_coverpage.md index 6d459865..8e7d297f 100644 --- a/docs/_coverpage.md +++ b/docs/_coverpage.md @@ -1,6 +1,6 @@ ![logo](./media/IconDark.svg) -# TopModel 1.39.8 +# TopModel 1.40.0 > Modélisez en toute simplicité. diff --git a/samples/model/angular.topmodel.lock b/samples/model/angular.topmodel.lock index 7ca7152a..91169067 100644 --- a/samples/model/angular.topmodel.lock +++ b/samples/model/angular.topmodel.lock @@ -2,7 +2,7 @@ # ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT ! # -version: 1.39.9 +version: 1.40.0 generatedFiles: - ../generators/angular/src/appgenerated/api/securite/profil/profil.ts - ../generators/angular/src/appgenerated/api/securite/utilisateur/utilisateur.ts diff --git a/samples/model/csharp.topmodel.lock b/samples/model/csharp.topmodel.lock index 0cbc2ece..84e61ca6 100644 --- a/samples/model/csharp.topmodel.lock +++ b/samples/model/csharp.topmodel.lock @@ -2,7 +2,7 @@ # ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT ! # -version: 1.39.9 +version: 1.40.0 generatedFiles: - ../generators/csharp/src/Clients/CSharp.Clients.Db/generated/CSharpDbContext.comments.cs - ../generators/csharp/src/Clients/CSharp.Clients.Db/generated/CSharpDbContext.cs diff --git a/samples/model/focus.topmodel.lock b/samples/model/focus.topmodel.lock index 71949d13..e1645138 100644 --- a/samples/model/focus.topmodel.lock +++ b/samples/model/focus.topmodel.lock @@ -2,7 +2,7 @@ # ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT ! # -version: 1.39.9 +version: 1.40.0 generatedFiles: - ../generators/focus/src/locale/common.ts - ../generators/focus/src/locale/securite.ts diff --git a/samples/model/jpa.topmodel.lock b/samples/model/jpa.topmodel.lock index d1d69783..ca7f1a5f 100644 --- a/samples/model/jpa.topmodel.lock +++ b/samples/model/jpa.topmodel.lock @@ -2,7 +2,7 @@ # ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT ! # -version: 1.39.9 +version: 1.40.0 generatedFiles: - ../generators/jpa/src/main/javagen/topmodel/jpa/sample/demo/api/client/securite/profil/AbstractProfilClient.java - ../generators/jpa/src/main/javagen/topmodel/jpa/sample/demo/api/client/securite/utilisateur/AbstractUtilisateurClient.java diff --git a/samples/model/pg.topmodel.lock b/samples/model/pg.topmodel.lock index 1e139659..f7285841 100644 --- a/samples/model/pg.topmodel.lock +++ b/samples/model/pg.topmodel.lock @@ -2,7 +2,7 @@ # ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT ! # -version: 1.39.9 +version: 1.40.0 generatedFiles: - ../generators/pg/src/01_tables.sql - ../generators/pg/src/02_fk_indexes.sql diff --git a/samples/model/php.topmodel.lock b/samples/model/php.topmodel.lock index d4544bb8..478f23e7 100644 --- a/samples/model/php.topmodel.lock +++ b/samples/model/php.topmodel.lock @@ -2,7 +2,7 @@ # ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT ! # -version: 1.39.9 +version: 1.40.0 generatedFiles: - ../generators/php/src/Entity/Securite/Profil/Droit.php - ../generators/php/src/Entity/Securite/Profil/Profil.php diff --git a/samples/model/ssdt.topmodel.lock b/samples/model/ssdt.topmodel.lock index e0f2cc65..af476510 100644 --- a/samples/model/ssdt.topmodel.lock +++ b/samples/model/ssdt.topmodel.lock @@ -2,7 +2,7 @@ # ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT ! # -version: 1.39.9 +version: 1.40.0 generatedFiles: - ../generators/ssdt/src/init/DROIT.insert.sql - ../generators/ssdt/src/init/main.sql diff --git a/samples/model/translation.topmodel.lock b/samples/model/translation.topmodel.lock index 20afb0b9..4c110f1f 100644 --- a/samples/model/translation.topmodel.lock +++ b/samples/model/translation.topmodel.lock @@ -2,7 +2,7 @@ # ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT ! # -version: 1.39.9 +version: 1.40.0 generatedFiles: - ../generators/translation/i18n/de_DE/out/common_de_DE.properties - ../generators/translation/i18n/de_DE/out/securite_de_DE.properties