forked from domaindrivendev/Swashbuckle.AspNetCore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CliExample.csproj
30 lines (24 loc) · 1.37 KB
/
CliExample.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Swashbuckle.AspNetCore.SwaggerGen\Swashbuckle.AspNetCore.SwaggerGen.csproj" />
<ProjectReference Include="..\..\..\src\Swashbuckle.AspNetCore.SwaggerUI\Swashbuckle.AspNetCore.SwaggerUI.csproj" />
<ProjectReference Include="..\..\..\src\Swashbuckle.AspNetCore.Swagger\Swashbuckle.AspNetCore.Swagger.csproj" />
<ProjectReference Include="..\..\..\src\Swashbuckle.AspNetCore.Cli\Swashbuckle.AspNetCore.Cli.csproj" />
</ItemGroup>
<!--
NOTE: In practice, you would uncomment the following snippet to install the dotnet-swagger tool via Nuget.
Then, the exec command below could be simplified to the following "dotnet swagger tofile ..."
-->
<!--<ItemGroup>
<DotNetCliToolReference Include="Swashbuckle.AspNetCore.Cli" Version="1.2.0-beta1" />
</ItemGroup>-->
<Target Name="SwaggerToFile" AfterTargets="AfterBuild">
<Exec Command="dotnet ..\..\..\src\Swashbuckle.AspNetCore.Cli\bin\$(Configuration)\netcoreapp2.0\dotnet-swagger.dll tofile --host http://example.com --output wwwroot\api-docs\v1\swagger.json $(OutputPath)$(AssemblyName).dll v1" />
</Target>
</Project>