diff --git a/ChangeLog.md b/ChangeLog.md index d36617de9ca..93452151280 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,14 @@ # Change Log +### 2020-09-17 - 5.3.3 +Autorest core version: 3.0.6318 + +Modelerfour version: 4.15.419 + +**Bug fixes** + +- Fix trailing comma issues in metadata.json (unblocks resource multiapi generation) #777 + ### 2020-09-14 - 5.3.2 Autorest core version: 3.0.6318 diff --git a/autorest/codegen/templates/metadata.json.jinja2 b/autorest/codegen/templates/metadata.json.jinja2 index 37322018bdb..c6cab5c0b82 100644 --- a/autorest/codegen/templates/metadata.json.jinja2 +++ b/autorest/codegen/templates/metadata.json.jinja2 @@ -36,10 +36,8 @@ {% endfor %} }, "constant": { - {% for gp in code_model.global_parameters.constant %} - {% if gp.serialized_name != "api_version" %} + {% for gp in code_model.global_parameters.constant | rejectattr("serialized_name", "equalto", "api_version") %} {{ gp.serialized_name | tojson }}: {{ gp.constant_declaration | tojson }}{{ "," if not loop.last else "" }} - {% endif %} {% endfor %} }, "call": {{ code_model.global_parameters.method | map(attribute="serialized_name") | join(', ') | tojson }} @@ -52,10 +50,8 @@ "credential_key_header_name": {{ code_model.options['credential_key_header_name'] | tojson }} }, "operation_groups": { - {% for operation_group in code_model.operation_groups %} - {% if not operation_group.is_empty_operation_group %} + {% for operation_group in code_model.operation_groups | rejectattr('is_empty_operation_group') %} {{ operation_group.name | tojson }}: {{ operation_group.class_name | tojson }}{{ "," if not loop.last else "" }} - {% endif %} {% endfor %} }, "operation_mixins": { diff --git a/package.json b/package.json index 254d1d68985..79372b358c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/python", - "version": "5.3.2", + "version": "5.3.3", "description": "The Python extension for generators in AutoRest.", "scripts": { "prepare": "node run-python3.js prepare.py",