Skip to content

Commit c29fd08

Browse files
committed
Tests and examples updated
1 parent a76d196 commit c29fd08

File tree

80 files changed

+176
-134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+176
-134
lines changed

Examples/Angular/Annotation/ChangeReturnType/ChangeReturnType.csproj

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
44
<TargetFramework>net6.0</TargetFramework>
@@ -8,11 +8,12 @@
88
<SpaProxyServerUrl>https://localhost:44442</SpaProxyServerUrl>
99
<SpaProxyLaunchCommand>npm start</SpaProxyLaunchCommand>
1010
<ImplicitUsings>enable</ImplicitUsings>
11-
</PropertyGroup>
11+
<ProjectGuid>{fc26dcad-6b61-49d1-a5a1-1915cdb8dd48}</ProjectGuid>
12+
</PropertyGroup>
1213

1314
<ItemGroup>
14-
<PackageReference Include="KY.Generator" Version="8.3.0-preview.4" />
15-
<PackageReference Include="KY.Generator.Annotations" Version="8.3.0-preview.4" />
15+
<PackageReference Include="KY.Generator" Version="8.4.0" />
16+
<PackageReference Include="KY.Generator.Annotations" Version="8.4.0" />
1617
<PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="6.0.5" />
1718
</ItemGroup>
1819

Examples/Angular/Annotation/ChangeReturnType/ClientApp/src/app/models/weather-forecast.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.
@@ -20,4 +20,4 @@ export class WeatherForecast {
2020
}
2121
}
2222

23-
// outputid:af7b280c-481a-4361-bbf4-4fc70f10de28
23+
// outputid:fc26dcad-6b61-49d1-a5a1-1915cdb8dd48

Examples/Angular/Annotation/ChangeReturnType/ClientApp/src/app/services/weather-forecast-api.service.ts

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.
@@ -12,6 +12,7 @@
1212
import { CustomWeatherForecast } from "../models/custom-weather-forecast";
1313
import { HttpClient } from "@angular/common/http";
1414
import { Injectable } from "@angular/core";
15+
import { SpecialWeatherForecast } from "@my-lib/models";
1516
import { Observable } from "rxjs";
1617
import { Subject } from "rxjs";
1718

@@ -42,6 +43,16 @@ export class WeatherForecastApiService {
4243
}, (error) => subject.error(error));
4344
return subject;
4445
}
46+
47+
public specialGet(httpOptions?: {}): Observable<SpecialWeatherForecast[]> {
48+
let subject = new Subject<SpecialWeatherForecast[]>();
49+
let url: string = this.serviceUrl + "/weatherforecast";
50+
this.http.get<SpecialWeatherForecast[]>(url, httpOptions).subscribe((result) => {
51+
subject.next(result);
52+
subject.complete();
53+
}, (error) => subject.error(error));
54+
return subject;
55+
}
4556
}
4657

47-
// outputid:af7b280c-481a-4361-bbf4-4fc70f10de28
58+
// outputid:fc26dcad-6b61-49d1-a5a1-1915cdb8dd48

Examples/Angular/Annotation/ChangeReturnType/Controllers/WeatherForecastController.cs

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ namespace ChangeReturnType.Controllers;
66
[ApiController]
77
[Route("[controller]")]
88
[GenerateAngularService("/ClientApp/src/app/services", "/ClientApp/src/app/models", "{0}ApiService")]
9+
[GenerateImport(typeof(SpecialWeatherForecast), "@my-lib/models", "SpecialWeatherForecast")]
910
public class WeatherForecastController : ControllerBase
1011
{
1112
private static readonly string[] Summaries = new[]
@@ -32,4 +33,10 @@ public IEnumerable<WeatherForecast> Get()
3233
})
3334
.ToArray();
3435
}
36+
37+
[HttpGet]
38+
public IEnumerable<SpecialWeatherForecast> SpecialGet()
39+
{
40+
return Enumerable.Empty<SpecialWeatherForecast>();
41+
}
3542
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace ChangeReturnType;
2+
3+
public class SpecialWeatherForecast : WeatherForecast
4+
{
5+
6+
}

Examples/Angular/Annotation/ModelFromAssembly/ModelFromAssembly.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="KY.Generator" Version="8.3.0" />
10-
<PackageReference Include="KY.Generator.Annotations" Version="8.3.0" />
9+
<PackageReference Include="KY.Generator" Version="8.4.0" />
10+
<PackageReference Include="KY.Generator.Annotations" Version="8.4.0" />
1111
</ItemGroup>
1212

1313
</Project>

Examples/Angular/Annotation/ModelFromAssembly/Output/another-type.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Annotation/ModelFromAssembly/Output/type-to-read.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Annotation/ServiceFromAspNetCore/ClientApp/src/app/models/weather-forecast.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Annotation/ServiceFromAspNetCore/ClientApp/src/app/services/weather-forecast.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Annotation/ServiceFromAspNetCore/ServiceFromAspNetCore.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="KY.Generator" Version="8.3.0" />
18-
<PackageReference Include="KY.Generator.Annotations" Version="8.3.0" />
17+
<PackageReference Include="KY.Generator" Version="8.4.0" />
18+
<PackageReference Include="KY.Generator.Annotations" Version="8.4.0" />
1919
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.1.7" />
2020
</ItemGroup>
2121

Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/ClientApp/src/app/models/connection-status.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/ClientApp/src/app/models/weather-forecast.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/ClientApp/src/app/services/weather-hub.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/ServiceFromAspNetCoreSignalRHub.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="KY.Generator" Version="8.3.0" />
18-
<PackageReference Include="KY.Generator.Annotations" Version="8.3.0" />
17+
<PackageReference Include="KY.Generator" Version="8.4.0" />
18+
<PackageReference Include="KY.Generator.Annotations" Version="8.4.0" />
1919
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
2020
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.1.7" />
2121
</ItemGroup>

Examples/Angular/Annotation/Strict/ClientApp/src/app/models/sub-type.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Annotation/Strict/ClientApp/src/app/models/weather-forecast.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Annotation/Strict/ClientApp/src/app/services/weather-forecast-api.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Annotation/Strict/Strict.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="KY.Generator" Version="8.3.0" />
18-
<PackageReference Include="KY.Generator.Annotations" Version="8.3.0" />
17+
<PackageReference Include="KY.Generator" Version="8.4.0" />
18+
<PackageReference Include="KY.Generator.Annotations" Version="8.4.0" />
1919
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="5.0.4" />
2020
</ItemGroup>
2121

Examples/Angular/Annotation/build.cmd

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
REM
2+
REM ==========================================
3+
REM || ChangeReturnType ||
4+
REM ==========================================
5+
REM
6+
cd ChangeReturnType
7+
rmdir /S/Q bin
8+
rmdir /S/Q ClientApp\src\app\models
9+
rmdir /S/Q ClientApp\src\app\services
10+
dotnet add package KY.Generator --prerelease
11+
dotnet add package KY.Generator.Annotations --prerelease
12+
dotnet build --no-incremental
13+
cd ..
14+
15+
PAUSE
16+
117
REM
218
REM ==========================================
319
REM || ModelFromAssembly ||
@@ -11,6 +27,7 @@ dotnet add package KY.Generator.Annotations --prerelease
1127
dotnet build --no-incremental
1228
cd ..
1329

30+
REM
1431
REM ==========================================
1532
REM || ServiceFromAspNetCore ||
1633
REM ==========================================

Examples/Angular/Fluent/ChangeReturnType/Assembly/ClientApp/src/app/models/weather-forecast.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Fluent/ChangeReturnType/Assembly/ClientApp/src/app/services/weather-forecast.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Fluent/ChangeReturnType/Generator/Generator.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="KY.Generator.Angular" Version="8.3.0" />
9-
<PackageReference Include="KY.Generator.AspDotNet" Version="8.3.0" />
10-
<PackageReference Include="KY.Generator.Fluent" Version="8.3.0" />
8+
<PackageReference Include="KY.Generator.Angular" Version="8.4.0" />
9+
<PackageReference Include="KY.Generator.AspDotNet" Version="8.4.0" />
10+
<PackageReference Include="KY.Generator.Fluent" Version="8.4.0" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

Examples/Angular/Fluent/FromModel/Generator/Generator.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="KY.Generator.Angular" Version="8.3.0" />
9-
<PackageReference Include="KY.Generator.Fluent" Version="8.3.0" />
10-
<PackageReference Include="KY.Generator.Reflection" Version="8.3.0" />
8+
<PackageReference Include="KY.Generator.Angular" Version="8.4.0" />
9+
<PackageReference Include="KY.Generator.Fluent" Version="8.4.0" />
10+
<PackageReference Include="KY.Generator.Reflection" Version="8.4.0" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

Examples/Angular/Fluent/FromModel/Generator/Output/Models/type-to-read.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Fluent/GenerateInterfacesInsteadClasses/Generator/Generator.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="KY.Generator.Angular" Version="8.3.0" />
9-
<PackageReference Include="KY.Generator.Fluent" Version="8.3.0" />
10-
<PackageReference Include="KY.Generator.Reflection" Version="8.3.0" />
8+
<PackageReference Include="KY.Generator.Angular" Version="8.4.0" />
9+
<PackageReference Include="KY.Generator.Fluent" Version="8.4.0" />
10+
<PackageReference Include="KY.Generator.Reflection" Version="8.4.0" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

Examples/Angular/Fluent/ServiceFromAspNetCore/Generator/Generator.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="KY.Generator.Angular" Version="8.3.0" />
14-
<PackageReference Include="KY.Generator.AspDotNet" Version="8.3.0" />
15-
<PackageReference Include="KY.Generator.Fluent" Version="8.3.0" />
13+
<PackageReference Include="KY.Generator.Angular" Version="8.4.0" />
14+
<PackageReference Include="KY.Generator.AspDotNet" Version="8.4.0" />
15+
<PackageReference Include="KY.Generator.Fluent" Version="8.4.0" />
1616
</ItemGroup>
1717

1818
</Project>

Examples/Angular/Fluent/ServiceFromAspNetCore/Service/ClientApp/src/app/models/weather-forecast.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Fluent/ServiceFromAspNetCore/Service/ClientApp/src/app/services/weather-forecast.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Fluent/ServiceFromSignalR/Generator/Generator.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="KY.Generator.Angular" Version="8.3.0" />
9-
<PackageReference Include="KY.Generator.AspDotNet" Version="8.3.0" />
10-
<PackageReference Include="KY.Generator.Fluent" Version="8.3.0" />
8+
<PackageReference Include="KY.Generator.Angular" Version="8.4.0" />
9+
<PackageReference Include="KY.Generator.AspDotNet" Version="8.4.0" />
10+
<PackageReference Include="KY.Generator.Fluent" Version="8.4.0" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

Examples/Angular/Fluent/ServiceFromSignalR/Service/ClientApp/src/app/models/connection-status.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Fluent/ServiceFromSignalR/Service/ClientApp/src/app/models/weather-forecast.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Fluent/ServiceFromSignalR/Service/ClientApp/src/app/services/weather-forecast-hub.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

Examples/Angular/Fluent/WithCustomHttpClient/Generator/Generator.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="KY.Generator.Angular" Version="8.3.0" />
9-
<PackageReference Include="KY.Generator.AspDotNet" Version="8.3.0" />
10-
<PackageReference Include="KY.Generator.Fluent" Version="8.3.0" />
8+
<PackageReference Include="KY.Generator.Angular" Version="8.4.0" />
9+
<PackageReference Include="KY.Generator.AspDotNet" Version="8.4.0" />
10+
<PackageReference Include="KY.Generator.Fluent" Version="8.4.0" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

Examples/Angular/Fluent/WithCustomHttpClient/Service/ClientApp/src/app/models/weather-forecast.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ------------------------------------------------------------------------------
22
// <auto-generated>
3-
// This code was generated with KY.Generator 8.3.0.0
3+
// This code was generated with KY.Generator 8.4.0.0
44
//
55
// Manual changes to this file may cause unexpected behavior in your application.
66
// Manual changes to this file will be overwritten if the code is regenerated.

0 commit comments

Comments
 (0)