Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into optional_return_type

* 'autorestv3' of https://github.com/Azure/autorest.python:
  added generating wiki to readme for better access (#646)
  correct item name of paging response model (#648)
  Preview 8
  • Loading branch information
iscai-msft committed May 28, 2020
2 parents bef37bd + ac7e496 commit af1a8f5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
### Unreleased
Modelerfour version: 4.13.351

**Bug Fixes**
- Corrected generation of the item name of paging response when extracting data #648

### 2020-05-22 - 5.0.0-preview.8
Modelerfour version: 4.13.351

**Bug Fixes**

- Corrected ordering of summary and description in generated methods #640
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Generating with Autorest for Python v5.0.0

See [here](https://github.com/Azure/autorest.python/wiki/Generating-with-autorest-for-python-v5.0.0)

# Contributing

Expand Down
3 changes: 1 addition & 2 deletions autorest/codegen/models/paging_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,13 @@ def item_name(self) -> str:
# Default value. I still check if I find it, so I can do a nice message.
item_name = "value"
try:
self._find_python_name(item_name, "itemName")
return self._find_python_name(item_name, "itemName")
except ValueError:
response = self._get_response()
raise ValueError(
f"While scanning x-ms-pageable, itemName was not defined and object"
+ f" {response.schema.name} has no array called 'value'"
)
return item_name
return self._find_python_name(self._item_name, "itemName")

@property
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autorest/python",
"version": "5.0.0-preview.7",
"version": "5.0.0-preview.8",
"description": "The Python extension for generators in AutoRest.",
"scripts": {
"prepare": "python prepare.py",
Expand Down Expand Up @@ -37,4 +37,4 @@
"venvtools.py",
"run-python3.js"
]
}
}

0 comments on commit af1a8f5

Please sign in to comment.