Skip to content

Commit

Permalink
remove all hosts from global parameters (#972)
Browse files Browse the repository at this point in the history
  • Loading branch information
iscai-msft authored Jul 13, 2021
1 parent 8e79e6f commit e294bb0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change Log

### 2021-07-06 - 5.8.4

min Autorest core version: 3.3.0

min Modelerfour version: 4.19.1

**Bug Fixes**

- Remove all hosts from global parameters, regardless of how many m4 sends us #972

### 2021-07-06 - 5.8.3

min Autorest core version: 3.3.0
Expand Down
6 changes: 3 additions & 3 deletions autorest/codegen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ def _create_code_model(self, yaml_data: Dict[str, Any], options: Dict[str, Union
first_req_of_first_op_of_first_grp = yaml_data["operationGroups"][0]["operations"][0]["requests"][0]
code_model.custom_base_url = first_req_of_first_op_of_first_grp["protocol"]["http"]["uri"]
else:
dollar_host_parameter = dollar_host[0]
code_model.global_parameters.remove(dollar_host_parameter)
code_model.base_url = dollar_host_parameter.yaml_data["clientDefaultValue"]
for host in dollar_host:
code_model.global_parameters.remove(host)
code_model.base_url = dollar_host[0].yaml_data["clientDefaultValue"]

# Create operations
if yaml_data.get("operationGroups"):
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autorest/python",
"version": "5.8.3",
"version": "5.8.4",
"description": "The Python extension for generators in AutoRest.",
"scripts": {
"prepare": "node run-python3.js prepare.py",
Expand Down

0 comments on commit e294bb0

Please sign in to comment.