From 88438dfb11b631bdea5bf49ad78eac2d68da1694 Mon Sep 17 00:00:00 2001 From: annatisch Date: Tue, 10 May 2016 14:47:58 -0700 Subject: [PATCH] Regenerated tests --- .../auto_rest_duration_test_service.py | 2 +- ...to_rest_parameter_grouping_test_service.py | 2 +- .../auto_rest_report_service_for_azure.py | 2 +- ...o_rest_resource_flattening_test_service.py | 4 +- ...st_azure_special_parameters_test_client.py | 2 +- ...uto_rest_parameterized_host_test_client.py | 2 +- .../auto_rest_head_test_service.py | 2 +- .../auto_rest_head_exception_test_service.py | 2 +- ...est_long_running_operation_test_service.py | 2 +- .../lr_os_custom_header_operations.py | 8 ++-- .../operations/lr_os_operations.py | 46 +++++++++---------- .../operations/lro_retrys_operations.py | 8 ++-- .../operations/lrosa_ds_operations.py | 36 +++++++-------- .../auto_rest_paging_test_service.py | 2 +- .../operations/storage_accounts_operations.py | 8 ++-- .../storage_management_client.py | 2 +- .../microsoft_azure_test_url.py | 2 +- .../AutoRest.Generator.Azure.Python.csproj | 4 ++ .../auto_rest_swagger_bat_array_service.py | 2 +- .../auto_rest_bool_test_service.py | 2 +- .../auto_rest_swagger_bat_byte_service.py | 2 +- .../auto_rest_complex_test_service.py | 2 +- .../operations/array.py | 4 +- .../operations/basic_operations.py | 2 +- .../operations/dictionary.py | 4 +- .../operations/inheritance.py | 2 +- .../operations/polymorphicrecursive.py | 2 +- .../operations/polymorphism.py | 4 +- .../operations/primitive.py | 22 ++++----- .../operations/readonlyproperty.py | 2 +- .../auto_rest_date_test_service.py | 2 +- .../auto_rest_date_time_test_service.py | 2 +- ...uto_rest_rfc1123_date_time_test_service.py | 2 +- ...uto_rest_swagger_ba_tdictionary_service.py | 2 +- .../auto_rest_duration_test_service.py | 2 +- .../auto_rest_swagger_bat_file_service.py | 2 +- ...auto_rest_swagger_bat_form_data_service.py | 2 +- .../auto_rest_integer_test_service.py | 2 +- .../auto_rest_number_test_service.py | 2 +- .../auto_rest_swagger_bat_service.py | 2 +- ...uto_rest_parameterized_host_test_client.py | 2 +- ...t_parameterized_custom_host_test_client.py | 2 +- .../auto_rest_swagger_bat_header_service.py | 2 +- ...o_rest_http_infrastructure_test_service.py | 2 +- ...o_rest_resource_flattening_test_service.py | 10 ++-- .../auto_rest_parameter_flattening.py | 2 +- .../operations/availability_sets.py | 2 +- .../auto_rest_report_service.py | 2 +- ...uto_rest_required_optional_test_service.py | 2 +- .../operations/explicit.py | 20 ++++---- .../auto_rest_url_test_service.py | 2 +- .../auto_rest_validation_test.py | 6 +-- .../operations/storage_accounts_operations.py | 8 ++-- .../storage_management_client.py | 2 +- .../swaggerpetstore/swagger_petstore.py | 12 ++--- 55 files changed, 143 insertions(+), 139 deletions(-) diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureBodyDuration/autorestdurationtestservice/auto_rest_duration_test_service.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureBodyDuration/autorestdurationtestservice/auto_rest_duration_test_service.py index 532c33c573..c0d65d8ae7 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureBodyDuration/autorestdurationtestservice/auto_rest_duration_test_service.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureBodyDuration/autorestdurationtestservice/auto_rest_duration_test_service.py @@ -93,7 +93,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.duration = DurationOperations( diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureParameterGrouping/autorestparametergroupingtestservice/auto_rest_parameter_grouping_test_service.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureParameterGrouping/autorestparametergroupingtestservice/auto_rest_parameter_grouping_test_service.py index 1500484290..6e0264658e 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureParameterGrouping/autorestparametergroupingtestservice/auto_rest_parameter_grouping_test_service.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureParameterGrouping/autorestparametergroupingtestservice/auto_rest_parameter_grouping_test_service.py @@ -93,7 +93,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.parameter_grouping = ParameterGroupingOperations( diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureReport/autorestreportserviceforazure/auto_rest_report_service_for_azure.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureReport/autorestreportserviceforazure/auto_rest_report_service_for_azure.py index 624bcd5521..948ebd9677 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureReport/autorestreportserviceforazure/auto_rest_report_service_for_azure.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureReport/autorestreportserviceforazure/auto_rest_report_service_for_azure.py @@ -91,7 +91,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureResource/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureResource/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py index aab82f8862..872a69a821 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureResource/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureResource/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py @@ -91,7 +91,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -329,7 +329,7 @@ def put_resource_collection( # Construct body if resource_complex_object is not None: - body_content = self._serialize.body(resource_complex_object, models.ResourceCollection) + body_content = self._serialize.body(resource_complex_object, 'ResourceCollection') else: body_content = None diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/auto_rest_azure_special_parameters_test_client.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/auto_rest_azure_special_parameters_test_client.py index 27217a362f..1c7d3213c7 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/auto_rest_azure_special_parameters_test_client.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureSpecials/autorestazurespecialparameterstestclient/auto_rest_azure_special_parameters_test_client.py @@ -134,7 +134,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.xms_client_request_id = XMsClientRequestIdOperations( diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/auto_rest_parameterized_host_test_client.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/auto_rest_parameterized_host_test_client.py index f6902e55c6..5c9a07ff0f 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/auto_rest_parameterized_host_test_client.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/auto_rest_parameterized_host_test_client.py @@ -101,7 +101,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.paths = PathsOperations( diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Head/autorestheadtestservice/auto_rest_head_test_service.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Head/autorestheadtestservice/auto_rest_head_test_service.py index 786fdce1b8..6d2a167e23 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Head/autorestheadtestservice/auto_rest_head_test_service.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Head/autorestheadtestservice/auto_rest_head_test_service.py @@ -92,7 +92,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.http_success = HttpSuccessOperations( diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/HeadExceptions/autorestheadexceptiontestservice/auto_rest_head_exception_test_service.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/HeadExceptions/autorestheadexceptiontestservice/auto_rest_head_exception_test_service.py index 0a040dc195..833ddcb297 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/HeadExceptions/autorestheadexceptiontestservice/auto_rest_head_exception_test_service.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/HeadExceptions/autorestheadexceptiontestservice/auto_rest_head_exception_test_service.py @@ -92,7 +92,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.head_exception = HeadExceptionOperations( diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/auto_rest_long_running_operation_test_service.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/auto_rest_long_running_operation_test_service.py index 10be2f3377..68a1caef5b 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/auto_rest_long_running_operation_test_service.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/auto_rest_long_running_operation_test_service.py @@ -102,7 +102,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.lr_os = LROsOperations( diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_custom_header_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_custom_header_operations.py index 521b8b7e13..96ade6d8e3 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_custom_header_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_custom_header_operations.py @@ -74,7 +74,7 @@ def put_async_retry_succeeded( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -168,7 +168,7 @@ def put201_creating_succeeded200( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -256,7 +256,7 @@ def post202_retry200( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -339,7 +339,7 @@ def post_async_retry_succeeded( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_operations.py index 743e4acfed..4a078a8a86 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lr_os_operations.py @@ -71,7 +71,7 @@ def put200_succeeded( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -156,7 +156,7 @@ def put200_succeeded_no_state( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -241,7 +241,7 @@ def put202_retry200( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -327,7 +327,7 @@ def put201_creating_succeeded200( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -415,7 +415,7 @@ def put200_updating_succeeded204( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -501,7 +501,7 @@ def put201_creating_failed200( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -589,7 +589,7 @@ def put200_acceptedcanceled200( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -674,7 +674,7 @@ def put_no_header_in_retry( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -765,7 +765,7 @@ def put_async_retry_succeeded( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -858,7 +858,7 @@ def put_async_no_retry_succeeded( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -950,7 +950,7 @@ def put_async_retry_failed( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -1043,7 +1043,7 @@ def put_async_no_retrycanceled( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -1134,7 +1134,7 @@ def put_async_no_header_in_retry( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -1221,7 +1221,7 @@ def put_non_resource( # Construct body if sku is not None: - body_content = self._serialize.body(sku, models.Sku) + body_content = self._serialize.body(sku, 'Sku') else: body_content = None @@ -1303,7 +1303,7 @@ def put_async_non_resource( # Construct body if sku is not None: - body_content = self._serialize.body(sku, models.Sku) + body_content = self._serialize.body(sku, 'Sku') else: body_content = None @@ -1386,7 +1386,7 @@ def put_sub_resource( # Construct body if product is not None: - body_content = self._serialize.body(product, models.SubProduct) + body_content = self._serialize.body(product, 'SubProduct') else: body_content = None @@ -1469,7 +1469,7 @@ def put_async_sub_resource( # Construct body if product is not None: - body_content = self._serialize.body(product, models.SubProduct) + body_content = self._serialize.body(product, 'SubProduct') else: body_content = None @@ -2549,7 +2549,7 @@ def post202_retry200( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -2631,7 +2631,7 @@ def post202_no_retry204( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -2723,7 +2723,7 @@ def post_async_retry_succeeded( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -2816,7 +2816,7 @@ def post_async_no_retry_succeeded( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -2908,7 +2908,7 @@ def post_async_retry_failed( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -2991,7 +2991,7 @@ def post_async_retrycanceled( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lro_retrys_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lro_retrys_operations.py index 899a55b896..786c3c3bf6 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lro_retrys_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lro_retrys_operations.py @@ -73,7 +73,7 @@ def put201_creating_succeeded200( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -161,7 +161,7 @@ def put_async_relative_retry_succeeded( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -483,7 +483,7 @@ def post202_retry200( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -565,7 +565,7 @@ def post_async_relative_retry_succeeded( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lrosa_ds_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lrosa_ds_operations.py index d2de0cff4b..a211b6975e 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lrosa_ds_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Lro/autorestlongrunningoperationtestservice/operations/lrosa_ds_operations.py @@ -70,7 +70,7 @@ def put_non_retry400( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -156,7 +156,7 @@ def put_non_retry201_creating400( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -242,7 +242,7 @@ def put_non_retry201_creating400_invalid_json( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -329,7 +329,7 @@ def put_async_relative_retry400( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -629,7 +629,7 @@ def post_non_retry400( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -708,7 +708,7 @@ def post202_non_retry400( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -789,7 +789,7 @@ def post_async_relative_retry400( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -871,7 +871,7 @@ def put_error201_no_provisioning_state_payload( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -959,7 +959,7 @@ def put_async_relative_retry_no_status( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -1052,7 +1052,7 @@ def put_async_relative_retry_no_status_payload( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -1280,7 +1280,7 @@ def post202_no_location( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -1362,7 +1362,7 @@ def post_async_relative_retry_no_payload( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -1444,7 +1444,7 @@ def put200_invalid_json( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -1529,7 +1529,7 @@ def put_async_relative_retry_invalid_header( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -1622,7 +1622,7 @@ def put_async_relative_retry_invalid_json_polling( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -1927,7 +1927,7 @@ def post202_retry_invalid_header( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -2008,7 +2008,7 @@ def post_async_relative_retry_invalid_header( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None @@ -2091,7 +2091,7 @@ def post_async_relative_retry_invalid_json_polling( # Construct body if product is not None: - body_content = self._serialize.body(product, models.Product) + body_content = self._serialize.body(product, 'Product') else: body_content = None diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Paging/autorestpagingtestservice/auto_rest_paging_test_service.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Paging/autorestpagingtestservice/auto_rest_paging_test_service.py index b1bb993344..bf82da336e 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Paging/autorestpagingtestservice/auto_rest_paging_test_service.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/Paging/autorestpagingtestservice/auto_rest_paging_test_service.py @@ -93,7 +93,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.paging = PagingOperations( diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/operations/storage_accounts_operations.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/operations/storage_accounts_operations.py index 4c6883792a..2250ab10c1 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/operations/storage_accounts_operations.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/operations/storage_accounts_operations.py @@ -78,7 +78,7 @@ def check_name_availability( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(account_name, models.StorageAccountCheckNameAvailabilityParameters) + body_content = self._serialize.body(account_name, 'StorageAccountCheckNameAvailabilityParameters') # Construct and send request request = self._client.post(url, query_parameters) @@ -155,7 +155,7 @@ def create( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, models.StorageAccountCreateParameters) + body_content = self._serialize.body(parameters, 'StorageAccountCreateParameters') # Construct and send request def long_running_send(): @@ -386,7 +386,7 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, models.StorageAccountUpdateParameters) + body_content = self._serialize.body(parameters, 'StorageAccountUpdateParameters') # Construct and send request request = self._client.patch(url, query_parameters) @@ -656,7 +656,7 @@ def regenerate_key( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(regenerate_key, models.StorageAccountRegenerateKeyParameters) + body_content = self._serialize.body(regenerate_key, 'StorageAccountRegenerateKeyParameters') # Construct and send request request = self._client.post(url, query_parameters) diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/storage_management_client.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/storage_management_client.py index 68f581fd81..384c65cdaa 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/storage_management_client.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/storage_management_client.py @@ -116,7 +116,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.storage_accounts = StorageAccountsOperations( diff --git a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/microsoftazuretesturl/microsoft_azure_test_url.py b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/microsoftazuretesturl/microsoft_azure_test_url.py index 7283782c93..7a5752c265 100644 --- a/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/microsoftazuretesturl/microsoft_azure_test_url.py +++ b/AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/microsoftazuretesturl/microsoft_azure_test_url.py @@ -109,7 +109,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.group = GroupOperations( diff --git a/AutoRest/Generators/Python/Azure.Python/AutoRest.Generator.Azure.Python.csproj b/AutoRest/Generators/Python/Azure.Python/AutoRest.Generator.Azure.Python.csproj index 913e75195a..6ebaa9d83e 100644 --- a/AutoRest/Generators/Python/Azure.Python/AutoRest.Generator.Azure.Python.csproj +++ b/AutoRest/Generators/Python/Azure.Python/AutoRest.Generator.Azure.Python.csproj @@ -20,6 +20,10 @@ 4 + + False + ..\..\..\..\..\..\..\CxCache\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll + diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyArray/autorestswaggerbatarrayservice/auto_rest_swagger_bat_array_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyArray/autorestswaggerbatarrayservice/auto_rest_swagger_bat_array_service.py index 5708ff6c67..75d5ea27f0 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyArray/autorestswaggerbatarrayservice/auto_rest_swagger_bat_array_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyArray/autorestswaggerbatarrayservice/auto_rest_swagger_bat_array_service.py @@ -56,7 +56,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.array = Array( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyBoolean/autorestbooltestservice/auto_rest_bool_test_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyBoolean/autorestbooltestservice/auto_rest_bool_test_service.py index 362fed2136..8cf4e5fffb 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyBoolean/autorestbooltestservice/auto_rest_bool_test_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyBoolean/autorestbooltestservice/auto_rest_bool_test_service.py @@ -56,7 +56,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.bool_model = BoolModel( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyByte/autorestswaggerbatbyteservice/auto_rest_swagger_bat_byte_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyByte/autorestswaggerbatbyteservice/auto_rest_swagger_bat_byte_service.py index e95752ae8f..5da86b5b91 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyByte/autorestswaggerbatbyteservice/auto_rest_swagger_bat_byte_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyByte/autorestswaggerbatbyteservice/auto_rest_swagger_bat_byte_service.py @@ -56,7 +56,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.byte = Byte( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/auto_rest_complex_test_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/auto_rest_complex_test_service.py index 06e9d1c27b..05a5944dc0 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/auto_rest_complex_test_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/auto_rest_complex_test_service.py @@ -87,7 +87,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.basic_operations = BasicOperations( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/array.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/array.py index c059d47abd..e375d28d5b 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/array.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/array.py @@ -107,7 +107,7 @@ def put_valid( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.ArrayWrapper) + body_content = self._serialize.body(complex_body, 'ArrayWrapper') # Construct and send request request = self._client.put(url, query_parameters) @@ -197,7 +197,7 @@ def put_empty( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.ArrayWrapper) + body_content = self._serialize.body(complex_body, 'ArrayWrapper') # Construct and send request request = self._client.put(url, query_parameters) diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/basic_operations.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/basic_operations.py index 8421c46c8b..f1cf4be957 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/basic_operations.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/basic_operations.py @@ -107,7 +107,7 @@ def put_valid( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.Basic) + body_content = self._serialize.body(complex_body, 'Basic') # Construct and send request request = self._client.put(url, query_parameters) diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/dictionary.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/dictionary.py index 265c0905f8..c99f68238a 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/dictionary.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/dictionary.py @@ -107,7 +107,7 @@ def put_valid( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.DictionaryWrapper) + body_content = self._serialize.body(complex_body, 'DictionaryWrapper') # Construct and send request request = self._client.put(url, query_parameters) @@ -197,7 +197,7 @@ def put_empty( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.DictionaryWrapper) + body_content = self._serialize.body(complex_body, 'DictionaryWrapper') # Construct and send request request = self._client.put(url, query_parameters) diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/inheritance.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/inheritance.py index 273b3940cc..94062da6c3 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/inheritance.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/inheritance.py @@ -109,7 +109,7 @@ def put_valid( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.Siamese) + body_content = self._serialize.body(complex_body, 'Siamese') # Construct and send request request = self._client.put(url, query_parameters) diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphicrecursive.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphicrecursive.py index 37cf2c78fd..d2aadc47ad 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphicrecursive.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphicrecursive.py @@ -158,7 +158,7 @@ def put_valid( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.Fish) + body_content = self._serialize.body(complex_body, 'Fish') # Construct and send request request = self._client.put(url, query_parameters) diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphism.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphism.py index c9fe7cf53a..3b3d75f90d 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphism.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/polymorphism.py @@ -139,7 +139,7 @@ def put_valid( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.Fish) + body_content = self._serialize.body(complex_body, 'Fish') # Construct and send request request = self._client.put(url, query_parameters) @@ -210,7 +210,7 @@ def put_valid_missing_required( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.Fish) + body_content = self._serialize.body(complex_body, 'Fish') # Construct and send request request = self._client.put(url, query_parameters) diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/primitive.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/primitive.py index 855d890255..de0386c4de 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/primitive.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/primitive.py @@ -106,7 +106,7 @@ def put_int( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.IntWrapper) + body_content = self._serialize.body(complex_body, 'IntWrapper') # Construct and send request request = self._client.put(url, query_parameters) @@ -195,7 +195,7 @@ def put_long( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.LongWrapper) + body_content = self._serialize.body(complex_body, 'LongWrapper') # Construct and send request request = self._client.put(url, query_parameters) @@ -284,7 +284,7 @@ def put_float( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.FloatWrapper) + body_content = self._serialize.body(complex_body, 'FloatWrapper') # Construct and send request request = self._client.put(url, query_parameters) @@ -374,7 +374,7 @@ def put_double( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.DoubleWrapper) + body_content = self._serialize.body(complex_body, 'DoubleWrapper') # Construct and send request request = self._client.put(url, query_parameters) @@ -463,7 +463,7 @@ def put_bool( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.BooleanWrapper) + body_content = self._serialize.body(complex_body, 'BooleanWrapper') # Construct and send request request = self._client.put(url, query_parameters) @@ -552,7 +552,7 @@ def put_string( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.StringWrapper) + body_content = self._serialize.body(complex_body, 'StringWrapper') # Construct and send request request = self._client.put(url, query_parameters) @@ -641,7 +641,7 @@ def put_date( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.DateWrapper) + body_content = self._serialize.body(complex_body, 'DateWrapper') # Construct and send request request = self._client.put(url, query_parameters) @@ -731,7 +731,7 @@ def put_date_time( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.DatetimeWrapper) + body_content = self._serialize.body(complex_body, 'DatetimeWrapper') # Construct and send request request = self._client.put(url, query_parameters) @@ -821,7 +821,7 @@ def put_date_time_rfc1123( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.Datetimerfc1123Wrapper) + body_content = self._serialize.body(complex_body, 'Datetimerfc1123Wrapper') # Construct and send request request = self._client.put(url, query_parameters) @@ -911,7 +911,7 @@ def put_duration( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.DurationWrapper) + body_content = self._serialize.body(complex_body, 'DurationWrapper') # Construct and send request request = self._client.put(url, query_parameters) @@ -1001,7 +1001,7 @@ def put_byte( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.ByteWrapper) + body_content = self._serialize.body(complex_body, 'ByteWrapper') # Construct and send request request = self._client.put(url, query_parameters) diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/readonlyproperty.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/readonlyproperty.py index 3ad3012adf..fde563ffc3 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/readonlyproperty.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/readonlyproperty.py @@ -106,7 +106,7 @@ def put_valid( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(complex_body, models.ReadonlyObj) + body_content = self._serialize.body(complex_body, 'ReadonlyObj') # Construct and send request request = self._client.put(url, query_parameters) diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDate/autorestdatetestservice/auto_rest_date_test_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDate/autorestdatetestservice/auto_rest_date_test_service.py index d589aef9c0..c37507db7f 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDate/autorestdatetestservice/auto_rest_date_test_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDate/autorestdatetestservice/auto_rest_date_test_service.py @@ -56,7 +56,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.date_model = DateModel( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTime/autorestdatetimetestservice/auto_rest_date_time_test_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTime/autorestdatetimetestservice/auto_rest_date_time_test_service.py index 63020ce190..a7189bd413 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTime/autorestdatetimetestservice/auto_rest_date_time_test_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTime/autorestdatetimetestservice/auto_rest_date_time_test_service.py @@ -56,7 +56,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.datetime_model = DatetimeModel( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/autorestrfc1123datetimetestservice/auto_rest_rfc1123_date_time_test_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/autorestrfc1123datetimetestservice/auto_rest_rfc1123_date_time_test_service.py index fb3ccf262d..8ba043959a 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/autorestrfc1123datetimetestservice/auto_rest_rfc1123_date_time_test_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/autorestrfc1123datetimetestservice/auto_rest_rfc1123_date_time_test_service.py @@ -56,7 +56,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.datetimerfc1123 = Datetimerfc1123( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDictionary/autorestswaggerbatdictionaryservice/auto_rest_swagger_ba_tdictionary_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDictionary/autorestswaggerbatdictionaryservice/auto_rest_swagger_ba_tdictionary_service.py index c8fd56f67c..7ec28039bc 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDictionary/autorestswaggerbatdictionaryservice/auto_rest_swagger_ba_tdictionary_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDictionary/autorestswaggerbatdictionaryservice/auto_rest_swagger_ba_tdictionary_service.py @@ -56,7 +56,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.dictionary = Dictionary( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDuration/autorestdurationtestservice/auto_rest_duration_test_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDuration/autorestdurationtestservice/auto_rest_duration_test_service.py index 23ffff5204..6160f38a69 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDuration/autorestdurationtestservice/auto_rest_duration_test_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDuration/autorestdurationtestservice/auto_rest_duration_test_service.py @@ -56,7 +56,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.duration = Duration( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFile/autorestswaggerbatfileservice/auto_rest_swagger_bat_file_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFile/autorestswaggerbatfileservice/auto_rest_swagger_bat_file_service.py index aa002c6d14..b7b44c72d6 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFile/autorestswaggerbatfileservice/auto_rest_swagger_bat_file_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFile/autorestswaggerbatfileservice/auto_rest_swagger_bat_file_service.py @@ -56,7 +56,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.files = Files( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFormData/autorestswaggerbatformdataservice/auto_rest_swagger_bat_form_data_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFormData/autorestswaggerbatformdataservice/auto_rest_swagger_bat_form_data_service.py index 5dab02ffeb..07c4464eea 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFormData/autorestswaggerbatformdataservice/auto_rest_swagger_bat_form_data_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyFormData/autorestswaggerbatformdataservice/auto_rest_swagger_bat_form_data_service.py @@ -56,7 +56,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.formdata = Formdata( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyInteger/autorestintegertestservice/auto_rest_integer_test_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyInteger/autorestintegertestservice/auto_rest_integer_test_service.py index cb2b63aeb4..86c9440c50 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyInteger/autorestintegertestservice/auto_rest_integer_test_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyInteger/autorestintegertestservice/auto_rest_integer_test_service.py @@ -56,7 +56,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.int_model = IntModel( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyNumber/autorestnumbertestservice/auto_rest_number_test_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyNumber/autorestnumbertestservice/auto_rest_number_test_service.py index cbc51e4caf..0f445b717a 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyNumber/autorestnumbertestservice/auto_rest_number_test_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyNumber/autorestnumbertestservice/auto_rest_number_test_service.py @@ -56,7 +56,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.number = Number( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyString/autorestswaggerbatservice/auto_rest_swagger_bat_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyString/autorestswaggerbatservice/auto_rest_swagger_bat_service.py index d2aca590c6..cb1ce26901 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyString/autorestswaggerbatservice/auto_rest_swagger_bat_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyString/autorestswaggerbatservice/auto_rest_swagger_bat_service.py @@ -59,7 +59,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.string = String( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/auto_rest_parameterized_host_test_client.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/auto_rest_parameterized_host_test_client.py index bbed94ec1c..14b292dfa6 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/auto_rest_parameterized_host_test_client.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUri/autorestparameterizedhosttestclient/auto_rest_parameterized_host_test_client.py @@ -65,7 +65,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.paths = Paths( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/autorestparameterizedcustomhosttestclient/auto_rest_parameterized_custom_host_test_client.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/autorestparameterizedcustomhosttestclient/auto_rest_parameterized_custom_host_test_client.py index 3b659079f1..9e5500f342 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/autorestparameterizedcustomhosttestclient/auto_rest_parameterized_custom_host_test_client.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/CustomBaseUriMoreOptions/autorestparameterizedcustomhosttestclient/auto_rest_parameterized_custom_host_test_client.py @@ -74,7 +74,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.paths = Paths( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Header/autorestswaggerbatheaderservice/auto_rest_swagger_bat_header_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Header/autorestswaggerbatheaderservice/auto_rest_swagger_bat_header_service.py index 353542329d..2b6e1e65a9 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Header/autorestswaggerbatheaderservice/auto_rest_swagger_bat_header_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Header/autorestswaggerbatheaderservice/auto_rest_swagger_bat_header_service.py @@ -56,7 +56,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.header = Header( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/auto_rest_http_infrastructure_test_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/auto_rest_http_infrastructure_test_service.py index c7c9308ea1..c830f26bc2 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/auto_rest_http_infrastructure_test_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/autoresthttpinfrastructuretestservice/auto_rest_http_infrastructure_test_service.py @@ -74,7 +74,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.http_failure = HttpFailure( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ModelFlattening/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ModelFlattening/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py index 2c737ce376..843afe11e4 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ModelFlattening/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ModelFlattening/autorestresourceflatteningtestservice/auto_rest_resource_flattening_test_service.py @@ -53,7 +53,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -271,7 +271,7 @@ def put_resource_collection( # Construct body if resource_complex_object is not None: - body_content = self._serialize.body(resource_complex_object, models.ResourceCollection) + body_content = self._serialize.body(resource_complex_object, 'ResourceCollection') else: body_content = None @@ -364,7 +364,7 @@ def put_simple_product( # Construct body if simple_body_product is not None: - body_content = self._serialize.body(simple_body_product, models.SimpleProduct) + body_content = self._serialize.body(simple_body_product, 'SimpleProduct') else: body_content = None @@ -433,7 +433,7 @@ def post_flattened_simple_product( # Construct body if simple_body_product is not None: - body_content = self._serialize.body(simple_body_product, models.SimpleProduct) + body_content = self._serialize.body(simple_body_product, 'SimpleProduct') else: body_content = None @@ -515,7 +515,7 @@ def put_simple_product_with_grouping( # Construct body if simple_body_product is not None: - body_content = self._serialize.body(simple_body_product, models.SimpleProduct) + body_content = self._serialize.body(simple_body_product, 'SimpleProduct') else: body_content = None diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ParameterFlattening/autorestparameterflattening/auto_rest_parameter_flattening.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ParameterFlattening/autorestparameterflattening/auto_rest_parameter_flattening.py index 35cc30f505..b3c9a71e2c 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ParameterFlattening/autorestparameterflattening/auto_rest_parameter_flattening.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ParameterFlattening/autorestparameterflattening/auto_rest_parameter_flattening.py @@ -56,7 +56,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.availability_sets = AvailabilitySets( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ParameterFlattening/autorestparameterflattening/operations/availability_sets.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ParameterFlattening/autorestparameterflattening/operations/availability_sets.py index 5728b0ee3d..ec69672916 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ParameterFlattening/autorestparameterflattening/operations/availability_sets.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ParameterFlattening/autorestparameterflattening/operations/availability_sets.py @@ -72,7 +72,7 @@ def update( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(tags1, models.AvailabilitySetUpdateParameters) + body_content = self._serialize.body(tags1, 'AvailabilitySetUpdateParameters') # Construct and send request request = self._client.patch(url, query_parameters) diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Report/autorestreportservice/auto_rest_report_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Report/autorestreportservice/auto_rest_report_service.py index 31aeda82ea..59192a6fd2 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Report/autorestreportservice/auto_rest_report_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Report/autorestreportservice/auto_rest_report_service.py @@ -53,7 +53,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/auto_rest_required_optional_test_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/auto_rest_required_optional_test_service.py index d9549ba15e..c22c57d10f 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/auto_rest_required_optional_test_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/auto_rest_required_optional_test_service.py @@ -83,7 +83,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.implicit = Implicit( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/operations/explicit.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/operations/explicit.py index f4f0239b0e..4f56d1d617 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/operations/explicit.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/operations/explicit.py @@ -156,7 +156,7 @@ def post_required_integer_property( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(body_parameter, models.IntWrapper) + body_content = self._serialize.body(body_parameter, 'IntWrapper') # Construct and send request request = self._client.post(url, query_parameters) @@ -205,7 +205,7 @@ def post_optional_integer_property( # Construct body if body_parameter is not None: - body_content = self._serialize.body(body_parameter, models.IntOptionalWrapper) + body_content = self._serialize.body(body_parameter, 'IntOptionalWrapper') else: body_content = None @@ -431,7 +431,7 @@ def post_required_string_property( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(body_parameter, models.StringWrapper) + body_content = self._serialize.body(body_parameter, 'StringWrapper') # Construct and send request request = self._client.post(url, query_parameters) @@ -480,7 +480,7 @@ def post_optional_string_property( # Construct body if body_parameter is not None: - body_content = self._serialize.body(body_parameter, models.StringOptionalWrapper) + body_content = self._serialize.body(body_parameter, 'StringOptionalWrapper') else: body_content = None @@ -613,7 +613,7 @@ def post_required_class_parameter( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(body_parameter, models.Product) + body_content = self._serialize.body(body_parameter, 'Product') # Construct and send request request = self._client.post(url, query_parameters) @@ -658,7 +658,7 @@ def post_optional_class_parameter( # Construct body if body_parameter is not None: - body_content = self._serialize.body(body_parameter, models.Product) + body_content = self._serialize.body(body_parameter, 'Product') else: body_content = None @@ -709,7 +709,7 @@ def post_required_class_property( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(body_parameter, models.ClassWrapper) + body_content = self._serialize.body(body_parameter, 'ClassWrapper') # Construct and send request request = self._client.post(url, query_parameters) @@ -759,7 +759,7 @@ def post_optional_class_property( # Construct body if body_parameter is not None: - body_content = self._serialize.body(body_parameter, models.ClassOptionalWrapper) + body_content = self._serialize.body(body_parameter, 'ClassOptionalWrapper') else: body_content = None @@ -900,7 +900,7 @@ def post_required_array_property( header_parameters.update(custom_headers) # Construct body - body_content = self._serialize.body(body_parameter, models.ArrayWrapper) + body_content = self._serialize.body(body_parameter, 'ArrayWrapper') # Construct and send request request = self._client.post(url, query_parameters) @@ -949,7 +949,7 @@ def post_optional_array_property( # Construct body if body_parameter is not None: - body_content = self._serialize.body(body_parameter, models.ArrayOptionalWrapper) + body_content = self._serialize.body(body_parameter, 'ArrayOptionalWrapper') else: body_content = None diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/auto_rest_url_test_service.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/auto_rest_url_test_service.py index 0c68344056..a6d660a1c2 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/auto_rest_url_test_service.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Url/autoresturltestservice/auto_rest_url_test_service.py @@ -81,7 +81,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.paths = Paths( diff --git a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Validation/autorestvalidationtest/auto_rest_validation_test.py b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Validation/autorestvalidationtest/auto_rest_validation_test.py index 9d63617ddb..328b2b4776 100644 --- a/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Validation/autorestvalidationtest/auto_rest_validation_test.py +++ b/AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Validation/autorestvalidationtest/auto_rest_validation_test.py @@ -73,7 +73,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -178,7 +178,7 @@ def validation_of_body( # Construct body if body is not None: - body_content = self._serialize.body(body, models.Product) + body_content = self._serialize.body(body, 'Product') else: body_content = None @@ -280,7 +280,7 @@ def post_with_constant_in_body( # Construct body if body is not None: - body_content = self._serialize.body(body, models.Product) + body_content = self._serialize.body(body, 'Product') else: body_content = None diff --git a/Samples/azure-storage/Azure.Python/storagemanagementclient/operations/storage_accounts_operations.py b/Samples/azure-storage/Azure.Python/storagemanagementclient/operations/storage_accounts_operations.py index e8412716ef..ef19c00fbe 100644 --- a/Samples/azure-storage/Azure.Python/storagemanagementclient/operations/storage_accounts_operations.py +++ b/Samples/azure-storage/Azure.Python/storagemanagementclient/operations/storage_accounts_operations.py @@ -71,7 +71,7 @@ def check_name_availability( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(account_name, models.StorageAccountCheckNameAvailabilityParameters) + body_content = self._serialize.body(account_name, 'StorageAccountCheckNameAvailabilityParameters') # Construct and send request request = self._client.post(url, query_parameters) @@ -148,7 +148,7 @@ def create( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, models.StorageAccountCreateParameters) + body_content = self._serialize.body(parameters, 'StorageAccountCreateParameters') # Construct and send request def long_running_send(): @@ -380,7 +380,7 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, models.StorageAccountUpdateParameters) + body_content = self._serialize.body(parameters, 'StorageAccountUpdateParameters') # Construct and send request request = self._client.patch(url, query_parameters) @@ -650,7 +650,7 @@ def regenerate_key( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(regenerate_key, models.StorageAccountRegenerateKeyParameters) + body_content = self._serialize.body(regenerate_key, 'StorageAccountRegenerateKeyParameters') # Construct and send request request = self._client.post(url, query_parameters) diff --git a/Samples/azure-storage/Azure.Python/storagemanagementclient/storage_management_client.py b/Samples/azure-storage/Azure.Python/storagemanagementclient/storage_management_client.py index 8c665e4cf9..5b0b67e876 100644 --- a/Samples/azure-storage/Azure.Python/storagemanagementclient/storage_management_client.py +++ b/Samples/azure-storage/Azure.Python/storagemanagementclient/storage_management_client.py @@ -109,7 +109,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.storage_accounts = StorageAccountsOperations( diff --git a/Samples/petstore/Python/swaggerpetstore/swagger_petstore.py b/Samples/petstore/Python/swaggerpetstore/swagger_petstore.py index ebc0bb5e00..ef020f9303 100644 --- a/Samples/petstore/Python/swaggerpetstore/swagger_petstore.py +++ b/Samples/petstore/Python/swaggerpetstore/swagger_petstore.py @@ -47,7 +47,7 @@ def __init__( self._client = ServiceClient(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer() + self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -128,7 +128,7 @@ def add_pet( # Construct body if body is not None: - body_content = self._serialize.body(body, models.Pet) + body_content = self._serialize.body(body, 'Pet') else: body_content = None @@ -174,7 +174,7 @@ def update_pet( # Construct body if body is not None: - body_content = self._serialize.body(body, models.Pet) + body_content = self._serialize.body(body, 'Pet') else: body_content = None @@ -623,7 +623,7 @@ def place_order( # Construct body if body is not None: - body_content = self._serialize.body(body, models.Order) + body_content = self._serialize.body(body, 'Order') else: body_content = None @@ -774,7 +774,7 @@ def create_user( # Construct body if body is not None: - body_content = self._serialize.body(body, models.User) + body_content = self._serialize.body(body, 'User') else: body_content = None @@ -1059,7 +1059,7 @@ def update_user( # Construct body if body is not None: - body_content = self._serialize.body(body, models.User) + body_content = self._serialize.body(body, 'User') else: body_content = None