Skip to content

Commit 2d92bb6

Browse files
authored
Merge pull request #38 from mattl91/Issue319
Changes for Issue 319
2 parents ec2aabf + e9e240c commit 2d92bb6

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

HarmonyCoreCodeGen.Core/Generator/ODataGenerator.dbl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,24 @@ namespace HarmonyCoreGenerator.Generator
5858
result.Add(StructureTaskHelper(targetSolution, "Generate Postman tests", "", targetSolution.SolutionFolder, true, ^nameof(ODataGenerator), new string[#] { "ODataPostManTests" }, ^null))
5959
end
6060

61+
;; Authentication
62+
63+
if (targetSolution.CustomAuthentication ?? false)
64+
begin
65+
;; Add AuthenticationModels.dbl if it doesn't exist
66+
data authModelTask = StructureTaskHelper(targetSolution, "Generate custom authentication", targetSolution.ModelsNamespace, targetSolution.ModelsFolder, true, ^nameof(ODataGenerator), new string[#] { "ODataCustomAuthModels" }, ^null)
67+
authModelTask.ReplaceFiles = false
68+
result.Add(authModelTask)
69+
;; Add AuthenticationController.dbl if it doesn't exist
70+
data authControllerTask = StructureTaskHelper(targetSolution, "Generate custom authentication", targetSolution.ControllersNamespace, targetSolution.ControllersFolder, true, ^nameof(ODataGenerator), new string[#] { "ODataCustomAuthController" }, ^null)
71+
authControllerTask.ReplaceFiles = false
72+
result.Add(authControllerTask)
73+
;; Add AuthenticationTools.dbl if it doesn't exist
74+
data authToolsTask = StructureTaskHelper(targetSolution, "Generate custom authentication", targetSolution.ControllersNamespace, targetSolution.ControllersFolder, true, ^nameof(ODataGenerator), new string[#] { "ODataCustomAuthTools" }, ^null)
75+
authToolsTask.ReplaceFiles = false
76+
result.Add(authToolsTask)
77+
end
78+
6179
;;---------------------------------------------------------------------------------------------
6280
;; Unit tests
6381

0 commit comments

Comments
 (0)