- Replace Swashbuckle with NSwag.AspNetCore + NSwag.MSBuild - Configure OpenAPI document in Program.cs via AddOpenApiDocument - Add nswag.json: aspNetCoreToOpenApi → Axios TypeScript client - Post-build target uses NSwagExe_Net80 to run on correct runtime - Client generated to frontend/src/api/apiClient.ts (gitignored) - Add axios to frontend dependencies Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
28 lines
1001 B
XML
28 lines
1001 B
XML
<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net8.0</TargetFramework>
|
|
<Nullable>enable</Nullable>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<InvariantGlobalization>true</InvariantGlobalization>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\ClaudeTest.Application\ClaudeTest.Application.csproj" />
|
|
<ProjectReference Include="..\ClaudeTest.Infrastructure\ClaudeTest.Infrastructure.csproj" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="NSwag.AspNetCore" Version="14.*" />
|
|
<PackageReference Include="NSwag.MSBuild" Version="14.*">
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
<PrivateAssets>all</PrivateAssets>
|
|
</PackageReference>
|
|
</ItemGroup>
|
|
|
|
<Target Name="NSwag" AfterTargets="Build">
|
|
<Exec Command="$(NSwagExe_Net80) run nswag.json /variables:Configuration=$(Configuration)" WorkingDirectory="$(ProjectDir)" />
|
|
</Target>
|
|
|
|
</Project>
|