Skip to content

Verify XML documentation for AddOpenAPI extension methods #62024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented May 20, 2025

This PR addresses issue #58807 which requested adding examples to the XML documentation for AddOpenApi extension methods to help new .NET developers understand common usage patterns.

After reviewing the codebase, I found that all four overloads of the AddOpenApi extension methods already have proper XML documentation with examples:

  1. The parameterless overload AddOpenApi(this IServiceCollection services) has an example showing usage with WebApplicationBuilder
  2. The overload with document name AddOpenApi(this IServiceCollection services, string documentName) has an example
  3. The overload with options configuration AddOpenApi(this IServiceCollection services, Action<OpenApiOptions> configureOptions) has an example
  4. The overload with both document name and options AddOpenApi(this IServiceCollection services, string documentName, Action<OpenApiOptions> configureOptions) has an example

All examples follow XML documentation best practices and show consistent usage patterns with WebApplicationBuilder:

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddOpenApi();

These examples effectively demonstrate how to use the extension methods with a WebApplicationBuilder, which addresses the issue's request to show common usage patterns for new .NET developers.

No changes were needed to the documentation as it already meets the requirements specified in the issue.

Fixes #58807.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dc.services.visualstudio.com
    • Triggering command: /home/REDACTED/work/aspnetcore/aspnetcore/.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /warnaserror /p:TreatWarningsAsErrors=true /p:ContinuousIntegrationBuild=false /home/REDACTED/work/aspnetcore/aspnetcore/artifacts/toolset/restore.proj /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/aspnetcore/aspnetcore/artifacts/toolset/10.0.0-beta.25265.101.txt (dns block)
  • pkgs.dev.azure.com
    • Triggering command: /home/REDACTED/work/aspnetcore/aspnetcore/.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /warnaserror /p:TreatWarningsAsErrors=true /p:ContinuousIntegrationBuild=false /home/REDACTED/work/aspnetcore/aspnetcore/artifacts/toolset/restore.proj /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/aspnetcore/aspnetcore/artifacts/toolset/10.0.0-beta.25265.101.txt (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Add examples to xmldoc for AddOpenAPI extension methods/overloads Verify XML documentation for AddOpenAPI extension methods May 20, 2025
@Copilot Copilot AI requested a review from captainsafia May 20, 2025 19:23
Copilot finished work on behalf of captainsafia May 20, 2025 19:24
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview5 milestone May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add examples to xmldoc for AddOpenAPI extension methods/overloads
2 participants