21 lines
850 B
XML
21 lines
850 B
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<OutputType>Exe</OutputType>
|
|
<TargetFramework>net5.0</TargetFramework>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
|
<PackageReference Include="NSwag.MSBuild" Version="13.9.4">
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
<PrivateAssets>all</PrivateAssets>
|
|
</PackageReference>
|
|
</ItemGroup>
|
|
|
|
<Target Name="Generate API client" BeforeTargets="BeforeBuild" Inputs="../Api/swagger.json" Outputs="MyApiClient.cs">
|
|
<Exec EnvironmentVariables="ASPNETCORE_ENVIRONMENT=Development" Command="$(NSwagExe_Net50) openapi2csclient /input:../Api/swagger.json /namespace:CLI /output:MyApiClient.cs /InjectHttpClient:false" />
|
|
</Target>
|
|
|
|
</Project>
|