-
Notifications
You must be signed in to change notification settings - Fork 43
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
Next Link is named correctly and no longer duplicated #18
Conversation
@mcardosos, |
@@ -226,35 +226,6 @@ public string Fields() | |||
indented.Append(((CompositeTypeGo)BaseModelType).Fields()); | |||
} | |||
|
|||
// If the type is a paged model type, ensure the nextLink field exists | |||
// Note: Inject the field into a copy of the property list so as to not pollute the original list | |||
if (!string.IsNullOrEmpty(NextLink)) |
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.
If NextLink is no longer required please remove it.
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.
It is still used on the template for paged methods convinience.
src/Model/MethodGo.cs
Outdated
var nextLinkProperty = CodeNamerGo.Instance.GetPropertyName(CodeNamerGo.PascalCaseWithoutChar(nextLink, '.')); | ||
if ((ReturnType.Body as CompositeTypeGo).Properties.Any(p => p.Name.EqualsIgnoreCase(nextLinkProperty))) | ||
{ | ||
(ReturnType.Body as CompositeTypeGo).Properties.First(p => p.Name.EqualsIgnoreCase(nextLinkProperty)).Name = nextLinkProperty; |
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.
It seems dubious that a getter is mutating state like this. Shouldn't the name have been fixed up during transformation?
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.
Fixed
consider this as passingRetriggered locally, went through. Sorry about the servers failing, we're fine tuning auto-publishing on PR merge right now... |
publish jobfailed
|
Fixes Azure/autorest#2219
PTAL
@jhendrixMSFT @marstr