Skip to content

Improve XML docs for OpenApiDocumentTransformerContext and ApiDescriptionGroup#65786

Open
mikekistler wants to merge 3 commits intodotnet:mainfrom
mikekistler:mdk/improve-transformer-context-docs
Open

Improve XML docs for OpenApiDocumentTransformerContext and ApiDescriptionGroup#65786
mikekistler wants to merge 3 commits intodotnet:mainfrom
mikekistler:mdk/improve-transformer-context-docs

Conversation

@mikekistler
Copy link
Contributor

Fixes #61264

This PR improves the XML documentation for public members of OpenApiDocumentTransformerContext and ApiDescriptionGroup:

  • DescriptionGroups: Added remarks explaining what the groups contain and how they can be used in document transformers, plus a code example.
  • DocumentName: Added remarks explaining this corresponds to the name passed to AddOpenApi.
  • ApplicationServices: Fixed grammar, added remarks explaining this is a scoped IServiceProvider, plus a code example.
  • GetOrCreateSchemaAsync: Split dense summary into summary + remarks for consistency.
  • ApiDescriptionGroup (class): Added remarks explaining how endpoints are grouped via WithGroupName / [ApiExplorerSettings].

@mikekistler mikekistler requested review from a team and halter73 as code owners March 15, 2026 15:29
Copilot AI review requested due to automatic review settings March 15, 2026 15:29
@github-actions github-actions bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Mar 15, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves public XML documentation for OpenAPI transformer context and ApiExplorer grouping to better explain how document transformers can use document name, service provider, schema generation, and endpoint grouping metadata.

Changes:

  • Added/expanded XML doc remarks and examples for OpenApiDocumentTransformerContext members (DocumentName, DescriptionGroups, ApplicationServices, GetOrCreateSchemaAsync).
  • Added remarks to ApiDescriptionGroup explaining how ApiDescription.GroupName is assigned (e.g., via WithGroupName / [ApiExplorerSettings]).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/OpenApi/src/Transformers/OpenApiDocumentTransformerContext.cs Adds richer remarks/examples for key context properties and splits dense schema docs into summary + remarks.
src/Mvc/Mvc.ApiExplorer/src/ApiDescriptionGroup.cs Clarifies grouping semantics via ApiDescription.GroupName and common ways to set it.

/// </summary>
/// <remarks>
/// This corresponds to the document name provided when calling
/// <c>AddOpenApi</c> during service registration. The default document name is <c>"v1"</c>.
mikekistler and others added 2 commits March 15, 2026 10:59
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[OpenAPI] Cannot skip SecurityScheme for controllers with [AllowAnonymous]

2 participants