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

Investigate paging mismatch on some combination #647

Closed
lmazuel opened this issue May 26, 2020 · 0 comments
Closed

Investigate paging mismatch on some combination #647

lmazuel opened this issue May 26, 2020 · 0 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. p0

Comments

@lmazuel
Copy link
Member

lmazuel commented May 26, 2020

And if an operation defines a basic x-ms-pageable:

        "x-ms-pageable": {
          "nextLinkName": null
        }

And a model that uses x-ms-client-name:

"ListIndexesResult": {
      "properties": {
        "value": {
          "x-ms-client-name": "Indexes",
          "type": "array",
          "readOnly": true,
          "items": {
            "$ref": "#/definitions/SearchIndex"
          },
          "description": "The indexes in the Search service."
        }
      },
      "required": [
        "value"
      ],
      "description": "Response from a List Indexes request. If successful, it includes the full definitions of all indexes."
    },

We generate the wrong code, we try to access value where we should access indexes:

    async def extract_data(pipeline_response):
        deserialized = self._deserialize('ListIndexesResult', pipeline_response)
>       list_of_elem = deserialized.value
E       AttributeError: 'ListIndexesResult' object has no attribute 'value'
@lmazuel lmazuel added bug This issue requires a change to an existing behavior in the product in order to be resolved. Autorest v3 refactoring p0 labels May 26, 2020
@lmazuel lmazuel closed this as completed May 26, 2020
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. p0
Projects
None yet
Development

No branches or pull requests

1 participant