Skip to content

Commit 44c42e6

Browse files
committed
react to feedback
1 parent cef4c2d commit 44c42e6

File tree

1 file changed

+10
-25
lines changed

1 file changed

+10
-25
lines changed

aspnetcore/fundamentals/openapi/openapi-comments.md

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,11 @@ The following sections describe how to enable and customize XML documentation su
3030

3131
1. Enable XML documentation in the project file:
3232

33-
:::code language="xml" source="~/fundamentals/openapi/samples/10.x/aspnet-openapi-xml/models/Models.csproj" highlight="7":::
33+
:::code language="xml" source="~/fundamentals/openapi/samples/10.x/aspnet-openapi-xml/models/Models.csproj" highlight="7":::
3434

3535
2. Use the [AddOpenApi](xref:Microsoft.Extensions.DependencyInjection.OpenApiServiceCollectionExtensions.AddOpenApi*) method in the service configuration. No configuration is needed, the source generator handles the rest.
3636

37-
:::code language="csharp" source="~/fundamentals/openapi/samples/10.x/aspnet-openapi-xml/api/Program.cs" highlight="6":::
38-
39-
To include XML documentation files from referenced assemblies, add them as `AdditionalFiles` in the project:
40-
41-
```xml
42-
<ItemGroup>
43-
<AdditionalFiles Include="Path/To/AssemblyDoc.xml" />
44-
</ItemGroup>
45-
```
37+
:::code language="csharp" source="~/fundamentals/openapi/samples/10.x/aspnet-openapi-xml/api/Program.cs" highlight="6":::
4638

4739
The source generator detects all standard overloads:
4840

@@ -74,6 +66,14 @@ The implementation discovers XML files statically at compile-time. The `Addition
7466

7567
:::code language="xml" source="~/fundamentals/openapi/samples/10.x/aspnet-openapi-xml/api/AdditionalFiles.xml" highlight="7":::
7668

69+
To include XML documentation files from referenced assemblies, add them as `AdditionalFiles` in the project:
70+
71+
```xml
72+
<ItemGroup>
73+
<AdditionalFiles Include="Path/To/AssemblyDoc.xml" />
74+
</ItemGroup>
75+
```
76+
7777
#### Disabling XML documentation support
7878

7979
To turn off XML documentation integration, remove the source generator from the `Analyzers` item group. Removing the source generator prevents it from being used during compilation.
@@ -121,17 +121,6 @@ The automatic resolution behavior is currently available for XML documentation c
121121
* Associating the text content to compilation symbols.
122122
* Developing an understanding of the inheritance hierarchy associated with the types.
123123

124-
125-
<!-- ## Frequently Asked Questions
126-
127-
Moved to intro ### What is the OpenAPI XML documentation support feature?
128-
129-
The feature automatically extracts XML documentation comments from code and uses them to populate OpenAPI documentation. API documentation is generated directly from code comments, keeping them in sync. -->
130-
131-
132-
133-
134-
135124
XML documentation comments from `ProjectReferences` are automatically resolved and don't require additional configuration.
136125

137126
### Supported XML documentation tags
@@ -165,10 +154,6 @@ To add examples to documentation, use the [`<example>`](/dotnet/csharp/language-
165154
/// <param name="id" example="42">The unique identifier</param>
166155
```
167156

168-
<!-- move FAQ to topic --> zzz
169-
170-
171-
172157
<a name="download10"></a>
173158

174159
## Download and run the API sample

0 commit comments

Comments
 (0)