Skip to content

vnext regen resources, fix api-version method parameter#1126

Merged
weidongxu-microsoft merged 6 commits intovnextfrom
vnext_regen_resources
Mar 24, 2020
Merged

vnext regen resources, fix api-version method parameter#1126
weidongxu-microsoft merged 6 commits intovnextfrom
vnext_regen_resources

Conversation

@weidongxu-microsoft
Copy link
Member

fix #1084

@weidongxu-microsoft weidongxu-microsoft changed the base branch from master to vnext March 23, 2020 07:14
@weidongxu-microsoft weidongxu-microsoft changed the title vnext regen resources vnext regen resources, fix api-version method parameter Mar 23, 2020
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Licensed under the MIT License.
Copy link
Contributor

@xseeseesee xseeseesee Mar 23, 2020

Choose a reason for hiding this comment

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

Should we apply this change to all existing files in different modules?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can get some script to do this. Maybe later when someone finished more important tasks...

Currently newly generated code will use this short style.

@weidongxu-microsoft
Copy link
Member Author

PR on spec Azure/azure-rest-api-specs#8803

@weidongxu-microsoft
Copy link
Member Author

Fix #1084


/*
* Entity representing the reference to the template.
* The URI of the template. Use either the templateLink property or the
Copy link
Member

Choose a reason for hiding this comment

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

is this change caused by generator change also?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. I think it is from changes by modelerfour. Not confirmed.

public PagedIterable<Deployment> listByResourceGroup(String groupName) {
// FIXME: filter & top parameter
return this.manager().inner().deployments().listByResourceGroup(groupName, null, null).mapPage(inner -> createFluentModel(inner));
return this.manager().inner().deployments().listByResourceGroup(groupName).mapPage(inner -> createFluentModel(inner));
Copy link
Member

Choose a reason for hiding this comment

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

just confirm, this is change from generator

Copy link
Member Author

@weidongxu-microsoft weidongxu-microsoft Mar 23, 2020

Choose a reason for hiding this comment

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

Actually this is Impl change.

The resources RP is among the 1st to migrate. Hence there remains quite some TODO/FIXME.

The method call is actually same, but older generator does not generate the method with default parameters (hence the 2 nulls need to be written explicitly in code before).

@weidongxu-microsoft weidongxu-microsoft merged commit 8861f61 into vnext Mar 24, 2020
@weidongxu-microsoft weidongxu-microsoft deleted the vnext_regen_resources branch March 24, 2020 03:32
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.

[FEATURE REQ] Missing apiVersion parameter to generic resource

3 participants

Comments