Skip to content

Conversation

@captainsafia
Copy link
Member

@captainsafia captainsafia commented Aug 11, 2025

Closes #63201.

  • If <summary> is the only tag on a property, it is set as the description.
  • If both <summary> and <value> are on a property, then they are both set in the description as {summary}\n{value}
  • If only <value> is set, it is set as the description.
  • <returns> is ignored since it doesn't make sense to have on a property and its clearer if we only repect it on methods.

Copilot AI review requested due to automatic review settings August 11, 2025 21:23
@captainsafia captainsafia requested a review from a team as a code owner August 11, 2025 21:23
@github-actions github-actions bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Aug 11, 2025
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

This PR standardizes how XML documentation comments are processed for properties in OpenAPI generation. The change implements a new priority system where both <summary> and <value> tags are combined in property descriptions, while <returns> tags are ignored for properties since they don't make semantic sense.

  • Implements new logic to combine <summary> and <value> tags with newline separation
  • Ignores <returns> tags on properties since they're not semantically appropriate
  • Updates all test snapshots to reflect the new combined description format

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

File Description
XmlCommentGenerator.Emitter.cs Core implementation of the new property comment standardization logic
Various test snapshot files Updated to reflect new combined description format with summary and value
Test files (SchemaTests.cs, OperationTests.MinimalApis.cs, CompletenessTests.cs, AdditionalTextsTests.Schemas.cs) Added comprehensive test cases and updated assertions for the new behavior

@captainsafia captainsafia enabled auto-merge (squash) August 11, 2025 23:41
@captainsafia captainsafia merged commit 9941a37 into main Aug 12, 2025
29 checks passed
@captainsafia captainsafia deleted the safia/fix-summary-ordering branch August 12, 2025 06:16
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-rc1 milestone Aug 12, 2025
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 feature-openapi

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix up resolution logic for property summaries

3 participants