add default message when the summary of a protocol/convenience method is missing#4592
Merged
ArcturusZhang merged 9 commits intoAzure:feature/v3from Apr 18, 2024
Conversation
archerzz
approved these changes
Apr 17, 2024
pshao25
reviewed
Apr 17, 2024
src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs
Outdated
Show resolved
Hide resolved
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.
Description
The issue this PR is trying to resolve was first found in this PR: #4573
Previously when an operation in tsp has no
@docdecorator, we will generate nothing in summary of xml doc.This works fine in our existing cases, but in the new pattern for non-azure libraries, a convenience method could have no parameters because it no longer takes
cancellationToken.Our
CodeWriteris designed in this way: when we told it to write a xml tagsummarybut it turns out to write nothing like:it will remove this line as if we never let it to write this.
This would be a trouble if a method takes no parameters:
And at the end, this public method is written without a xml doc, and this leads to a compilation error.
Therefore this PR introduces a default message for the operation, such as:
The {name} method, so that we at least will writesummaryfor a method.Checklist
To ensure a quick review and merge, please ensure:
Ready to Land?