Skip to content

Commit f98d141

Browse files
authored
Updated Koalesce.OpenAPI to v1.0.0-alpha.4 (#65)
1 parent 9e4733f commit f98d141

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

src/Crosscutting/EcommerceDDD.ApiGateway/EcommerceDDD.ApiGateway.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</PropertyGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="Koalesce.OpenAPI" Version="1.0.0-alpha.3" />
16+
<PackageReference Include="Koalesce.OpenAPI" Version="1.0.0-alpha.4" />
1717
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.22.1" />
1818
<PackageReference Include="Ocelot" Version="24.1.0" />
1919
</ItemGroup>

src/Crosscutting/EcommerceDDD.ServiceClients/EcommerceDDD.ServiceClients.csproj

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@
2525
</None>
2626
</ItemGroup>
2727

28-
<ItemGroup>
29-
<Folder Include="Kiota\" />
30-
</ItemGroup>
31-
32-
<!-- Only generate Kiota client during Debug builds -->
33-
<Target Name="GenerateKiotaClient" BeforeTargets="Build" Condition="'$(Configuration)' == 'Debug'">
34-
<Exec Command="kiota generate -d ../../../src/Crosscutting/EcommerceDDD.ServiceClients/apigateway.yaml -l CSharp -c ApiGatewayClient -n EcommerceDDD.ServiceClients.ApiGateway -o Kiota" />
35-
</Target>
28+
<!-- Only run during Debug builds -->
29+
<!-- Should generate merged definition if the microservices are up and running -->
30+
<Target Name="GenerateSingleGatewayDefinition" BeforeTargets="Build" Condition="'$(Configuration)' == 'Debug'">
31+
<Exec Command="koalesce --config &quot;$(MSBuildProjectDirectory)/../../../src/Crosscutting/EcommerceDDD.ApiGateway/appsettings.json&quot; --output &quot;$(MSBuildProjectDirectory)/../../../src/Crosscutting/EcommerceDDD.ServiceClients/apigateway.yaml&quot;" />
32+
</Target>
33+
34+
<!-- Should generate Kiota client if having the apigateway.yaml in place from the previous step -->
35+
<Target Name="GenerateKiotaClient" BeforeTargets="Build" AfterTargets="GenerateSingleGatewayDefinition" Condition="'$(Configuration)' == 'Debug' AND Exists('$(MSBuildProjectDirectory)/../../../src/Crosscutting/EcommerceDDD.ServiceClients/apigateway.yaml')">
36+
37+
<Exec Command="kiota generate -d &quot;$(MSBuildProjectDirectory)/../../../src/Crosscutting/EcommerceDDD.ServiceClients/apigateway.yaml&quot; -l CSharp -c ApiGatewayClient -n EcommerceDDD.ServiceClients.ApiGateway -o Kiota" />
38+
</Target>
3639
</Project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Generating API gateway single OpenAPI definition with Koalesce
22

33
## Install Koalesce.OpenAPI.CLI
4-
dotnet tool install --global Koalesce.OpenAPI.CLI --version 0.1.1-alpha.1
4+
dotnet tool install --global Koalesce.OpenAPI.CLI --version 1.0.0-alpha.4 (or latest)
55

66
### Execute it while running the solution if you want to update this apigateway.yaml to generate new Kiota clients
77
koalesce --config .your-path\EcommerceDDD\src\Crosscutting\EcommerceDDD.ApiGateway\appsettings.json --output .your-path\EcommerceDDD\src\Crosscutting\EcommerceDDD.ServiceClients\apigateway.yaml

0 commit comments

Comments
 (0)