Skip to content
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

Closed
wants to merge 19 commits into from

Conversation

brnleehng
Copy link
Contributor

@brnleehng brnleehng commented Apr 29, 2016

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

@azuresdkci
Copy link

Can one of the admins verify this patch?

@azurecla
Copy link

Hi @brnleehng, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!


It looks like you're working at Microsoft (brhoan). If you're full-time, we DON'T require a contribution license agreement.



If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@amarzavery
Copy link
Contributor

@azuresdkci - Test this please!

@brnleehng
Copy link
Contributor Author

@amarzavery Travis build passed, but the Jenkins build failed. Is there some configuration issues for Jenkins ?

@brnleehng
Copy link
Contributor Author

brnleehng commented May 2, 2016

Nevermind. Found the issue, will fix it

@brnleehng brnleehng closed this May 2, 2016
@brnleehng brnleehng reopened this May 2, 2016
@azuresdkci
Copy link

Can one of the admins verify this patch?

@azurecla
Copy link

azurecla commented May 2, 2016

Hi @brnleehng, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!


It looks like you're working at Microsoft (brhoan). If you're full-time, we DON'T require a contribution license agreement.



If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@brnleehng
Copy link
Contributor Author

@amarzavery
Copy link
Contributor

@azuresdkci - Add to whitelist

@jianghaolu
Copy link
Contributor

@azuresdkci retest this please

@tbombach
Copy link
Member

This PR addresses the "get or set prefix" issue from #981
(@brnleehng That way this PR shows up on the issue if someone wants to address the other points in that issue)

@@ -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)
Copy link
Member

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()

Copy link
Contributor Author

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

@@ -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.
Copy link
Member

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).

@tbombach
Copy link
Member

@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.

@hovsepm
Copy link
Contributor

hovsepm commented May 12, 2016

same as #1035

@hovsepm hovsepm closed this May 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants