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

compute paging error #352

Closed
lmazuel opened this issue Jun 16, 2016 · 8 comments
Closed

compute paging error #352

lmazuel opened this issue Jun 16, 2016 · 8 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved.

Comments

@lmazuel
Copy link
Member

lmazuel commented Jun 16, 2016

The compute composite Swagger file has an error

The latest codegen enforce the check for paging extension to make sure there has a property in the response to match the property name specified in extension.

This file presents an error on Travis.

@xingwu1
Copy link
Member

xingwu1 commented Jun 16, 2016

This is valid issue for ListUsagesResult of Usage_List.

containerService.json is in correct format.

@xingwu1 xingwu1 added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jun 16, 2016
@amarzavery
Copy link
Contributor

amarzavery commented Jun 16, 2016

@huangpf @sauryadas

Can you please verify whether Usages_List is truly pageable? Does it support nextLink? The extension has been defined with nextLink however the model UsagesListResult does not have nextLink as a modelProperty. If this is not a pageable operation and you still want flattening (IEnumerable) to be returned then please explicitly set nextLink property of the x-ms-pageable extension to null. Check the docs over here.

If it supports nextLink then please add nextLink as a property of the corresponding model.

@huangpf
Copy link
Contributor

huangpf commented Jun 16, 2016

I will check with the team, but this spec was converted from the Hyak->Swagger tool by your team, so maybe the bug (if any) is from there.

BTW, can the code gen tool not enforce the check?

@amarzavery
Copy link
Contributor

The hyak to swagger converter was not 100% accurate and it just gave the service teams something to start with rather than service teams writing the swagger spec from scratch. This bug was caught as a larger goal of creating a linter for the spec. Now that it has ben caught, please make sure to resolve this at the earliest.

@huangpf
Copy link
Contributor

huangpf commented Jun 16, 2016

That's a very valid ask, and we would double check it, and fix it.

But instead of ad-hoc check and fix, can you do a sweep check on the big specs, so that we can fix them all? Thanks. + @hyonholee

@amarzavery
Copy link
Contributor

As I said this is a part of a larger goal. The Swagger spec linter (winter) is coming !! #GOT ;)
@tbombach

@huangpf
Copy link
Contributor

huangpf commented Jun 26, 2016

The usage list API doesn't seem to be pageable, but some others with this property defined do not seem to work properly in AutoRest generated Node.js SDK & thus CLI.

Please refer to:
https://github.com/Azure/azure-xplat-cli/issues/2961
https://github.com/Azure/azure-xplat-cli/issues/2960

@lmazuel
Copy link
Member Author

lmazuel commented Jun 29, 2016

Close this one, it's ok now. Thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved.
Projects
None yet
Development

No branches or pull requests

4 participants