Skip to content

Commit 0ff5201

Browse files
committed
Complex json object with reader fixed
1 parent 5bfdf56 commit 0ff5201

34 files changed

+208
-75
lines changed

Angular/KY.Generator.Angular.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Authors>KY-Programming</Authors>
66
<Company>KY-Programming</Company>
77
<Product>KY.Generator</Product>
8-
<Version>2.5.1</Version>
8+
<Version>2.5.2</Version>
99
<Copyright>2019 - KY-Programming</Copyright>
1010
<Description>Angular Module for KY-Generator
1111
Download KY.Generator.CLI to use this module</Description>

AspDotNet/KY.Generator.AspDotNet.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<Company>KY-Programming</Company>
66
<Authors>KY-Programming</Authors>
7-
<Version>2.5.1</Version>
7+
<Version>2.5.2</Version>
88
<Product>KY.Generator</Product>
99
<Description>ASP.net Module for KY-Generator
1010
Download KY.Generator.CLI to use this module</Description>

CLI.Core.Minimal/KY.Generator.CLI.Core.Minimal.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>netcoreapp2.2</TargetFramework>
6-
<Version>2.5.1</Version>
6+
<Version>2.5.2</Version>
77
<Authors>KY-Programming</Authors>
88
<Product>KY.Generator</Product>
99
<Copyright>2019 - KY-Programming</Copyright>

CLI.Core.Minimal/nuget.nuspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>KY.Generator.CLI.Core.Minimal</id>
5-
<version>2.5.1</version>
5+
<version>2.5.2</version>
66
<title>KY.Generator.CLI.Core.Minimal</title>
77
<authors>KY-Programming</authors>
88
<owners>KY-Programming</owners>
@@ -16,7 +16,7 @@ Generate classes from oData, .NET assembly, JSON or TSQL to C# or TypeScript. Su
1616
<copyright>Copyright 2019</copyright>
1717
<tags>KY-Generator KY Generator .netCore CLI</tags>
1818
<dependencies>
19-
<dependency id="KY.Generator.Core" version="2.5.1" />
19+
<dependency id="KY.Generator.Core" version="2.5.2" />
2020
</dependencies>
2121
</metadata>
2222
<files>

CLI.Core.Standalone/KY.Generator.CLI.Core.Standalone.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>netcoreapp2.2</TargetFramework>
6-
<Version>2.5.1</Version>
6+
<Version>2.5.2</Version>
77
<Authors>KY-Programming</Authors>
88
<Product>KY.Generator</Product>
99
<Copyright>2019 - KY-Programming</Copyright>

CLI.Core.Standalone/nuget.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>KY.Generator.CLI.Core.Standalone</id>
5-
<version>2.5.1</version>
5+
<version>2.5.2</version>
66
<title>KY.Generator.CLI.Core.Standalone</title>
77
<authors>KY-Programming</authors>
88
<owners>KY-Programming</owners>

CLI.Core/KY.Generator.CLI.Core.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>netcoreapp2.2</TargetFramework>
6-
<Version>2.5.1</Version>
6+
<Version>2.5.2</Version>
77
<Authors>KY-Programming</Authors>
88
<Product>KY.Generator</Product>
99
<Copyright>2019 - KY-Programming</Copyright>

CLI.Core/nuget.nuspec

+12-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>KY.Generator.CLI.Core</id>
5-
<version>2.5.1</version>
5+
<version>2.5.2</version>
66
<title>KY.Generator.CLI.Core</title>
77
<authors>KY-Programming</authors>
88
<owners>KY-Programming</owners>
@@ -16,17 +16,17 @@ Generate classes from oData, .NET assembly, JSON or TSQL to C# or TypeScript. Su
1616
<copyright>Copyright 2019</copyright>
1717
<tags>KY-Generator KY Generator .netCore CLI</tags>
1818
<dependencies>
19-
<dependency id="KY.Generator.Angular" version="2.5.1" />
20-
<dependency id="KY.Generator.AspDotNet" version="2.5.1" />
21-
<dependency id="KY.Generator.Core" version="2.5.1" />
22-
<dependency id="KY.Generator.Csharp" version="2.5.1" />
23-
<dependency id="KY.Generator.EntityFramework" version="2.5.1" />
24-
<dependency id="KY.Generator.Json" version="2.5.1" />
25-
<dependency id="KY.Generator.OData" version="2.5.1" />
26-
<dependency id="KY.Generator.OpenApi" version="2.5.1" />
27-
<dependency id="KY.Generator.Reflection" version="2.5.1" />
28-
<dependency id="KY.Generator.Tsql" version="2.5.1" />
29-
<dependency id="KY.Generator.TypeScript" version="2.5.1" />
19+
<dependency id="KY.Generator.Angular" version="2.5.2" />
20+
<dependency id="KY.Generator.AspDotNet" version="2.5.2" />
21+
<dependency id="KY.Generator.Core" version="2.5.2" />
22+
<dependency id="KY.Generator.Csharp" version="2.5.2" />
23+
<dependency id="KY.Generator.EntityFramework" version="2.5.2" />
24+
<dependency id="KY.Generator.Json" version="2.5.2" />
25+
<dependency id="KY.Generator.OData" version="2.5.2" />
26+
<dependency id="KY.Generator.OpenApi" version="2.5.2" />
27+
<dependency id="KY.Generator.Reflection" version="2.5.2" />
28+
<dependency id="KY.Generator.Tsql" version="2.5.2" />
29+
<dependency id="KY.Generator.TypeScript" version="2.5.2" />
3030
</dependencies>
3131
</metadata>
3232
<files>

CLI.Minimal/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("2.5.1")]
36-
[assembly: AssemblyFileVersion("2.5.1.0")]
35+
[assembly: AssemblyVersion("2.5.2")]
36+
[assembly: AssemblyFileVersion("2.5.2.0")]

CLI.Minimal/nuget.nuspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>KY.Generator.CLI.Minimal</id>
5-
<version>2.5.1</version>
5+
<version>2.5.2</version>
66
<title>KY.Generator.CLI.Full</title>
77
<authors>KY-Programming</authors>
88
<owners>KY-Programming</owners>
@@ -16,7 +16,7 @@ Generate classes from oData, .NET assembly, JSON or TSQL to C# or TypeScript. Su
1616
<copyright>Copyright 2019</copyright>
1717
<tags>KY-Generator KY Generator CLI Minimal</tags>
1818
<dependencies>
19-
<dependency id="KY.Generator.Core" version="2.5.1" />
19+
<dependency id="KY.Generator.Core" version="2.5.2" />
2020
</dependencies>
2121
</metadata>
2222
<files>

CLI.Standalone/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("2.5.1")]
36-
[assembly: AssemblyFileVersion("2.5.1.0")]
35+
[assembly: AssemblyVersion("2.5.2")]
36+
[assembly: AssemblyFileVersion("2.5.2.0")]

CLI.Standalone/nuget.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>KY.Generator.CLI.Standalone</id>
5-
<version>2.5.1</version>
5+
<version>2.5.2</version>
66
<title>KY.Generator.CLI</title>
77
<authors>KY-Programming</authors>
88
<owners>KY-Programming</owners>

CLI/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("2.5.1")]
36-
[assembly: AssemblyFileVersion("2.5.1.0")]
35+
[assembly: AssemblyVersion("2.5.2")]
36+
[assembly: AssemblyFileVersion("2.5.2.0")]

CLI/nuget.nuspec

+12-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>KY.Generator.CLI</id>
5-
<version>2.5.1</version>
5+
<version>2.5.2</version>
66
<title>KY.Generator.CLI</title>
77
<authors>KY-Programming</authors>
88
<owners>KY-Programming</owners>
@@ -16,17 +16,17 @@ Generate classes from oData, .NET assembly, JSON or TSQL to C# or TypeScript. Su
1616
<copyright>Copyright 2019</copyright>
1717
<tags>KY-Generator KY Generator CLI</tags>
1818
<dependencies>
19-
<dependency id="KY.Generator.Angular" version="2.5.1" />
20-
<dependency id="KY.Generator.AspDotNet" version="2.5.1" />
21-
<dependency id="KY.Generator.Core" version="2.5.1" />
22-
<dependency id="KY.Generator.Csharp" version="2.5.1" />
23-
<dependency id="KY.Generator.EntityFramework" version="2.5.1" />
24-
<dependency id="KY.Generator.Json" version="2.5.1" />
25-
<dependency id="KY.Generator.OData" version="2.5.1" />
26-
<dependency id="KY.Generator.OpenApi" version="2.5.1" />
27-
<dependency id="KY.Generator.Reflection" version="2.5.1" />
28-
<dependency id="KY.Generator.Tsql" version="2.5.1" />
29-
<dependency id="KY.Generator.TypeScript" version="2.5.1" />
19+
<dependency id="KY.Generator.Angular" version="2.5.2" />
20+
<dependency id="KY.Generator.AspDotNet" version="2.5.2" />
21+
<dependency id="KY.Generator.Core" version="2.5.2" />
22+
<dependency id="KY.Generator.Csharp" version="2.5.2" />
23+
<dependency id="KY.Generator.EntityFramework" version="2.5.2" />
24+
<dependency id="KY.Generator.Json" version="2.5.2" />
25+
<dependency id="KY.Generator.OData" version="2.5.2" />
26+
<dependency id="KY.Generator.OpenApi" version="2.5.2" />
27+
<dependency id="KY.Generator.Reflection" version="2.5.2" />
28+
<dependency id="KY.Generator.Tsql" version="2.5.2" />
29+
<dependency id="KY.Generator.TypeScript" version="2.5.2" />
3030
</dependencies>
3131
</metadata>
3232
<files>

Core/CoreModule.cs

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public override void Initialize()
3535
this.DependencyResolver.Bind<IGeneratorCommand>().To<VersionCommand>();
3636
this.DependencyResolver.Bind<IGeneratorCommand>().To<RunCommand>();
3737
this.DependencyResolver.Bind<ILanguage>().To<EmptyLanguage>();
38+
this.DependencyResolver.Bind<ModelWriter>().ToSelf();
3839
this.DependencyResolver.Get<ReaderConfigurationMapping>()
3940
.Map<CookieConfiguration, CookieReader>("cookie");
4041
this.DependencyResolver.Get<WriterConfigurationMapping>()

Core/KY.Generator.Core.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Company>KY-Programming</Company>
66
<Authors>KY-Programming</Authors>
77
<Product>KY.Generator</Product>
8-
<Version>2.5.1</Version>
8+
<Version>2.5.2</Version>
99
<Description>Core elements for KY-Generator
1010
Download KY.Generator.CLI to use this module</Description>
1111
<Copyright>2019 - KY-Programming</Copyright>

Csharp/KY.Generator.CSharp.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Authors>KY-Programming</Authors>
66
<Company>KY-Programming</Company>
77
<Product>KY.Generator</Product>
8-
<Version>2.5.1</Version>
8+
<Version>2.5.2</Version>
99
<Description>C# Module for KY-Generator
1010
Download KY.Generator.CLI to use this module</Description>
1111
<Copyright>2019 - KY-Programming</Copyright>

EntityFramework/KY.Generator.EntityFramework.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Authors>KY-Programming</Authors>
66
<Company>KY-Programming</Company>
77
<Product>KY.Generator</Product>
8-
<Version>2.5.1</Version>
8+
<Version>2.5.2</Version>
99
<Copyright>2019 - KY-Programming</Copyright>
1010
<Description>EntityFramework Module for KY-Generator
1111
Download KY.Generator.CLI to use this module</Description>

Json.Tests/FullStageTests.cs

+10
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ public void Complex()
6868
Assert.AreEqual(Resources.ObjectArrayProperty_cs, this.output.Files["ObjectArrayProperty.cs"]);
6969
}
7070

71+
[TestMethod]
72+
public void ComplexWithReader()
73+
{
74+
Assert.AreEqual(true, this.Run(Resources.complex_with_reader_generator), "Generation not successful");
75+
Assert.AreEqual(3, this.output.Files.Count);
76+
Assert.AreEqual(Resources.ComplexWithReader_cs, this.output.Files["ComplexWithReader.cs"]);
77+
Assert.AreEqual(Resources.ObjectProperty_cs, this.output.Files["ObjectProperty.cs"]);
78+
Assert.AreEqual(Resources.ObjectArrayProperty_cs, this.output.Files["ObjectArrayProperty.cs"]);
79+
}
80+
7181
private bool Run(string configuration)
7282
{
7383
List<ConfigurationPair> configurations = this.reader.Parse(configuration);

Json.Tests/KY.Generator.Json.Tests.csproj

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
<ItemGroup>
1010
<None Remove="Resources\Complex.cs.result" />
11+
<None Remove="Resources\ComplexWithReader.cs.result" />
1112
<None Remove="Resources\ObjectArrayProperty.cs.result" />
1213
<None Remove="Resources\ObjectProperty.cs.result" />
1314
<None Remove="Resources\Simple.cs.result" />
@@ -23,6 +24,7 @@
2324
<Compile Include="Resources\Simple.cs.result" />
2425
<Compile Include="Resources\SimpleReader.cs.result" />
2526
<Compile Include="Resources\SimpleWithoutReader.cs.result" />
27+
<Compile Include="Resources\ComplexWithReader.cs.result" />
2628
<Compile Include="Resources\SimpleWithReader.cs.result" />
2729
</ItemGroup>
2830

0 commit comments

Comments
 (0)