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

Next Link is named correctly and no longer duplicated #18

Merged
merged 4 commits into from
Sep 22, 2017

Conversation

mcardosos
Copy link
Contributor

@msftclas
Copy link

@mcardosos,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

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

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.

Copy link
Contributor Author

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.

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;
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@olydis
Copy link
Contributor

olydis commented Sep 22, 2017

consider this as passing

Retriggered locally, went through. Sorry about the servers failing, we're fine tuning auto-publishing on PR merge right now...

@mcardosos mcardosos merged commit d73e85c into Azure:master Sep 22, 2017
@mcardosos mcardosos deleted the nextlink branch September 22, 2017 23:15
@olydis
Copy link
Contributor

olydis commented Sep 22, 2017

publish job

failed

npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

> dotnet-2.0.0@1.2.0 postinstall C:\Users\ci\AppData\Local\Temp\PUBLISHugt8j\18_20170922T231704\autorest.go\node_modules\dotnet-2.0.0
> node -e "try { fs.statSync('./dist/app.js') ; require('./dist/app.js')} catch (e){}"

Recording package path for platform-specific runtime: C:\Users\ci\.net\2.0.0\node_modules\dotnet-2.0.0-win\

> dotnet-sdk-2.0.0@1.2.0 postinstall C:\Users\ci\AppData\Local\Temp\PUBLISHugt8j\18_20170922T231704\autorest.go\node_modules\dotnet-sdk-2.0.0
> node -e "try { fs.statSync('./dist/app.js') ; require('./dist/app.js')} catch (e){}"

Recording package path for platform-specific runtime: C:\Users\ci\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\

> @microsoft.azure/autorest.go@1.9.2 prepare C:\Users\ci\AppData\Local\Temp\PUBLISHugt8j\18_20170922T231704\autorest.go
> gulp build

[16:19:05] Using gulpfile ~\AppData\Local\Temp\PUBLISHugt8j\18_20170922T231704\autorest.go\gulpfile.js
[16:19:05] Starting 'init'...
[16:19:05] Finished 'init' after 717 μs
[16:19:05] Starting 'clear-cache-on-force'...
[16:19:05] Finished 'clear-cache-on-force' after 23 μs
[16:19:05] Starting 'restore'...
           C:\Users\ci\AppData\Local\Temp\PUBLISHugt8j\18_20170922T231704\autorest.go :: dotnet restore C:\Users\ci\AppData\Local\Temp\PUBLISHugt8j\18_20170922T231704\autorest.go\src\autorest.go.csproj /nologo
[16:19:10] Finished 'restore' after 5.35 s
[16:19:10] Starting 'build/dotnet'...
           C:\Users\ci\AppData\Local\Temp\PUBLISHugt8j\18_20170922T231704\autorest.go :: dotnet build -c Debug C:\Users\ci\AppData\Local\Temp\PUBLISHugt8j\18_20170922T231704\autorest.go/autorest.go.sln /nologo /clp:NoSummary
           C:\Users\ci\AppData\Local\Temp\PUBLISHugt8j\18_20170922T231704\autorest.go :: dotnet publish -c Debug C:\Users\ci\AppData\Local\Temp\PUBLISHugt8j\18_20170922T231704\autorest.go/src/ --output C:\Users\ci\AppData\Local\Temp\PUBLISHugt8j\18_20170922T231704\autorest.go/src//bin/netcoreapp2.0 /nologo /clp:NoSummary 
[16:19:31] Finished 'build/dotnet' after 21 s
[16:19:31] Starting 'build'...
Building project in C:\Users\ci\AppData\Local\Temp\PUBLISHugt8j\18_20170922T231704\autorest.go
[16:19:31] Finished 'build' after 163 μs
npm notice created a lockfile as package-lock.json. You should commit this file.
added 833 packages in 145.814s
npm ERR! missing script: publish-preview

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ci\AppData\Roaming\npm-cache\_logs\2017-09-22T23_19_34_006Z-debug.log

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.

5 participants