Improve XML docs for OpenApiDocumentTransformerContext and ApiDescriptionGroup#65786
Open
mikekistler wants to merge 3 commits intodotnet:mainfrom
Open
Improve XML docs for OpenApiDocumentTransformerContext and ApiDescriptionGroup#65786mikekistler wants to merge 3 commits intodotnet:mainfrom
mikekistler wants to merge 3 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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
OpenApiDocumentTransformerContextmembers (DocumentName,DescriptionGroups,ApplicationServices,GetOrCreateSchemaAsync). - Added remarks to
ApiDescriptionGroupexplaining howApiDescription.GroupNameis assigned (e.g., viaWithGroupName/[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. |
src/OpenApi/src/Transformers/OpenApiDocumentTransformerContext.cs
Outdated
Show resolved
Hide resolved
| /// </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>. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #61264
This PR improves the XML documentation for public members of
OpenApiDocumentTransformerContextandApiDescriptionGroup: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 toAddOpenApi.ApplicationServices: Fixed grammar, added remarks explaining this is a scopedIServiceProvider, plus a code example.GetOrCreateSchemaAsync: Split dense summary into summary + remarks for consistency.ApiDescriptionGroup(class): Added remarks explaining how endpoints are grouped viaWithGroupName/[ApiExplorerSettings].