|
9 | 9 | <LangVersion>preview</LangVersion> |
10 | 10 | <UserSecretsId>b8ffb8d3-b768-460b-ac1f-ef267c954c85</UserSecretsId> |
11 | 11 | <PublishAot>true</PublishAot> |
| 12 | + <OpenApiDocumentsDirectory>.\</OpenApiDocumentsDirectory> |
| 13 | + <!--<OpenApiEnabled>false</OpenApiEnabled>--> |
12 | 14 | <!-- Don't use configuration binding generator until bug is fixed: https://github.com/dotnet/runtime/issues/83600 --> |
13 | 15 | <EnableConfigurationBindingGenerator>false</EnableConfigurationBindingGenerator> |
14 | 16 | <EnableLogging Condition=" '$(EnableLogging)' == '' and $(Configuration.StartsWith('Debug')) ">true</EnableLogging> |
15 | | - <EnableOpenApi Condition=" ('$(EnableOpenApi)' == '' and $(Configuration.StartsWith('Debug'))) or '$(OpenApiGenerateDocuments)' == 'true' ">true</EnableOpenApi> |
16 | 17 | <DefineConstants Condition=" '$(EnableLogging)' == 'true' ">$(DefineConstants);ENABLE_LOGGING</DefineConstants> |
17 | | - <DefineConstants Condition=" '$(EnableOpenApi)' == 'true' ">$(DefineConstants);ENABLE_OPENAPI</DefineConstants> |
18 | 18 | </PropertyGroup> |
19 | 19 |
|
20 | 20 | <ItemGroup> |
21 | | - <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0-preview.*" /> |
22 | | - <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0-preview.*" /> |
| 21 | + <ProjectReference Include="..\AspNetCore.OpenApi\AspNetCore.OpenApi.csproj" /> |
| 22 | + <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0-preview.4.*" /> |
| 23 | + <PackageReference Include="Microsoft.Extensions.ApiDescription.Server" Version="8.0.0-preview.4.*"> |
| 24 | + <PrivateAssets>all</PrivateAssets> |
| 25 | + <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
| 26 | + </PackageReference> |
| 27 | + <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0-preview.4.*" /> |
23 | 28 | <PackageReference Include="Npgsql" Version="8.0.0-preview.3" /> |
| 29 | + <PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" /> |
| 30 | + </ItemGroup> |
| 31 | + |
| 32 | + <ItemGroup> |
24 | 33 | <Content Update="appSettings.Development.json" CopyToPublishDirectory="false" /> |
25 | 34 | <!-- Workaround for https://github.com/dotnet/aspnetcore/issues/47941 --> |
26 | 35 | <IlcArg Include="--nopreinitstatics" /> |
27 | 36 | </ItemGroup> |
28 | 37 |
|
29 | | - <PropertyGroup Condition=" '$(EnableOpenApi)' == 'true' "> |
30 | | - <!-- Force OpenAPI doc generation during build to off as we're directly referencing Microsoft.Extensions.ApiDescription.Server --> |
31 | | - <OpenApiGenerateDocuments Condition=" '$(OpenApiGenerateDocuments)' == '' ">false</OpenApiGenerateDocuments> |
32 | | - <DefineConstants Condition=" '$(OpenApiGenerateDocuments)' == 'true' ">$(DefineConstants);GENERATING_OPENAPI_DOC</DefineConstants> |
33 | | - </PropertyGroup> |
34 | | - |
35 | | - <ItemGroup Condition=" '$(EnableOpenApi)' == 'true' "> |
36 | | - <PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" /> |
37 | | - <PackageReference Include="Microsoft.Extensions.ApiDescription.Server" Version="8.0.0-preview.*" /> |
38 | | - </ItemGroup> |
| 38 | + <Import Project="..\AspNetCore.OpenApi\build\AspNetCore.OpenApi.targets" /> |
39 | 39 | </Project> |
0 commit comments