Skip to content

Commit

Permalink
Update advanced-features.md
Browse files Browse the repository at this point in the history
  • Loading branch information
markjprice committed Dec 24, 2022
1 parent 066212a commit 6cbb6f2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions docs/bonus/advanced-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,17 @@ In ASP.NET Core 2.2 or later, there are API analyzers that reflect over controll

To use it, your project must enable the OpenAPI Analyzers:

1. In the `Northwind.WebApi` project file, add the element that enables the OpenAPI Analyzers, as shown highlighted in the following markup:
1. In the `Northwind.WebApi` project file, add the element that enables the OpenAPI Analyzers to a project that targets the web SDK, as shown highlighted in the following markup:

```xml
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IncludeOpenAPIAnalyzers>true</IncludeOpenAPIAnalyzers>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IncludeOpenAPIAnalyzers>true</IncludeOpenAPIAnalyzers>
</PropertyGroup>
```

2. In `CustomersController.cs`, for the `Update` action method, comment out the three `[ProducesResponseType]` attributes, as shown highlighted in the following code:
Expand Down

0 comments on commit 6cbb6f2

Please sign in to comment.