-
Notifications
You must be signed in to change notification settings - Fork 741
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
Added "gets or sets" rule for the model template in the CSharp code generator #989
Conversation
Can one of the admins verify this patch? |
Hi @brnleehng, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!
TTYL, AZPRBOT; |
@azuresdkci - Test this please! |
…nto feature/doc-strings
@amarzavery Travis build passed, but the Jenkins build failed. Is there some configuration issues for Jenkins ? |
Nevermind. Found the issue, will fix it |
Can one of the admins verify this patch? |
Hi @brnleehng, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!
TTYL, AZPRBOT; |
…nto feature/doc-strings
Ran a Jenkins job (http://azuresdkci.cloudapp.net/view/3-AutoRest/job/autorest/2261/) |
@azuresdkci - Add to whitelist |
@azuresdkci retest this please |
This PR addresses the "get or set prefix" issue from #981 |
@@ -137,8 +137,13 @@ private static bool ShouldValidate(this IType model) | |||
/// </summary> | |||
/// <param name="property">The given property documentation to format</param> | |||
/// <returns></returns> | |||
public static string GetFormattedPropertyDocumentation(PropertyTemplateModel property) | |||
public static string GetFormattedPropertyDocumentation(Property property) |
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.
Could you make this an extension method like the other methods in this file? That way you can just call property.GetFormattedPropertyDocumentation()
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.
Okay will make this change
…nto feature/doc-strings
@@ -132,6 +132,36 @@ private static bool ShouldValidate(this IType model) | |||
} | |||
|
|||
/// <summary> | |||
/// Format the documentation of a property properly with the correct getters and setters. Note that this validation will | |||
/// only acryonyms and article words. |
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.
Minor issue: looks like the last sentence of this method summary has a missing word and typo (acronyms).
@brnleehng Sorry for not catching it in the first pass, but the only remaining thing looks like a minor typo in one of the method descriptions. Everything else looks good. Do you mind updating the PR for this? I'll merge it as soon as it passes the tests again. |
same as #1035 |
Four changes:
1 - Added more correct doc strings
2 - Capitalize some abbreviations such as JSON and HTTP
3 - Created a rule for "gets or sets" in the model template, however it does not cover the case where the first word such as "Azure" or any words that should be capitalize
4 - Regenerated expected tests