-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Standardize pattern used for property comments #63224
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
Conversation
There was a problem hiding this 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 |
Closes #63201.
<summary>is the only tag on a property, it is set as the description.<summary>and<value>are on a property, then they are both set in the description as{summary}\n{value}<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.