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

Lines changed: 5 additions & 4 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 13 additions & 2 deletions
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

Lines changed: 7 additions & 0 deletions
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
}
Lines changed: 6 additions & 0 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)